Skip to content

Onezerozero

Onezerozero #272

Workflow file for this run

name: build
on:
push:
branches:
- master
paths-ignore:
- '.vscode/**'
- 'LICENSE'
- 'README.md'
pull_request:
paths-ignore:
- '.vscode/**'
- 'LICENSE'
- 'README.md'
workflow_dispatch:
env:
CTEST_OUTPUT_ON_FAILURE: ON
CTEST_PARALLEL_LEVEL: 2
jobs:
test:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Ubuntu Latest GCC (Release)",
os: ubuntu-latest,
build_type: "Release",
}
- {
name: "Ubuntu 22.04 GCC (Debug)",
os: ubuntu-22.04,
build_type: "Debug",
}
- {
name: "macOS Latest Clang (Release)",
os: macos-latest,
build_type: "Release",
}
- {
name: "Windows Latest (Release)",
os: windows-latest,
build_type: "Release",
}
steps:
- uses: actions/checkout@v4
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
working-directory: ${{github.workspace}}/build
run: cmake ${{ github.workspace }} -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} -Dcpp_channel_build_examples=ON -Dcpp_channel_build_tests=ON
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . --config ${{ matrix.config.build_type }} --target tests
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{ matrix.config.build_type }} --verbose -R channel_test*
- name: Run examples
working-directory: ${{github.workspace}}/build
run: cmake --build . --config ${{ matrix.config.build_type }} --target examples
coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
working-directory: ${{github.workspace}}/build
run: cmake ${{ github.workspace }} -DCMAKE_BUILD_TYPE=Debug -Dcpp_channel_build_tests=ON
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . --config Debug --target tests
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C Debug --verbose -R channel_test11
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
clang-format:
name: Clang Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Clang Format
run: clang-format --dry-run --Werror $(find include -type f)