Skip to content

Commit

Permalink
Create tests.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
r3w0p committed May 27, 2024
1 parent 65b1fc8 commit b27131b
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Tests

on:
push:
branches: [ tui ]

env:
BUILD_TYPE: Release

jobs:
build:
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
run: ./${{github.workspace}}/build/tests

0 comments on commit b27131b

Please sign in to comment.