-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (78 loc) · 2.37 KB
/
linux_cmake.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
name: Linux Cmake
'on':
workflow_dispatch:
inputs:
preparation_commands:
description: "Commands to run to prepare the build"
required: false
type: string
default: ''
extra_resolve_options:
description: Extra Resolve Options
required: false
schedule:
- cron: 0 1 * * *
push:
branches:
- master
pull_request:
env:
EXTRA_RESOLVE_OPTIONS: ${{ github.event.inputs.extra_resolve_options }}
jobs:
docker_builds:
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
config:
- name: Cmake (GCC) Latest
cxx: g++
cc: gcc
cxxflags: ''
env:
- name: Cmake (Clang) Latest
cxx: clang++
cc: clang
cxxflags: ''
env:
- name: Clang Address Sanitizer Latest
cxx: clang++
cc: clang
cxxflags: '-fsanitize=address -fno-omit-frame-pointer -g'
env:
runner: ubuntu-current
- name: Clang Thread Sanitizer Latest
CXX: clang++
cc: clang
cxxflags: '-fsanitize=thread -fPIE -g'
env: TSAN_OPTIONS="suppressions=../tsan_suppression.txt"
runner: ubuntu-current
runs-on:
- self-hosted
- vm
- ubuntu-current
name: ${{ matrix.config.name }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Preparation Commands
if: inputs.preparation_commands != ''
run: ${{ inputs.preparation_commands }}
- name: CMake Cleanup
run: cmake -E remove_directory build
- name: CMake Setup
run: cmake -E make_directory build
- name: CMake Configure
uses: nick-fields/retry@v3
env:
GIT_SSH_COMMAND: "${{ 'ssh -i /opt/actions-runner/.ssh/id_25519 -o IdentitiesOnly=yes' }}"
with:
max_attempts: 3
timeout_minutes: 15
command: cd build && cmake ../ -DSTEINWURF_RESOLVE_OPTIONS="--git_protocol=git@ $EXTRA_RESOLVE_OPTIONS" -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DCMAKE_CXX_FLAGS="${{ matrix.config.cxxflags }}" -GNinja
- name: CMake Build
working-directory: ${{github.workspace}}/build
run: cmake --build . -j$(( ( $(nproc) + 1 ) / 2 )) --config Debug
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true