-
Notifications
You must be signed in to change notification settings - Fork 15
57 lines (55 loc) · 1.91 KB
/
testing.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Unit testing
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
# --- Test stages ---
test-gcc:
name: With gcc ${{ matrix.gcc_version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
gcc_version: ['11','12','13']
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install gcc-${{ matrix.gcc_version }} and other dependencies
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt-get install -y gcc-${{ matrix.gcc_version }} ruby rake gcc-multilib lcov wget
pip install --user gcovr==3.3
wget https://github.com/ThrowTheSwitch/Ceedling/releases/download/1.0.0-60c24c2/ceedling-1.0.0-60c24c2.gem -O ceedling.gem
sudo gem install ceedling.gem
- name: Unit tests
run: make utest CC=gcc
env:
CC: gcc-${{ matrix.gcc_version }}
test-clang:
name: With clang ${{ matrix.clang_version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
clang_version: ['11','12','13','14','15']
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install clang-${{ matrix.clang_version }}
run: |
sudo apt-get install -y clang-${{ matrix.clang_version }} ruby rake gcc-multilib lcov wget
pip install --user gcovr==3.3
wget https://github.com/ThrowTheSwitch/Ceedling/releases/download/1.0.0-60c24c2/ceedling-1.0.0-60c24c2.gem -O ceedling.gem
sudo gem install ceedling.gem
sudo ln -fs /usr/bin/clang-${{ matrix.clang_version }} /usr/bin/clang
sudo ln -fs /usr/bin/llvm-cov-${{ matrix.clang_version }} /usr/bin/llvm-cov
- name: Unit tests
run: make CC=clang utest
env:
CC: clang-${{ matrix.clang_version }}
CXX: clang++-${{ matrix.clang_version }}