-
Notifications
You must be signed in to change notification settings - Fork 717
82 lines (72 loc) · 2.89 KB
/
main.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
name: CI
on:
pull_request:
branches: [ thewarwithin ]
push:
branches: [ thewarwithin ]
paths-ignore:
- 'ActionPriorityLists/**'
- 'SpellDataDump/*.txt'
- 'dbc_extract3/**'
- 'casc_extract/**'
env:
SIMC_PROFILE: profiles/CI.simc
CCACHE_COMPRESS: true # always enable ccache compression
ccache-generation: 0 # bump if you need to "clean" ccache
# For PR, github.sha is the merge commit, workaround for cache hits on spec test workflows
BINARY_CACHE_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
jobs:
ubuntu-clang-build:
name: ubuntu-build-${{ matrix.compiler }}-C++${{ matrix.cppVersion }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
cppVersion: [17]
compiler: [clang++-15]
include:
- compiler: clang++-15
os: ubuntu-22.04
packages: clang-15 lld-15
enable_file_prefix_map: true
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
env: { ccache-prefix: 'ubuntu-${{ matrix.compiler }}-cpp-${{ matrix.cppVersion }}-ccache-${{ env.ccache-generation }}' }
with:
path: ${{ runner.workspace }}/.ccache
key: ${{ env.ccache-prefix }}-${{ github.sha }}
restore-keys: ${{ env.ccache-prefix }}-
- name: Install deps
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev ninja-build ccache ${{ matrix.packages }}
- name: Configure
env:
UBSAN_STRIP_COUNT: "`echo \"${{ runner.workspace }}//\" | grep -o '/' - | wc -l`"
run: cmake -H. -B'${{ runner.workspace }}/b/ninja' -GNinja -DBUILD_GUI=OFF
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_CXX_COMPILER=${{ matrix.compiler }}
-DCMAKE_CXX_FLAGS="-Og ${{ matrix.enable_file_prefix_map && format('-ffile-prefix-map={0}/=/', runner.workspace) || ''}}
-fno-omit-frame-pointer -fsanitize=address,undefined
-fsanitize-undefined-strip-path-components=$UBSAN_STRIP_COUNT"
-DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld -fsanitize=address,undefined"
-DCMAKE_CXX_STANDARD=${{ matrix.cppVersion }}
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- name: Build
env:
CCACHE_BASEDIR: ${{ runner.workspace }}
CCACHE_DIR: ${{ runner.workspace }}/.ccache
CCACHE_MAXSIZE: 256M # full build consumes around ~124, ~2x that to be safe
run: |
ccache -z
ninja -C '${{ runner.workspace }}/b/ninja'
ccache -s
- uses: actions/cache@v4
with:
path: |
${{ runner.workspace }}/b/ninja/simc
profiles
tests
generate_profiles_ci.sh
.git
key: ubuntu-${{ matrix.compiler }}-for_run-${{ env.BINARY_CACHE_SHA }}-cpp-${{ matrix.cppVersion }}