forked from fastbuild/fastbuild
-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (84 loc) · 3.1 KB
/
Linux.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
name: Linux CI
on: [push, pull_request]
defaults:
run:
shell: bash
working-directory: Code
jobs:
linux-ci:
strategy:
fail-fast: false
matrix:
include:
- cfg: Build & Tests
gcc: 10
clang: 12
os: ubuntu-20.04
- cfg: ASan
gcc: 10
clang: 12
os: ubuntu-20.04
- cfg: MSan
gcc: 10
clang: 12
os: ubuntu-20.04
can-fail: true
- cfg: TSan
gcc: 10
clang: 12
os: ubuntu-20.04
can-fail: true
name: Linux (${{ matrix.cfg }}, GCC ${{ matrix.gcc }}, Clang ${{ matrix.clang }})
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.can-fail || false }}
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/DownloadFBuild
- name: Configure fbuild.bff
env:
GCC: gcc-${{ matrix.gcc }}
GXX: g++-${{ matrix.gcc }}
CLANG: clang-${{ matrix.clang }}
CLANGXX: clang++-${{ matrix.clang }}
run: |
for x in ${GCC} ${GXX} $(${GCC} -print-prog-name=cc1) $(${GCC} -print-prog-name=cc1plus) ${CLANG} ${CLANGXX}; do
echo $x; which $x && readlink -f $(which $x)
echo
done
${GCC} --version
${CLANG} --version
# Inject "#define CI_BUILD" into root configs to activate CI logic.
sed -i -e "1i\\
#define CI_BUILD
" fbuild.bff Tools/FBuild/FBuildTest/Data/testcommon.bff
# Put full paths to GCC binaries into config files.
sed -i -e "
s:GCC_BINARY:$(which ${GCC}):
s:GXX_BINARY:$(which ${GXX}):
s:CC1_BINARY:$(${GCC} -print-prog-name=cc1):
s:CC1PLUS_BINARY:$(${GCC} -print-prog-name=cc1plus):
" ../External/SDK/GCC/Linux/GCC_CI.bff
# Put full paths to Clang binaries into config files.
sed -i -e "
s:CLANG_BINARY:$(which ${CLANG}):
s:CLANGXX_BINARY:$(which ${CLANGXX}):
" ../External/SDK/Clang/Linux/Clang_CI.bff
- name: Build
if: ${{ startsWith(matrix.cfg, 'Build') }}
run: ${FBUILD_PATH} -nostoponerror -summary All-x64{,Clang}Linux-{Debug,Profile,Release}
- name: Tests
# -j1 on CI nodes avoids timeouts (CI nodes have only 2 cores)
if: ${{ matrix.cfg == 'Build & Tests' }}
run: ${FBUILD_PATH} -nostoponerror -j1 -summary Tests
- name: ASan
if: ${{ matrix.cfg == 'ASan' }}
run: ${FBUILD_PATH} -nostoponerror -summary {CoreTest,FBuildTest}-RunTest-x64ClangLinux-ASan
- name: MSan
if: ${{ matrix.cfg == 'MSan' }}
run: ${FBUILD_PATH} -nostoponerror -summary {CoreTest,FBuildTest}-RunTest-x64ClangLinux-MSan
- name: TSan
if: ${{ matrix.cfg == 'TSan' }}
run: ${FBUILD_PATH} -nostoponerror -summary {CoreTest,FBuildTest}-RunTest-x64ClangLinux-TSan
- name: Build (NoUnity)
if: ${{ startsWith(matrix.cfg, 'Build') }}
run: ${FBUILD_PATH} -nostoponerror -summary -nounity -clean All-x64{,Clang}Linux-Debug