Add windows CI for testing #54
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: [ push, pull_request ] | |
jobs: | |
test_ubuntu: | |
name: Run CMake Test on Ubuntu (GCC) 🧪 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
- name: Setup Build Tools | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y gcc cmake | |
- name: Build and Run 64bit Tests | |
run: | | |
mkdir build | |
cd build | |
cmake -DBUILD=test .. | |
make | |
make test || ctest --rerun-failed --output-on-failure | |
- name: Build and Run 32bit Tests | |
run: | | |
rm -rf build | |
mkdir build | |
cd build | |
cmake -DBUILD=test -DFORCE_32BIT=1 .. | |
make | |
make test || ctest --rerun-failed --output-on-failure | |
test_windows: | |
name: Run CMake Test on Windows (MSVC) 🧪 | |
runs-on: windows-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
- name: Build and Run 64bit Tests | |
run: | | |
cmake -E make_directory build | |
cmake -S . -B build -G "Visual Studio 17 2022" -A x64 "-DBUILD=test" "-DCMAKE_BUILD_TYPE:STRING=Release" | |
cmake --build build --config Release --target ALL_BUILD -- | |
ctest -C Release -T test || ctest -C Release -T test --rerun-failed --output-on-failure | |
- name: Build and Run 32bit Tests | |
run: | | |
Remove-Item -Path build -Force | |
cmake -E make_directory build | |
cmake -S . -B build -G "Visual Studio 17 2022" -A x86 "-DBUILD=test" "-DFORCE_32BIT=1" "-DCMAKE_BUILD_TYPE:STRING=Release" | |
cmake --build build --config Release --target ALL_BUILD -- | |
ctest -C Release -T test || ctest -C Release -T test --rerun-failed --output-on-failure |