Convert more span to mdspan #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [push, pull_request] | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }} | |
cancel-in-progress: true | |
env: | |
CMAKE_BUILD_PARALLEL_LEVEL: 3 | |
HOMEBREW_NO_INSTALL_CLEANUP: 1 | |
MACOSX_DEPLOYMENT_TARGET: 10.15 | |
jobs: | |
build: | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: Linux | |
os: ubuntu-22.04 | |
build_type: Release | |
cmake_flags: '-D CMAKE_CXX_FLAGS="-march=sandybridge -mtune=skylake"' | |
- name: macOS | |
os: macos-13 | |
build_type: Release | |
cmake_flags: '-D CMAKE_OSX_ARCHITECTURES="arm64;x86_64"' | |
- name: Windows | |
os: windows-latest | |
build_type: Release | |
cmake_flags: '-D CMAKE_CXX_FLAGS="-march=sandybridge -mtune=skylake"' | |
- name: Coverage | |
os: ubuntu-22.04 | |
build_type: Debug | |
cmake_flags: '-D CMAKE_CXX_FLAGS="--coverage -march=sandybridge -mtune=skylake"' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
lfs: true | |
- name: Install dependencies (Linux) | |
if: runner.os == 'Linux' | |
run: > | |
sudo apt update && | |
sudo apt install | |
libcurl4-openssl-dev | |
libasound2-dev | |
libx11-dev | |
libxinerama-dev | |
libxext-dev | |
libfreetype6-dev | |
libwebkit2gtk-4.0-dev | |
libglu1-mesa-dev | |
xvfb | |
ninja-build | |
gcovr | |
- name: Install dependencies (macOS) | |
if: runner.os == 'macOS' | |
run: brew install ninja osxutils | |
- name: Install dependencies (Windows) | |
if: runner.os == 'Windows' | |
shell: bash | |
run: choco install ninja ccache | |
- name: Install clang | |
if: matrix.name != 'macOS' && matrix.name != 'Coverage' | |
uses: egor-tensin/setup-clang@v1 | |
- name: Install ccache | |
uses: hendrikmuhs/ccache-action@main | |
with: | |
key: perceptual-convolution-build-${{ matrix.name }} | |
- name: CMake configure | |
shell: bash | |
run: cmake -S . -B build -G Ninja -D CMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ matrix.cmake_flags }} | |
- name: CMake build | |
shell: bash | |
run: cmake --build build --target all | |
- name: CTest | |
shell: bash | |
run: ctest --test-dir build -C ${{ matrix.build_type }} --output-on-failure | |
- name: Coverage report | |
if: matrix.name == 'Coverage' | |
shell: bash | |
run: > | |
gcovr | |
--xml-pretty | |
-e ".*_test\.cpp" | |
--exclude-unreachable-branches | |
-r src/lib | |
-s build | |
-o build/coverage.xml | |
- name: Upload coverage report | |
uses: codecov/codecov-action@v3 | |
if: matrix.name == 'Coverage' | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./build/coverage.xml | |
fail_ci_if_error: true |