Skip to content

Update minimum CMake #44

Update minimum CMake

Update minimum CMake #44

Workflow file for this run

name: Github Actions CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: ${{ matrix.name }} ${{ matrix.compiler }} ${{ matrix.build_type }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
compiler: [GCC, Clang]
build_type: [Debug, Release]
include:
- compiler: gcc
c_compiler: gcc
cxx_compiler: g++
gen_metrics: OFF
- compiler: clang
c_compiler: clang
cxx_compiler: clang++
gen_metrics: OFF
- os: macos-latest
name: MacOS
- os: ubuntu-latest
name: Ubuntu
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: lukka/[email protected]
- uses: seanmiddleditch/gha-setup-ninja@v5
- name: Prepare
run: |
python -m pip install --upgrade pip
pip install conan
- name: Configure
run: |
mkdir build
cd build
cmake .. -GNinja -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_C_COMPILER=${{matrix.c_compiler}} -DCMAKE_CXX_COMPILER=${{matrix.cxx_compiler}} -DDLA_GENERATE_METRICS=${{matrix.gen_metrics}} -DDLA_BUILD_TESTS=ON
- name: Build
run: |
cd build
cmake --build .
- name: Metrics Tier 1 Artifact
if: matrix.gen_metrics == true
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }} ${{ matrix.compiler }} ${{ matrix.build_type }} Metrics Tier 1
path: build/metrics/metrics_tier_1.json
- name: Metrics Tier 2 Artifact
if: matrix.gen_metrics == true
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }} ${{ matrix.compiler }} ${{ matrix.build_type }} Metrics Tier 2
path: build/metrics/metrics_tier_2.json
- name: Metrics Tier 3 Artifact
if: matrix.gen_metrics == true
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }} ${{ matrix.compiler }} ${{ matrix.build_type }} Metrics Tier 3
path: build/metrics/tier_3/
- name: Remove old artifacts
uses: c-hive/gha-remove-artifacts@v1
with:
age: '25 year'
skip-recent: 120
- name: Test
run: |
cd build
ctest . --output-on-failure