Add windows CI for testing #48
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: | | |
mkdir build && cd build | |
cmake -DBUILD=test -G "Visual Studio 17 2022" -A x64 .. | |
cmake --build . --config Release --target all -- | |
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 | |
mkdir build && cd build | |
cmake -DBUILD=test -DFORCE_32BIT=1 -G "Visual Studio 17 2022" -A x86 .. | |
cmake --build . --config Release --target all -- | |
ctest -C Release -T test || ctest -C Release -T test --rerun-failed --output-on-failure |