From be219288dc03f6612b9d62e0f2c33ddf7d06d303 Mon Sep 17 00:00:00 2001 From: Paul Hollinsky Date: Mon, 21 Feb 2022 20:13:28 -0500 Subject: [PATCH] CI: Add Windows --- .gitlab-ci.yml | 27 +++++++++++++++++++++++++++ ci/build-windows.bat | 12 ++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100644 ci/build-windows.bat diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..391effc --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,27 @@ +stages: + - build + - test + +build windows/x64: + stage: build + script: + - CMD.EXE /C ci\build-windows.bat + artifacts: + when: always + paths: + - build + expire_in: 3 days + tags: + - icsneo-windows + +test windows/x64: + stage: test + script: + - CMD.EXE /C build\libicsneo-tests.exe + dependencies: + - build windows/x64 + needs: + - build windows/x64 + tags: + - icsneo-windows + timeout: 3m diff --git a/ci/build-windows.bat b/ci/build-windows.bat new file mode 100644 index 0000000..5871e98 --- /dev/null +++ b/ci/build-windows.bat @@ -0,0 +1,12 @@ +call "%VCVARS64%" + +REM clean intermediate directories +rmdir /s /q build +mkdir build + +REM build +cd build +cmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLIBICSNEO_BUILD_TESTS=ON .. +if %errorlevel% neq 0 exit /b %errorlevel% +cmake --build . +if %errorlevel% neq 0 exit /b %errorlevel%