Linux Cmake #226
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |