-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (89 loc) · 2.65 KB
/
CI_ubuntu.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
name: CI_ubuntu
permissions:
actions: write
contents: read
'on':
pull_request:
push:
branches:
- master
env:
UBSAN_OPTIONS: print_stacktrace=1
jobs:
posix:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-24.04
type: Debug
compiler: clang
cxx_compiler: clang++
version: 17
- os: ubuntu-24.04
type: Debug
compiler: clang
cxx_compiler: clang++
version: 19
- os: ubuntu-24.04
type: Debug
compiler: gcc
cxx_compiler: g++
version: 11
- os: ubuntu-24.04
type: Debug
compiler: gcc
cxx_compiler: g++
version: 14
name: '${{matrix.type}} ${{matrix.compiler}}-${{matrix.version}}'
runs-on: ubuntu-24.04
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1
- name: Checkout the code
uses: actions/checkout@v2
- name: Reuse ccache directory
uses: actions/cache@v2
with:
path: ~/.cache/ccache
key: 'ubuntu-24.04 ${{matrix.type}} ${{matrix.compiler}}-${{matrix.version}} ccache-dir ${{github.ref}}'
restore-keys: |
${{matrix.os}} ${{matrix.type}} ${{matrix.compiler}}-${{matrix.version}} ccache-dir ${{github.ref}}
${{matrix.os}} ${{matrix.type}} ${{matrix.compiler}}-${{matrix.version}} ccache-
- name: install based dependencies
run: |
sudo apt install ccache
sudo apt install cmake
sudo apt install lld
sudo apt install ninja-build
- name: install compiler
run: >
sudo make
-f scripts/ci_ubuntu.make
install-compiler
compiler=${{matrix.compiler}}
version=${{matrix.version}}
- name: Setup ccache
run: |
ccache -M 2.0GB
ccache -s
- name: Configure cmake project
run: >
cmake
-B cmake_build
-G Ninja
-DCMAKE_BUILD_TYPE=${{matrix.type}}
-DCMAKE_C_COMPILER==${{matrix.compiler}}-${{matrix.version}}
-DCMAKE_CXX_COMPILER==${{matrix.cxx_compiler}}-${{matrix.version}}
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DTGBM_ENABLE_TESTS=ON
-DCMAKE_LINKER_TYPE=LLD
- name: Build project
run: >
cmake
--build cmake_build
--target all
- name: Run tests
run: |
cd cmake_build
(test -t 1 && GTEST_COLOR=1 PYTEST_ADDOPTS="--color=yes" ctest -V) || ctest -V