From ac2ef730ccfadeb0149df5361812efef1032fe36 Mon Sep 17 00:00:00 2001 From: Lucas Meurer Date: Wed, 9 Oct 2024 16:05:03 +0200 Subject: [PATCH] Try ubuntu latest --- .github/workflows/rust.yml | 42 +++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 6674c4bacfd3..ac67ed56419e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -237,13 +237,49 @@ jobs: tests: name: Run tests - # We run the tests on macOS because it will run with a actual GPU - runs-on: macos-latest + strategy: + matrix: + # On macos the tests will run on an actual gpu and on ubuntu using llvmpipe. + os: [macos-latest, ubuntu-latest] + fail-fast: false + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 with: lfs: true + + - name: Add mesa ppa + if: runner.os == 'Linux' + run: sudo add-apt-repository ppa:oibaf/graphics-drivers -y + + - name: (linux) install llvmpipe, lavapipe, vulkan sdk + if: runner.os == 'Linux' + shell: bash + run: | + set -e + + sudo apt-get update -y -qq + + # vulkan sdk + wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add - + sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-noble.list https://packages.lunarg.com/vulkan/lunarg-vulkan-noble.list + + sudo add-apt-repository ppa:kisak/kisak-mesa + + sudo apt-get update + sudo apt install -y libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev vulkan-sdk mesa-vulkan-drivers + + - name: Install packages (Linux) + if: runner.os == 'Linux' + uses: awalsh128/cache-apt-pkgs-action@v1.4.2 + with: + packages: libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev libgtk-3-dev # libgtk-3-dev is used by rfd + version: 1.0 + execute_install_scripts: true + + + - uses: dtolnay/rust-toolchain@master with: toolchain: 1.76.0 @@ -259,5 +295,5 @@ jobs: uses: actions/upload-artifact@v4 if: always() with: - name: test-results + name: test-results-${{ matrix.os }} path: "**/tests/snapshots"