Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
r3w0p committed May 29, 2024
1 parent 7ed3882 commit 3ec3385
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 10 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ jobs:
strategy:
matrix:
include:
- name: Linux Clang
os: ubuntu-latest
compiler_cc: clang
compiler_cpp: clang++

- name: Linux GCC
os: ubuntu-latest
compiler_cc: gcc
Expand All @@ -32,11 +27,6 @@ jobs:
# compiler_c: clang
# compiler_cpp: clang++

- name: Windows Clang
os: windows-latest
compiler_cc: clang
compiler_cpp: clang++

- name: Windows GCC
os: windows-latest
compiler_cc: gcc
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Tests

on:
push:
branches: [ "1.1.0" ]

env:
BUILD_TYPE: Debug

jobs:
tests:
name: Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- name: Linux GCC
os: ubuntu-latest
compiler_cc: gcc
compiler_cpp: g++

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install CMake and Ninja
uses: lukka/get-cmake@latest
with:
cmakeVersion: "~3.27.0" # use most recent 3.27.x version
ninjaVersion: "^1.0" # use most recent 1.x version

- name: CMake Setup
run: cmake -S . -B ${{github.workspace}}/build -G Ninja -D CMAKE_C_COMPILER=${{matrix.compiler_cc}} CMAKE_CXX_COMPILER=${{matrix.compiler_cpp}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: CMake Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target tests

- name: Run Tests
working-directory: ./build
run: ctest --output-on-failure

0 comments on commit 3ec3385

Please sign in to comment.