-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (36 loc) · 1.23 KB
/
runTests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
on:
pull_request:
types: [opened, reopened]
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
workflow_dispatch:
name: Unit tests
jobs:
unitTests:
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: |
sudo apt install -y \
build-essential \
cmake ninja-build
- name: Wait for code formatting to succeed
if: ${{ github.event_name != 'workflow_dispatch' }}
uses: lewagon/[email protected]
with:
ref: ${{ github.ref }}
check-name: 'formatCode'
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
allowed-conclusions: success
- name: Checkout Repository
uses: actions/checkout@v4
- name: Configure CMake
run: cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=gcc -S ${{github.workspace}} -B ${{github.workspace}}/build -G Ninja
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build -j 10
- name: Test
run: ctest --test-dir ${{github.workspace}}/build --output-on-failure --verbose