Skip to content

pre-commit

pre-commit #483

Workflow file for this run

---
name: windows
on:
push:
paths-ignore:
- .github/workflows/**
- '!.github/workflows/windows.yml'
pull_request:
paths-ignore:
- .github/workflows/**
- '!.github/workflows/windows.yml'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
name: CMake v3.${{ matrix.cmake_version }}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
cmake_version: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]
steps:
- name: 📥 Checkout
uses: actions/checkout@v4
- name: 📂 Load .env file
if: hashFiles('.github/workflows/.env') != ''
uses: xom9ikk/dotenv@v2.3.0
with:
path: .github/workflows
- name: ⬇️ Setup Visual Studio
uses: ilammy/msvc-dev-cmd@v1.13.0
- name: ⬇️ Setup CMake
uses: lukka/get-cmake@latest
with:
cmakeVersion: ~3.${{ matrix.cmake_version }}
ninjaVersion: ~1
- name: 🔧 Generate with v3.${{ matrix.cmake_version }}
uses: cmake-tools/run-cmake@v0-alpha
with:
generator: Ninja
source_dir: ${{ github.workspace }}/${{ env.CMAKE_SOURCE_PREFIX }}
binary_dir: ${{ env.CMAKE_BINARY_PREFIX }}
variables: |
CMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }}
- name: 🧪 Test
run: ctest -C ${{ env.CMAKE_BUILD_TYPE }} --output-on-failure
working-directory: ${{ env.CMAKE_BINARY_PREFIX }}