mirror of
https://github.com/vtil-project/VTIL-Core
synced 2026-08-17 08:23:03 -04:00
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
name: CMake
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
# Skip building pull requests from the same repository
|
|
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [windows-2019, ubuntu-20.04, macos-11]
|
|
env:
|
|
BUILD_TYPE: Release
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install ninja-build tool
|
|
uses: seanmiddleditch/gha-setup-ninja@v3
|
|
|
|
- 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
|
|
|
|
- name: Build
|
|
run: |
|
|
cmake -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
|