Skip to content

Bump actions/checkout from 5 to 6 #172

Bump actions/checkout from 5 to 6

Bump actions/checkout from 5 to 6 #172

Workflow file for this run

name: CMake build and test
on:
push:
paths-ignore:
- 'docs/**'
- '**/*.md'
- '**/*.txt'
- '**/.clang-*'
- '**/.gitignore'
- '**/LICENSE*'
- '**/README*'
pull_request:
paths-ignore:
- 'docs/**'
- '**/*.md'
- '**/*.txt'
- '**/.clang-*'
- '**/.gitignore'
- '**/LICENSE*'
- '**/README*'
env:
BUILD_DIR: build
BUILD_TYPE: RelWithDebInfo
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- windows-latest
- macos-latest
- ubuntu-latest
generators:
- "Ninja"
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 1
- uses: ./.github/actions/install-dependencies
- name: Configure and build windows
if: runner.os == 'Windows'
shell: pwsh
run: |
.\packaging\windows\Enter-VsDevShell.ps1
cmake `
-S . `
-B "${{ env.BUILD_DIR }}" `
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} `
-G "${{ matrix.generators }}" `
; if (-not $?) { Get-Content ./build/vcpkg_installed/vcpkg/issue_body.md; exit 1 }
cmake --build "${{ env.BUILD_DIR }}" --config ${{ env.BUILD_TYPE }}
- name: Configure and build macos or ubuntu
if: runner.os == 'macOS' || runner.os == 'Linux'
shell: bash
run: |
cmake \
-S . \
-B "${{ env.BUILD_DIR }}" \
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-G "${{ matrix.generators }}" \
|| (cat ./build/vcpkg_installed/vcpkg/issue_body.md && exit 1)
cmake --build "${{ env.BUILD_DIR }}" --config ${{ env.BUILD_TYPE }}
- name: Run tests
shell: bash
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
CPU_COUNT=$(sysctl -n hw.ncpu)
else
CPU_COUNT=$(nproc)
fi
cd ${{ env.BUILD_DIR }} && ctest -C ${{ env.BUILD_TYPE }} --output-on-failure -j $CPU_COUNT