Update GitHub Actions workflow for build process

This commit is contained in:
dword64 2026-04-01 17:36:24 +02:00 committed by GitHub
parent 86d962d6bb
commit bd2624c634
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,33 +10,37 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-2019, ubuntu-20.04, macos-11]
os: [windows-2022, ubuntu-24.04, macos-14]
env:
BUILD_TYPE: Release
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install ninja-build tool
uses: seanmiddleditch/gha-setup-ninja@v3
- name: Install Ninja (Linux)
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get update
sudo apt-get install -y ninja-build
- name: Install Ninja (macOS)
if: ${{ runner.os == 'macOS' }}
run: brew install ninja
- name: Install Ninja (Windows)
if: ${{ runner.os == 'Windows' }}
run: choco install ninja -y
- name: Enable Developer Command Prompt
if: ${{ runner.os == 'Windows' }}
uses: ilammy/msvc-dev-cmd@v1.7.0
- name: Set up GCC
if: ${{ runner.os == 'Linux' }}
uses: egor-tensin/setup-gcc@v1
with:
version: 11
uses: ilammy/msvc-dev-cmd@v1
- name: Build
run: |
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DVTIL_BUILD_TESTS=ON
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DVTIL_BUILD_TESTS=ON
cmake --build build --config ${{ env.BUILD_TYPE }} --parallel
- name: Test
run: |
ctest --version
cd build
ctest . -C ${{ env.BUILD_TYPE }} --verbose
ctest --test-dir build -C ${{ env.BUILD_TYPE }} --output-on-failure --verbose