Skip to content

Commit

Permalink
add ci tests (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
rkaminsk authored Jun 1, 2022
1 parent fa39da4 commit 3cd114e
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: CI tests

on:
- push
- pull_request

jobs:
build:
name: libpotassco tests on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
include:
- os: 'ubuntu-latest'
generator: 'Ninja'
build_type: 'Debug'
- os: 'macos-latest'
generator: 'Ninja'
build_type: 'Debug'
- os: 'windows-latest'
generator: 'Visual Studio 17 2022'
build_type: 'Debug'

steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- name: install prerequisites on ubuntu
if: ${{ matrix.os == 'ubuntu-latest' }}
run:
sudo apt install ninja-build

- name: install prerequisites on macos
if: ${{ matrix.os == 'macos-latest' }}
run: |
brew update
brew install ninja
- name: Configure CMake
run: >
cmake
-G "${{ matrix.generator }}"
-B "${{github.workspace}}/build"
-DCMAKE_BUILD_TYPE="${{matrix.build_type}}"
-DLIB_POTASSCO_BUILD_TESTS="On"
-DCMAKE_CXX_STANDARD="14"
- name: Build
run: >
cmake
--build "${{github.workspace}}/build"
--config "${{matrix.build_type}}"
- name: Test
working-directory: ${{github.workspace}}/build
run: >
ctest
-C "${{matrix.build_type}}"

0 comments on commit 3cd114e

Please sign in to comment.