Skip to content

Python cleanup

Python cleanup #274

Workflow file for this run

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 Clang
os: ubuntu-20.04
build_type: Release
clang_version: 15
cmake_flags: ""
cmake_targets: all
- name: Linux GCC
os: ubuntu-22.04
build_type: Debug
clang_version: ""
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
- 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="/arch:AVX2"'
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
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 == 'Linux Clang'
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: Setup Visual Studio
if: runner.os == 'Windows'
uses: egor-tensin/vs-shell@v2
with:
arch: x64
- 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
-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