Skip to content

Linux Cmake

Linux Cmake #1421

Workflow file for this run

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