Skip to content

Harden GitHub Actions #663

Harden GitHub Actions

Harden GitHub Actions #663

name: CMake (Fedora Linux)
on: [push, pull_request]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 120
continue-on-error: ${{ matrix.container == 'fedora:rawhide' }}
strategy:
matrix:
container: ['fedora:latest', 'fedora:rawhide']
build_type: [Release, RelWithDebInfo]
container:
image: ${{ matrix.container }}
steps:
- name: Install dependencies
run: dnf install -y --setopt=install_weak_deps=False git gcc-c++ cmake gtest-devel openssl-devel pcsc-lite-devel
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Configure CMake
run: cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -S . -B build
- name: Build
run: cmake --build build --config ${{ matrix.build_type }} -j $(nproc)
- name: Test
run: ctest -V -C ${{ matrix.build_type }} --test-dir build