-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (37 loc) · 1.53 KB
/
unit_testing.yaml
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
name: Unit Testing
on:
pull_request:
types: [opened, synchronize]
jobs:
unit_test_gcc:
strategy:
matrix:
version: [13, 14]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
sudo cp .github/apt-sources/ubuntu.sources /etc/apt/sources.list.d/
sudo cp .github/apt-sources/ubuntu-archive-keyring.gpg /usr/share/keyrings/ubuntu-archive-keyring.gpg
sudo apt update
sudo apt install build-essential gcc-${{ matrix.version }} g++-${{ matrix.version }} -y
- run: |
cmake -Bbuild -DCMAKE_C_COMPILER=gcc-${{ matrix.version }} -DCMAKE_CXX_COMPILER=g++-${{ matrix.version }} -DFirefly_ENABLE_TESTS=ON -DFirefly_ENABLE_EXAMPLES=ON
cmake --build build
- run: ctest --test-dir build/tests --output-on-failure
unit_test_llvm:
strategy:
matrix:
version: [16, 17, 18]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
sudo cp .github/apt-sources/ubuntu.sources /etc/apt/sources.list.d/
sudo cp .github/apt-sources/ubuntu-archive-keyring.gpg /usr/share/keyrings/ubuntu-archive-keyring.gpg
sudo apt update
sudo apt install build-essential clang-${{ matrix.version }} -y
- run: |
cmake -Bbuild -DCMAKE_C_COMPILER=clang-${{ matrix.version }} -DCMAKE_CXX_COMPILER=clang++-${{ matrix.version }} -DFirefly_ENABLE_TESTS=ON -DFirefly_ENABLE_EXAMPLES=ON
cmake --build build
- run: ctest --test-dir build/tests --output-on-failure