-
Notifications
You must be signed in to change notification settings - Fork 2
78 lines (76 loc) · 2.49 KB
/
tests.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Test Workflow
on: [push, pull_request]
env:
LLVM_VERSION: 18
jobs:
debug:
runs-on: ubuntu-24.04
strategy:
matrix:
toolchain: ['clang', 'gcc']
include:
- toolchain: gcc
c-compiler: gcc
cxx-compiler: g++
- toolchain: clang
c-compiler: clang
cxx-compiler: clang++
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh $LLVM_VERSION
sudo apt update -y && sudo apt upgrade -y
sudo apt-get -y install gcc-multilib g++-multilib ninja-build clang-tidy-$LLVM_VERSION
sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-$LLVM_VERSION 50
clang-tidy --version
- run: |
cmake --preset OCVSMD-Linux -DCMAKE_C_COMPILER=${{ matrix.c-compiler }} -DCMAKE_CXX_COMPILER=${{ matrix.cxx-compiler }}
cmake --build --preset OCVSMD-Linux-Debug
- uses: actions/upload-artifact@v4
if: always()
with:
name: ${{github.job}}_${{matrix.toolchain}}
path: ${{github.workspace}}/**/*
retention-days: 2
optimizations:
runs-on: ubuntu-24.04
strategy:
matrix:
toolchain: ['clang', 'gcc']
build_type: [Release, MinSizeRel]
include:
- toolchain: gcc
c-compiler: gcc
cxx-compiler: g++
- toolchain: clang
c-compiler: clang
cxx-compiler: clang++
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- run: |
sudo apt update -y && sudo apt upgrade -y
sudo apt install gcc-multilib g++-multilib ninja-build
- run: |
cmake --preset OCVSMD-Linux -DCMAKE_C_COMPILER=${{ matrix.c-compiler }} -DCMAKE_CXX_COMPILER=${{ matrix.cxx-compiler }}
cmake --build --preset OCVSMD-Linux-Release
- uses: actions/upload-artifact@v4
if: always()
with:
name: ${{github.job}}_${{matrix.toolchain}}_${{matrix.build_type}}
path: ${{github.workspace}}/**/*
retention-days: 2
style_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DoozyX/[email protected]
with:
source: './test ./src'
extensions: 'c,h,cpp,hpp'
clangFormatVersion: ${{ env.LLVM_VERSION }}