diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 00cd955..f6eb08f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,17 +92,58 @@ jobs: with: toolchain: ${{ matrix.toolchain }} - - name: install Mesa + - name: (linux) install vulkan sdk + if: matrix.os == 'ubuntu-latest' + shell: bash run: | - if [[ $RUNNER_OS == "Linux" ]]; then - sudo add-apt-repository ppa:kisak/kisak-mesa - sudo apt update - sudo apt upgrade - - sudo add-apt-repository ppa:oibaf/graphics-drivers - sudo apt update - sudo apt upgrade - fi + 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-$VULKAN_SDK_VERSION-jammy.list https://packages.lunarg.com/vulkan/$VULKAN_SDK_VERSION/lunarg-vulkan-$VULKAN_SDK_VERSION-jammy.list + + sudo apt-get update + sudo apt install -y vulkan-sdk + - name: (linux) install mesa + if: matrix.os == 'ubuntu-22.04' + shell: bash + run: | + set -e + + curl -L --retry 5 https://github.com/gfx-rs/ci-build/releases/download/$CI_BINARY_BUILD/mesa-$MESA_VERSION-linux-x86_64.tar.xz -o mesa.tar.xz + mkdir mesa + tar xpf mesa.tar.xz -C mesa + + # The ICD provided by the mesa build is hardcoded to the build environment. + # + # We write out our own ICD file to point to the mesa vulkan + cat <<- EOF > icd.json + { + "ICD": { + "api_version": "1.1.255", + "library_path": "$PWD/mesa/lib/x86_64-linux-gnu/libvulkan_lvp.so" + }, + "file_format_version": "1.0.0" + } + EOF + + echo "VK_DRIVER_FILES=$PWD/icd.json" >> "$GITHUB_ENV" + echo "LD_LIBRARY_PATH=$PWD/mesa/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH" >> "$GITHUB_ENV" + echo "LIBGL_DRIVERS_PATH=$PWD/mesa/lib/x86_64-linux-gnu/dri" >> "$GITHUB_ENV" + + # - name: install Mesa + # run: | + # if [[ $RUNNER_OS == "Linux" ]]; then + # sudo add-apt-repository ppa:kisak/kisak-mesa + # sudo apt update + # sudo apt upgrade + # + # sudo add-apt-repository ppa:oibaf/graphics-drivers + # sudo apt update + # sudo apt upgrade + # fi - name: Install Fonts run: |