From 32a29bd96f31b360b87f9cb65fd88339ba6169a9 Mon Sep 17 00:00:00 2001 From: Felix Exner Date: Fri, 10 Jan 2025 09:43:40 +0100 Subject: [PATCH] Add windows build --- .github/workflows/win-build.yml | 23 +++++++++++++++++++++++ tests/test_ur_driver.cpp | 3 +++ 2 files changed, 26 insertions(+) create mode 100644 .github/workflows/win-build.yml diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml new file mode 100644 index 000000000..5b458761c --- /dev/null +++ b/.github/workflows/win-build.yml @@ -0,0 +1,23 @@ +name: Windows build and tests +on: + workflow_dispatch: + pull_request: + push: + branches: + - main + - win-build + +jobs: + win-build: + timeout-minutes: 30 + runs-on: windows-2022 + + steps: + - uses: actions/checkout@v4 + - name: configure + run: mkdir build && cd build && cmake .. -DBUILDING_TESTS=1 + #run: mkdir build && cd build && cmake .. -DBUILDING_TESTS=1 -DINTEGRATION_TESTS=1 + - name: build + run: cmake --build build --config Debug + - name: test + run: cd build && ctest --output-on-failure -C Debug diff --git a/tests/test_ur_driver.cpp b/tests/test_ur_driver.cpp index 5f703bfd7..1c236c3f5 100644 --- a/tests/test_ur_driver.cpp +++ b/tests/test_ur_driver.cpp @@ -228,6 +228,9 @@ TEST_F(UrDriverTest, read_non_existing_script_file) TEST_F(UrDriverTest, read_existing_script_file) { +#ifdef _WIN32 +#define mkstemp _mktemp_s +#endif g_consume_rtde_packages = true; char existing_script_file[] = "urscript.XXXXXX"; int fd = mkstemp(existing_script_file);