Adding Colorblind filters (#8) #128
This file contains hidden or 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: C/C++ CI | |
| on: | |
| push: | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| #ubuntu-latest, macos-latest, windows-latest] | |
| include: | |
| - os: windows-latest | |
| triplet: x64-windows | |
| - os: ubuntu-latest | |
| triplet: x64-linux | |
| # - os: macos-latest | |
| # triplet: x64-osx | |
| continue-on-error: true | |
| env: | |
| VCPKG_BINARY_SOURCES: 'clear;x-gha,readwrite' | |
| steps: | |
| - name: Set OS environment variable in lowercase letters | |
| run: echo "CURRENT_OS=$(echo $RUNNER_OS | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV | |
| shell: bash | |
| - uses: actions/checkout@v4 | |
| - name: Install packages | |
| if: runner.os == 'Linux' | |
| run: sudo apt-get update && sudo apt-get install -y autoconf-archive automake libxtst-dev bison gperf libgles2-mesa-dev libxrandr-dev libxcursor-dev libxdamage-dev libxinerama-dev nasm autoconf automake libtool pkg-config libltdl-dev | |
| - if: runner.os == 'macOS' | |
| run: brew install nasm | |
| - uses: lukka/get-cmake@v3.26.0 | |
| - name: Set up vcpkg | |
| uses: lukka/run-vcpkg@v11 | |
| with: | |
| vcpkgGitCommitId: 4c4abc2e8727221ede31021349386dac674309b0 | |
| - name: Run CMake consuming CMakePreset.json and run vcpkg to build packages | |
| uses: lukka/run-cmake@v10 | |
| with: | |
| configurePreset: ${{ env.CURRENT_OS }}-release | |
| configurePresetAdditionalArgs: "['-DBUILD_EXAMPLE_APP=ON','-DBUILD_TESTS=ON']" | |
| buildPreset: ${{ env.CURRENT_OS }}-release | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-artifacts-${{ env.CURRENT_OS }} | |
| path: | | |
| bin/build/${{ env.CURRENT_OS }}-release/example | |
| bin/build/${{ env.CURRENT_OS }}-release/test/Iris.Tests | |
| bin/build/${{ env.CURRENT_OS }}-release/test/AddressSanitizer.Tests | |
| bin/build/${{ env.CURRENT_OS }}-release/CTestTestfile.cmake | |
| - name: Upload vcpkg logs on fail | |
| if: ${{ failure() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: vckpg-fail-logs | |
| path: | | |
| D:\a\fonttik\fonttik\bin\build\windows-release\vcpkg_installed\vcpkg\blds\opencv4\*.log | |
| retention-days: 1 | |
| test: | |
| needs: build | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| #ubuntu-latest, macos-latest, windows-latest] | |
| include: | |
| - os: windows-latest | |
| triplet: x64-windows | |
| - os: ubuntu-latest | |
| triplet: x64-linux | |
| # - os: macos-latest | |
| # triplet: x64-osx | |
| continue-on-error: true | |
| if: github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == 'refs/heads/main') | |
| steps: | |
| - name: Set environment variable in lowercase letters | |
| run: echo "CURRENT_OS=$(echo $RUNNER_OS | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV | |
| shell: bash | |
| - uses: actions/checkout@v4 | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: build-artifacts-${{ env.CURRENT_OS }} | |
| path: bin/build/${{ env.CURRENT_OS }}-release | |
| - name: Set permissions | |
| if: runner.os == 'linux' || runner.os == 'macOS' | |
| run: | | |
| if [ "$RUNNER_OS" == "linux" ]; then | |
| sudo apt-get update && sudo apt-get install -y libegl1-mesa && sudo chmod +x bin/build/linux-release/test/Iris.Tests/iris_tests | |
| elif [ "$RUNNER_OS" == "macOS" ]; then | |
| chmod 755 bin/build/macos-release/test/Iris.Tests/iris_tests | |
| fi | |
| shell: bash | |
| - name: Test | |
| run: | | |
| ctest --preset test-${{ env.CURRENT_OS }} | |