Skip to content

Commit

Permalink
Add github action
Browse files Browse the repository at this point in the history
  • Loading branch information
hit9 committed Apr 15, 2024
1 parent 60fef44 commit 4554531
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: blinker tests

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false

matrix:
os: [macos-latest, ubuntu-latest]
cpp_compiler: [g++, clang++]
include:
- os: ubuntu-latest
c_compiler: gcc
cpp_compiler: g++
- os: macos-latest
c_compiler: clang
cpp_compiler: clang++
exclude:
- os: macos-latest
cpp_compiler: g++
- os: ubuntu-latest
cpp_compiler: clang++

steps:
- uses: actions/checkout@v3

- name: Install Conan
run: pip install conan

- name: Configure Conan
run: conan profile detect

- name: Install Requirements
run: >
conan install .
--output-folder=${{ runner.workspace }}/build
--build=missing
- name: Configure CMake
working-directory: ${{runner.workspace}}
run: >
cmake -B ${{ runner.workspace }}/build -S ${{ github.workspace }}
-DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DBLINKER_TEST=1
- name: Build Tests
working-directory: ${{runner.workspace}}/build/tests
run: make

- name: Run Tests
working-directory: ${{runner.workspace}}/build
run: ctest --test-dir ./tests --output-on-failure

0 comments on commit 4554531

Please sign in to comment.