chore(deps): update actions/checkout action to v4 #48
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: Build | |
on: | |
push: | |
paths: | |
- "CMakeLists.txt" | |
- "*.c" | |
- "*.h" | |
- ".github/workflows/build.yml" | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
build: | |
name: Build (${{ matrix.CC }}) | |
runs-on: ubuntu-latest | |
if: ${{ !contains(github.event.head_commit.message, '[ci skip]') || github.event_name == 'workflow_dispatch' }} | |
strategy: | |
fail-fast: true | |
matrix: | |
CC: | |
- gcc | |
- clang | |
steps: | |
- name: Check out source code | |
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 | |
- name: Install dependencies | |
run: sudo apt-get -qq update && sudo apt-get install -y libcap-dev | |
- name: Configure the project | |
run: CC=${{ matrix.CC }} cmake -S . -B build -DCMAKE_BUILD_TYPE=MinSizeRel | |
- name: Build the project | |
run: cmake --build build --config MinSizeRel | |
- name: Smoke test | |
run: ./build/setcap-static |