Port webgpu_app to render graph #343
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: Linux tests | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| concurrency: | |
| group: linux-${{ github.event_name }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| compiler: [gcc12, clang17, clang19] | |
| build_type: [Debug] | |
| include: | |
| - compiler: gcc12 | |
| CC: "/usr/bin/gcc-12" | |
| CXX: "/usr/bin/g++-12" | |
| - compiler: clang17 | |
| CC: '/usr/bin/clang-17' | |
| CXX: '/usr/bin/clang++-17' | |
| - compiler: clang19 | |
| CC: '/usr/bin/clang-19' | |
| CXX: '/usr/bin/clang++-19' | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| submodules: 'true' | |
| - name: Load CI versions | |
| run: cat .github/ci-versions.env >> "$GITHUB_ENV" | |
| # Do not cache Dawn here. It is fetched, not built, and measured CI timings | |
| # showed no useful speedup from restoring/saving the cache. | |
| - name: Install Linux Dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential ccache ninja-build lld libgl1-mesa-dev libxcb-cursor-dev xorg-dev libx11-xcb-dev libxrandr-dev libxcursor-dev libudev-dev libopenal-dev libflac-dev libvorbis-dev libgl1-mesa-dev libegl1-mesa-dev libdrm-dev libgbm-dev xvfb libxcb-cursor0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 | |
| - name: Install Clang 17 | |
| if: matrix.compiler == 'clang17' | |
| run: | | |
| sudo apt-get install -y clang-17 | |
| - name: Install Clang 19 | |
| if: matrix.compiler == 'clang19' | |
| run: | | |
| wget https://apt.llvm.org/llvm.sh | |
| chmod +x ./llvm.sh | |
| sudo ./llvm.sh 19 | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v4 | |
| with: | |
| version: ${{ env.QT_VERSION }} | |
| host: 'linux' | |
| target: 'desktop' | |
| arch: 'linux_gcc_64' | |
| dir: '${{github.workspace}}/qt' | |
| install-deps: 'true' | |
| modules: ${{ env.QT_MODULES }} | |
| cache: true | |
| - name: Set ccache config | |
| shell: bash | |
| run: | | |
| echo "ALP_CACHE_CONFIG=linux_${{ matrix.compiler }}_${{ matrix.build_type }}" >> "$GITHUB_ENV" | |
| echo "ALP_CACHE_TOOLCHAIN=${{ matrix.compiler }}-qt-${QT_VERSION}" >> "$GITHUB_ENV" | |
| echo "CCACHE_DIR=${{ github.workspace }}/.ccache" >> "$GITHUB_ENV" | |
| echo "CCACHE_BASEDIR=${{ github.workspace }}" >> "$GITHUB_ENV" | |
| echo "CCACHE_COMPRESS=true" >> "$GITHUB_ENV" | |
| echo "CCACHE_COMPILERCHECK=content" >> "$GITHUB_ENV" | |
| echo "CCACHE_MAXSIZE=500M" >> "$GITHUB_ENV" | |
| - name: Cache ccache | |
| uses: actions/cache@v6 | |
| with: | |
| path: ${{ github.workspace }}/.ccache | |
| key: ccache-${{ runner.os }}-${{ env.ALP_CACHE_CONFIG }}-${{ env.ALP_CACHE_TOOLCHAIN }}-v1-${{ github.run_id }}-${{ github.run_attempt }} | |
| restore-keys: | | |
| ccache-${{ runner.os }}-${{ env.ALP_CACHE_CONFIG }}-${{ env.ALP_CACHE_TOOLCHAIN }}-v1- | |
| - name: Debug output | |
| shell: bash | |
| run: | | |
| echo "${{github.workspace}}/qt/Qt/${QT_VERSION}": | |
| ls ${{github.workspace}}/qt/Qt/${QT_VERSION} | |
| echo "===" | |
| echo "${QT_ROOT_DIR}/lib/cmake/Qt6Linguist:" | |
| ls ${QT_ROOT_DIR}/lib/cmake/Qt6Linguist | |
| echo "===" | |
| - name: Configure | |
| env: | |
| CC: ${{ matrix.CC }} | |
| CXX: ${{ matrix.CXX }} | |
| CMAKE_PREFIX_PATH: ${{env.QT_ROOT_DIR}}/lib/cmake | |
| run: > | |
| cmake -G Ninja | |
| -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} | |
| -DALP_ENABLE_ASSERTS=ON | |
| -DALP_ENABLE_ADDRESS_SANITIZER=ON | |
| -DALP_ENABLE_APP_SHUTDOWN_AFTER_60S=ON | |
| -DALP_USE_LLVM_LINKER=ON | |
| -DCMAKE_C_COMPILER_LAUNCHER=ccache | |
| -DCMAKE_CXX_COMPILER_LAUNCHER=ccache | |
| -B ./build | |
| - name: Reset ccache stats | |
| run: ccache --zero-stats | |
| - name: Build | |
| env: | |
| CC: ${{ matrix.CC }} | |
| CXX: ${{ matrix.CXX }} | |
| run: | | |
| cmake --build ./build | |
| - name: Show ccache stats | |
| if: always() | |
| run: ccache --show-stats --verbose | |
| - name: Don't close loaded libraries for better sanitizer output | |
| env: | |
| CC: ${{ matrix.CC }} | |
| CXX: ${{ matrix.CXX }} | |
| run: | | |
| echo "#include <stdio.h>" >> dlclose.c | |
| echo "int dlclose(void*) { return 0; }" >> dlclose.c | |
| $CC --shared dlclose.c -o libdlclose.so | |
| - name: Unittests on Linux | |
| env: | |
| QT_QPA_PLATFORM: offscreen | |
| DISPLAY: :1 | |
| LD_PRELOAD: ./libdlclose.so | |
| LSAN_OPTIONS: suppressions=./misc/sanitizer_suppressions/linux_leak.supp | |
| ASAN_OPTIONS: verify_asan_link_order=0 | |
| # QSG_RENDER_LOOP: basic | |
| run: | | |
| ./build/alp_external/radix/unittests/unittests_radix | |
| ./build/unittests/nucleus/unittests_nucleus | |
| Xvfb :1 -screen 0 1024x768x16 & | |
| sleep 5 | |
| ./build/unittests/gl_engine/unittests_gl_engine | |
| # ./build/app/alpineapp # rendering is not starting, and now it crashes on shutdown (qthread destroyed while running). likely due to the fake opengl/offscreen rendering |