Skip to content

. e switch to ctest and cmake --build #36

. e switch to ctest and cmake --build

. e switch to ctest and cmake --build #36

name: build
on:
push:
pull_request:
schedule:
- cron: '3 14 1 * *' # <https://crontab.guru/#3_14_1_*_*> - "Once a month"
workflow_dispatch:
jobs:
clang-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: DoozyX/[email protected]
with:
source: '.'
exclude: './lib'
clangFormatVersion: 9
build:
env:
BUILD_PATH: ${{ github.workspace }}/${{ matrix.relative_build_dir_path }}build_space
strategy:
fail-fast: false
matrix:
include:
- job-name: windows-latest
os: windows-latest
generator: '"Visual Studio 17 2022"'
relative_build_dir_path: ''
- job-name: windows-latest (clangcl)
os: windows-latest
generator: '"Visual Studio 17 2022" -T "clangcl"'
relative_build_dir_path: ''
- job-name: ubuntu-latest
os: ubuntu-latest
generator: '"Unix Makefiles"'
relative_build_dir_path: ''
- job-name: ubuntu-18.04-latest
os: ubuntu-latest
generator: '"Ninja"'
relative_build_dir_path: '../'
- job-name: macOS-latest
os: macOS-latest
generator: '"Unix Makefiles"'
relative_build_dir_path: ''
- job-name: macOS-latest-unity
os: macOS-latest
generator: '"Unix Makefiles" -DCMAKE_UNITY_BUILD=yes'
relative_build_dir_path: ''
- job-name: macOS-latest-ninja
os: macOS-latest
generator: '"Ninja"'
relative_build_dir_path: '../'
- job-name: macOS-latest-ninja-unity
os: macOS-latest
generator: '"Ninja" -DCMAKE_UNITY_BUILD=yes'
relative_build_dir_path: ''
runs-on: ${{ matrix.os }}
name: ${{ matrix.job-name }}
steps:
- uses: actions/checkout@master
- uses: seanmiddleditch/gha-setup-ninja@v3
if: contains(matrix.generator, 'Ninja')
- name: configure
run: |
mkdir ${{ env.BUILD_PATH }}
cd ${{ env.BUILD_PATH }}
cmake --version
cmake -G ${{ matrix.generator }} ${{ github.workspace }} -DCMAKE_BUILD_TYPE=Debug
- name: build
run: |
cd ${{ env.BUILD_PATH }}
cmake --build . --parallel 4
- name: test
run: |
cd ${{ env.BUILD_PATH }}
ctest --verbose --output-on-failure -C Debug