From 92e509b38d41d36e46948b2e73ab1fef96ca6e5b Mon Sep 17 00:00:00 2001 From: Daniel Adam Date: Fri, 3 Feb 2023 10:21:08 +0100 Subject: [PATCH] CI on Windows --- .github/workflows/cmake-windows.yml | 46 +++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/cmake-windows.yml diff --git a/.github/workflows/cmake-windows.yml b/.github/workflows/cmake-windows.yml new file mode 100644 index 00000000..f75bb872 --- /dev/null +++ b/.github/workflows/cmake-windows.yml @@ -0,0 +1,46 @@ +# Build on Windows with CMake and execute tests + +name: CMake building Windows + +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + # branches: [master] + # pull_request: + # branches: [master] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + cmake_windows: + runs-on: windows-latest + strategy: + fail-fast: false + matrix: + include: + - args: "-DCMAKE_BUILD_TYPE=Debug -DENABLE_TOOLS=ON" + - args: "-DCMAKE_BUILD_TYPE=Debug -DTINYCBOR_FREESTANDING_BUILD_ENABLED=ON -DENABLE_TOOLS=ON" + - args: "-DCMAKE_BUILD_TYPE=Debug -DUSE_SHARED_TINYCBOR_LIBRARY=ON -DENABLE_TOOLS=ON" + - args: "-DCMAKE_BUILD_TYPE=Debug -DUSE_SHARED_TINYCBOR_LIBRARY=ON -DUSE_STATIC_TINYCBOR_LIBRARY=OFF -DENABLE_TOOLS=ON" + - args: "-DCMAKE_BUILD_TYPE=Release -DENABLE_TOOLS=ON" + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # - name: Install Qt5 for tests + # uses: jurplel/install-qt-action/@v3 + + - name: Configure for MSVC + run: ilammy/msvc-dev-cmd@v1 + + - name: Build unit tests + run: | + cmake -B build -G Ninja -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_TESTING=ON .. + cmake --build build + + - name: Run unit tests + run: | + cd build + ctest --verbose