Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test on all platforms. #175

Merged
merged 24 commits into from
Jan 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: ci

on: push

jobs:
build:
strategy:
matrix:
container: [ ubuntu-latest, macos-latest, windows-latest ]
build_type: [ Debug, Release ]


# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ${{ matrix.container }}

steps:
- uses: actions/checkout@v2

- name: Configure
# Configure CMake in a 'buildX' subdirectory.
# We can't use `build` as `BUILD` is already taken by the bazel build file.
# On Mac and Windows this leads to a conflict.
run: |
mkdir -p buildX
cd buildX
cmake -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ..

- name: Build
run: |
cmake --build buildX --config ${{ matrix.build_type }}

- name: Test
if: runner.os != 'Windows'
working-directory: ${{ github.workspace }}/buildX
# Execute all tests.
run: |
test/cctest/cctest
# Also run the ctests. Same tests, but different framework.
ctest

- name: Test - Windows
if: runner.os == 'Windows'
working-directory: ${{ github.workspace }}/buildX
# Execute all tests.
run: |
test/cctest/${{ matrix.build_type }}/cctest.exe
# Also run the ctests. Same tests, but different framework.
ctest -C ${{ matrix.build_type }}
34 changes: 0 additions & 34 deletions .github/workflows/cmake.yml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/scons.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: scons

on: push

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install scons

- name: Build
run: |
make

- name: Test
run: |
make test