-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (79 loc) · 2.48 KB
/
build-linux-gcc.yml
File metadata and controls
93 lines (79 loc) · 2.48 KB
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
name: nfx-stringbuilder - Linux GCC
on:
push:
branches: [main]
paths-ignore:
- "**/*.md"
- "LICENSE"
- ".gitignore"
pull_request:
branches: [main]
paths-ignore:
- "**/*.md"
- "LICENSE"
- ".gitignore"
env:
BUILD_TYPE: Release
permissions:
contents: read
jobs:
build-linux-gcc:
runs-on: ubuntu-latest
name: Ubuntu GCC 14
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
submodules: recursive
- name: Cache CMake build
uses: actions/cache@v4
with:
path: |
build
~/.cache/ccache
key: ${{ runner.os }}-gcc14-ninja-${{ hashFiles('**/CMakeLists.txt', 'include/**') }}
restore-keys: |
${{ runner.os }}-gcc14-ninja-
- name: Set up build environment
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake ninja-build gcc-14 g++-14 ccache
- name: Set environment variables
run: |
echo "CC=ccache gcc-14" >> $GITHUB_ENV
echo "CXX=ccache g++-14" >> $GITHUB_ENV
echo "CCACHE_DIR=$HOME/.cache/ccache" >> $GITHUB_ENV
echo "CCACHE_COMPILERCHECK=content" >> $GITHUB_ENV
echo "CCACHE_COMPRESS=true" >> $GITHUB_ENV
echo "CCACHE_MAXSIZE=200M" >> $GITHUB_ENV
- name: Setup ccache
run: |
ccache --zero-stats
ccache --show-config
- name: Configure CMake
run: |
cmake -B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-DNFX_STRINGBUILDER_BUILD_STATIC=ON \
-DNFX_STRINGBUILDER_BUILD_SHARED=ON \
-DNFX_STRINGBUILDER_BUILD_TESTS=ON \
-DNFX_STRINGBUILDER_BUILD_BENCHMARKS=ON \
-DNFX_STRINGBUILDER_BUILD_SAMPLES=ON \
-DNFX_STRINGBUILDER_BUILD_DOCUMENTATION=OFF
- name: Build
run: cmake --build build --parallel
- name: Test
working-directory: build
run: ctest --output-on-failure --parallel
- name: Upload test results on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-results-linux-gcc14
path: |
build/Testing/Temporary/LastTest.log
build/Testing/Temporary/LastTestsFailed.log
retention-days: 7
- name: Show ccache statistics
run: ccache --show-stats