Skip to content

Harden GitHub Actions #1100

Harden GitHub Actions

Harden GitHub Actions #1100

name: CMake (Ubuntu Linux)
on: [push, pull_request]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
BUILD_TYPE: RelWithDebInfo
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install dependencies
run: sudo apt update -qq && sudo apt install --no-install-recommends -y cmake libgtest-dev libpcsclite-dev
- name: Configure CMake
run: cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -S . -B build
- name: Build
run: cmake --build build --config $BUILD_TYPE -j $(nproc)
- name: Test
run: ctest -V -C $BUILD_TYPE --test-dir build