-
Notifications
You must be signed in to change notification settings - Fork 23
168 lines (143 loc) · 4.83 KB
/
ubuntu.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
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
name: 🐧 • CI
on:
push:
branches: [ 'main' ]
paths:
- '**/*.hpp'
- '**/*.cpp'
- '**/*.cmake'
- '**/CMakeLists.txt'
- 'libs/**'
- '.github/workflows/ubuntu.yml'
- '!bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp'
pull_request:
branches: [ 'main' ]
paths:
- '**/*.hpp'
- '**/*.cpp'
- '**/*.cmake'
- '**/CMakeLists.txt'
- 'libs/**'
- '.github/workflows/ubuntu.yml'
- '!bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp'
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
defaults:
run:
shell: bash
env:
Z3_VERSION: 4.10.0
jobs:
build_and_test:
strategy:
matrix:
os: [ ubuntu-20.04, ubuntu-22.04 ]
compiler: [ g++-10, g++-11, g++-12, clang++-10, clang++-11, clang++-12 ]
exclude:
- os: ubuntu-20.04
compiler: g++-11
- os: ubuntu-20.04
compiler: g++-12
- os: ubuntu-22.04
compiler: clang++-10
include:
- os: ubuntu-22.04
compiler: clang++-13
- os: ubuntu-22.04
compiler: clang++-14
- os: ubuntu-22.04
compiler: clang++-15
- os: ubuntu-20.04
compiler: g++-10
cppstandard: -DCMAKE_CXX_STANDARD=20
cppname: C++20
name: 🐧 ${{matrix.os}} with ${{matrix.compiler}} ${{matrix.cppname}}
runs-on: ${{matrix.os}}
steps:
- name: Install libraries and the respective compiler
run: sudo apt-get update && sudo apt-get install -yq libtbb-dev ${{matrix.compiler}}
- name: Clone Repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: '${{matrix.os}}-${{matrix.compiler}}'
variant: ccache
save: true
max-size: 10G
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10.x'
cache: 'pip'
- name: Install pip packages
uses: BSFishy/pip-action@v1
with:
requirements: ${{github.workspace}}/libs/mugen/requirements.txt
- name: Setup mold
uses: rui314/setup-mold@v1
- name: Setup Z3 Solver
id: z3
uses: cda-tum/setup-z3@v1
with:
version: ${{env.Z3_VERSION}}
platform: linux
architecture: x64
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
# Build and test pipeline for Debug mode
- name: Create Build Environment (Debug)
run: cmake -E make_directory ${{github.workspace}}/build_debug
- name: Configure CMake (Debug)
working-directory: ${{github.workspace}}/build_debug
run: >
cmake ${{github.workspace}} ${{matrix.cppstandard}}
-DCMAKE_CXX_COMPILER=${{matrix.compiler}}
-DCMAKE_BUILD_TYPE=Debug
-DFICTION_ENABLE_UNITY_BUILD=ON
-DFICTION_ENABLE_PCH=ON
-DFICTION_CLI=ON
-DFICTION_TEST=ON
-DFICTION_BENCHMARK=OFF
-DFICTION_EXPERIMENTS=ON
-DFICTION_Z3=ON
-DFICTION_ENABLE_MUGEN=ON
-DFICTION_PROGRESS_BARS=OFF
-DFICTION_WARNINGS_AS_ERRORS=OFF
-DMOCKTURTLE_EXAMPLES=OFF
- name: Build (Debug)
working-directory: ${{github.workspace}}/build_debug
run: cmake --build . --config Debug -j4
- name: Test (Debug)
working-directory: ${{github.workspace}}/build_debug
run: ctest -C Debug --verbose --output-on-failure --repeat until-pass:3 --parallel 4
# Build and test pipeline for Release mode
- name: Create Build Environment (Release)
run: cmake -E make_directory ${{github.workspace}}/build_release
- name: Configure CMake (Release)
working-directory: ${{github.workspace}}/build_release
run: >
cmake ${{github.workspace}} ${{matrix.cppstandard}}
-DCMAKE_CXX_COMPILER=${{matrix.compiler}}
-DCMAKE_BUILD_TYPE=Release
-DFICTION_ENABLE_UNITY_BUILD=ON
-DFICTION_ENABLE_PCH=ON
-DFICTION_CLI=ON
-DFICTION_TEST=ON
-DFICTION_BENCHMARK=OFF
-DFICTION_EXPERIMENTS=ON
-DFICTION_Z3=ON
-DFICTION_ENABLE_MUGEN=ON
-DFICTION_PROGRESS_BARS=OFF
-DFICTION_WARNINGS_AS_ERRORS=OFF
-DMOCKTURTLE_EXAMPLES=OFF
- name: Build (Release)
working-directory: ${{github.workspace}}/build_release
run: cmake --build . --config Release -j4
- name: Test (Release)
working-directory: ${{github.workspace}}/build_release
run: ctest -C Release --verbose --output-on-failure --repeat until-pass:3 --parallel 4