Read and Set block meta information about it's x,y position #1902
Workflow file for this run
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: CMake | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| permissions: | |
| contents: write | |
| pages: write | |
| packages: read | |
| id-token: write | |
| pull-requests: write | |
| jobs: | |
| build: | |
| name: "${{ matrix.configurations.name }} | ${{ matrix.cmake-build-type }}" | |
| runs-on: ubuntu-latest | |
| container: "ghcr.io/fair-acc/gr-digitizers-build-container:latest" | |
| env: | |
| CCACHE_DIR: /home/runner/work/ccache | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| configurations: | |
| - name: Ubuntu gcc 14 | |
| compiler: gcc-14 | |
| cmake-build-type: [ Release, Debug ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Cache ccache | |
| uses: actions/cache@v4 | |
| with: | |
| path: /home/runner/work/ccache | |
| key: ${{ runner.os }}-ccache-${{ matrix.compiler.cc }}-${{ matrix.cmake-build-type }}-${{ hashFiles('CMakeLists.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-ccache- | |
| - name: Configure ccache | |
| run: | | |
| ccache --max-size=12G | |
| ccache --show-stats | |
| - name: Cache fetchContent | |
| uses: actions/cache@v4 | |
| env: | |
| cache-name: cache-fetchContent-cache | |
| with: | |
| path: ${{runner.workspace}}/build/_deps | |
| key: ${{ matrix.configurations.compiler }}-${{ matrix.cmake-build-type }}-${{ hashFiles('CMakeLists.txt') }}-${{ hashFiles('cmake/Dependencies.cmake') }} | |
| - name: Install image comparing tools | |
| shell: bash | |
| run: | | |
| sudo apt update | |
| sudo apt-get -y install imagemagick || true # needed because of packaging errors in the picoscope dpkgs | |
| - name: Configure CMake | |
| shell: bash | |
| env: | |
| CC: gcc-14 | |
| CXX: g++-14 | |
| run: | | |
| $EMSDK_HOME/emsdk activate $EMSDK_VERSION | |
| source $EMSDK_HOME/emsdk_env.sh | |
| cmake -S . -B ../build -DCMAKE_BUILD_TYPE=${{ matrix.cmake-build-type }} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DENABLE_IMGUI_TEST_ENGINE=ON -DEMCMAKE_COMMAND=`which emcmake` | |
| - name: Build | |
| shell: bash | |
| run: | | |
| $EMSDK_HOME/emsdk activate $EMSDK_VERSION | |
| source $EMSDK_HOME/emsdk_env.sh | |
| cmake --build ../build | |
| - name: Install Xvfb | |
| run: ( sudo apt-get update && sudo apt-get install -y xvfb || true ) | |
| - name: execute tests | |
| if: matrix.configurations.compiler != 'gcc-14' || matrix.cmake-build-type != 'Debug' | |
| timeout-minutes: 10 | |
| working-directory: ${{runner.workspace}}/build | |
| shell: bash | |
| env: | |
| XDG_RUNTIME_DIR: /tmp/runtime-dir | |
| SDL_VIDEODRIVER: x11 | |
| SDL_AUDIODRIVER: dummy | |
| run: | | |
| mkdir -p /tmp/runtime-dir | |
| Xvfb :99 -screen 0 1600x1200x24 & | |
| export DISPLAY=:99 | |
| ctest --output-on-failure | |
| - name: execute tests with coverage | |
| if: matrix.configurations.compiler == 'gcc-14' && matrix.cmake-build-type == 'Debug' | |
| timeout-minutes: 10 | |
| working-directory: ${{runner.workspace}}/build | |
| shell: bash | |
| env: | |
| XDG_RUNTIME_DIR: /tmp/runtime-dir | |
| SDL_VIDEODRIVER: x11 | |
| SDL_AUDIODRIVER: dummy | |
| run: | | |
| mkdir -p /tmp/runtime-dir | |
| Xvfb :99 -screen 0 1600x1200x24 & | |
| export DISPLAY=:99 | |
| cmake --build . --target opendigitizer_coverage | |
| # only for Release, as this might generate PR comments (which we don't want to duplicate) | |
| - name: compare captures | |
| if: ${{ github.event_name == 'pull_request' && matrix.cmake-build-type != 'Debug' }} | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| shell: bash | |
| run: | | |
| ./.github/compare_captures.sh ${{ github.event.pull_request.number }} ${{ github.repository }} /__w/opendigitizer/build/reference_captures /__w/opendigitizer/build/captures | |
| - name: Setup Pages | |
| if: matrix.cmake-build-type == 'Release' | |
| uses: actions/configure-pages@v5 | |
| - name: "Fetch cors header workaround" # we're unable to set custom headers on github pages, workaround according to: https://stackoverflow.com/a/68675301 | |
| if: matrix.cmake-build-type == 'Release' | |
| run: | | |
| npm i --save coi-serviceworker | |
| cp node_modules/coi-serviceworker/coi-serviceworker.js ../build/CMakeExternals/Build/ui-wasm/web/ | |
| sed -e "s%</style>%</style><script src=\"coi-serviceworker.js\"></script>%" -i ../build/CMakeExternals/Build/ui-wasm/web/index.html | |
| - name: Upload artifact | |
| if: matrix.cmake-build-type == 'Release' | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: '../build/CMakeExternals/Build/ui-wasm/web/' | |
| - name: Show final ccache stats | |
| run: ccache --show-stats | |
| deploy_pages: | |
| name: Deploy to GitHub Pages | |
| if: ${{ (github.ref_name == 'main' || github.ref_name == 'fixOnlineDemo') && github.event_name == 'push' }} | |
| environment: github-pages | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: "Setup Pages" | |
| uses: actions/configure-pages@v5 | |
| - name: "Deploy to pages" | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |