Ignore shadow warnings from mdspan #266
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-20.04 | |
build_type: Release | |
clang_version: 15 | |
cmake_flags: "" | |
cmake_targets: all | |
- name: macOS | |
os: macos-13 | |
build_type: Release | |
clang_version: "" | |
cmake_flags: '-D CMAKE_OSX_ARCHITECTURES="arm64;x86_64"' | |
cmake_targets: all | |
- name: Windows | |
os: windows-latest | |
build_type: Release | |
clang_version: latest | |
cmake_flags: '-D CMAKE_CXX_FLAGS="-march=native"' | |
cmake_targets: all | |
- name: Coverage Native | |
os: ubuntu-22.04 | |
build_type: Debug | |
clang_version: "" | |
cmake_flags: '-D CMAKE_CXX_FLAGS="--coverage -march=native"' | |
cmake_targets: neo_fft_tests | |
- name: Coverage SSE41 | |
os: ubuntu-22.04 | |
build_type: Debug | |
clang_version: "" | |
cmake_flags: '-D CMAKE_CXX_FLAGS="--coverage -march=nehalem"' | |
cmake_targets: neo_fft_tests | |
- name: Coverage SSE2 | |
os: ubuntu-22.04 | |
build_type: Debug | |
clang_version: "" | |
cmake_flags: '-D CMAKE_CXX_FLAGS="--coverage -msse2"' | |
cmake_targets: neo_fft_tests | |
- name: Sanitizers | |
os: ubuntu-20.04 | |
build_type: Debug | |
clang_version: 15 | |
cmake_flags: '-D CMAKE_CXX_FLAGS="-g -fno-omit-frame-pointer -fsanitize=address,undefined -fno-sanitize-recover=all -march=ivybridge"' | |
cmake_targets: neo_fft_tests | |
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: runner.os != 'macOS' && !contains(matrix.name, 'Coverage') | |
uses: egor-tensin/setup-clang@v1 | |
with: | |
version: ${{ matrix.clang_version }} | |
- name: Install ccache | |
uses: hendrikmuhs/ccache-action@main | |
with: | |
key: perceptual-convolution-build-${{ matrix.name }} | |
- name: Print native arch flags (GCC) | |
if: contains(matrix.name, 'Coverage') | |
shell: bash | |
run: gcc -march=native -E -v - </dev/null 2>&1 | grep cc1 | |
- 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 ${{ matrix.cmake_targets }} | |
- name: CTest | |
shell: bash | |
run: ctest --test-dir build -C ${{ matrix.build_type }} --output-on-failure | |
- name: Coverage report | |
if: contains(matrix.name, 'Coverage') | |
shell: bash | |
run: > | |
gcovr | |
--xml-pretty | |
-e ".*_test\.cpp" | |
--exclude-unreachable-branches | |
--exclude-throw-branches | |
-r src/lib | |
-s build | |
-o build/coverage.xml | |
- name: Upload coverage report | |
uses: codecov/codecov-action@v3 | |
if: contains(matrix.name, 'Coverage') | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./build/coverage.xml | |
fail_ci_if_error: true |