-
Notifications
You must be signed in to change notification settings - Fork 1
117 lines (110 loc) · 3.12 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Unit Testing
on:
push:
branches: [master]
pull_request:
types: [opened, synchronize, reopened]
jobs:
ensure_tests:
name: Ensure No Missing Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
name: Checkout repository
- run: |
./scripts/test_generator.sh
name: Run test generator script
unit_test_gcc_linux:
name: Linux (GCC=v${{ matrix.version }})
needs: [ ensure_tests ]
strategy:
matrix:
version: [9, 10, 11, 12, 13]
runs-on: ubuntu-latest
env:
CC: gcc-${{ matrix.version }}
CXX: g++-${{ matrix.version }}
steps:
- uses: actions/checkout@v3
name: Checkout repository
- uses: egor-tensin/setup-gcc@v1.3
name: Install GCC
with:
version: ${{ matrix.version }}
- run: |
cmake -Bbuild -DFirefly_ENABLE_TESTS=ON
cmake --build build -- -j `nproc`
name: Configure and build binaries
- run: |
ctest --test-dir build/tests/ --verbose
name: Run tests
unit_test_llvm_linux:
name: Linux (LLVM=v${{ matrix.version }})
needs: [ ensure_tests ]
strategy:
matrix:
version: [11, 12, 13, 14, 15, 16]
runs-on: ubuntu-latest
env:
CC: clang-${{ matrix.version }}
CXX: clang++-${{ matrix.version }}
steps:
- uses: actions/checkout@v3
name: Checkout repository
- uses: egor-tensin/setup-clang@v1.4
name: Install LLVM
with:
version: ${{ matrix.version }}
- run: |
cmake -Bbuild -DFirefly_ENABLE_TESTS=ON
cmake --build build -- -j `nproc`
name: Configure and build binaries
- run: |
ctest --test-dir build/tests/ --verbose
name: Run tests
unit_test_gcc_macos:
name: MacOS (GCC=v${{ matrix.version }})
needs: [ ensure_tests ]
strategy:
matrix:
version: [9, 10, 11, 12, 13]
runs-on: macos-latest
env:
CC: clang-${{ matrix.version }}
CXX: clang++-${{ matrix.version }}
steps:
- uses: actions/checkout@v3
name: Checkout repository
- run: |
brew install gcc@{{ matrix.version }}
name: Install GCC
- run: |
cmake -Bbuild -DFirefly_ENABLE_TESTS=ON
cmake --build build -- -j `nproc`
name: Configure and build binaries
- run: |
ctest --test-dir build/tests/ --verbose
name: Run tests
unit_test_llvm_macos:
name: MacOS (LLVM=v${{ matrix.version }})
needs: [ ensure_tests ]
strategy:
matrix:
version: [12, 13, 14, 15, 16]
runs-on: ubuntu-latest
env:
CC: clang-${{ matrix.version }}
CXX: clang++-${{ matrix.version }}
steps:
- uses: actions/checkout@v3
name: Checkout repository
- run: |
brew install llvm@${{ matrix.version }}
name: Install LLVM
- run: |
cmake -Bbuild -DFirefly_ENABLE_TESTS=ON
cmake --build build -- -j `nproc`
name: Configure and build binaries
- run: |
ctest --test-dir build/tests/ --verbose
name: Run tests