-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (70 loc) · 2.05 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
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:
- container: ghcr.io/steinwurf/ubuntu-lts-2404:1.0.0
name: Cmake (GCC) Latest
cxx: g++
cc: gcc
- container: ghcr.io/steinwurf/ubuntu-lts-2404:1.0.0
name: Cmake (Clang) Latest
cxx: clang++
cc: clang
runs-on:
- self-hosted
- docker
- builder
name: ${{ matrix.config.name }}
container:
image: ${{ matrix.config.container }}
options: --user 0:0 --privileged --ulimit core=-1
volumes:
- /home/buildbot/.ssh:/root/.ssh
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
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 }}
- name: CMake Build
working-directory: ${{github.workspace}}/build
run: cmake --build . -j$(((`nproc` + 1) / 2))
- name: CTest
working-directory: ${{github.workspace}}/build
run: ctest -V
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true