Skip to content

Commit

Permalink
chore: improve linux setup steps
Browse files Browse the repository at this point in the history
- add a step to install the vulkan sdk for linux
- add a step to install mesa for linux with ubuntu-22.04
- remove the previous steps to install mesa
  • Loading branch information
falcucci committed Sep 19, 2024
1 parent 6c77f5a commit 5f3b5d0
Showing 1 changed file with 51 additions and 10 deletions.
61 changes: 51 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down

0 comments on commit 5f3b5d0

Please sign in to comment.