Skip to content

Commit

Permalink
Updating CI from wgpu
Browse files Browse the repository at this point in the history
At some point the old steps started failing, this seems to be the new
set of packages the wgpu project is using.
  • Loading branch information
ecton committed Jan 5, 2025
1 parent d385a7f commit 31883e5
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 9 deletions.
48 changes: 44 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,59 @@ name: Docs

on: [push]

env:
# Sourced from https://github.com/gfx-rs/wgpu/blob/trunk/.github/workflows/ci.yml
VULKAN_SDK_VERSION: "1.3.290"
MESA_VERSION: "24.2.3"
CI_BINARY_BUILD: "build19"

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install x11 dependencies for Kludgine
# Sourced from https://github.com/gfx-rs/wgpu/blob/trunk/.github/workflows/ci.yml
- name: install vulkan sdk
shell: bash
run: |
set -e
sudo apt-get update -y -qq
sudo add-apt-repository ppa:oibaf/graphics-drivers -y
# 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-get install -y \
libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers libdbus-1-dev pkg-config
sudo apt install -y vulkan-sdk
# Sourced from https://github.com/gfx-rs/wgpu/blob/trunk/.github/workflows/ci.yml
- name: install mesa
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"
- uses: dtolnay/rust-toolchain@stable

Expand Down
41 changes: 36 additions & 5 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,50 @@ jobs:
sudo docker rmi $(docker image ls -aq) || true
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL || true
- name: Install x11 dependencies for Kludgine
# Sourced from https://github.com/gfx-rs/wgpu/blob/trunk/.github/workflows/ci.yml
- name: install vulkan sdk
if: matrix.os == 'ubuntu-latest'
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-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list
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
# install dependencies
sudo apt-get update
sudo apt-get install -y \
libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers libdbus-1-dev pkg-config
sudo apt install -y vulkan-sdk
# Sourced from https://github.com/gfx-rs/wgpu/blob/trunk/.github/workflows/ci.yml
- name: install mesa
if: matrix.os == 'ubuntu-latest'
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"
- uses: dtolnay/rust-toolchain@stable
with:
Expand Down

0 comments on commit 31883e5

Please sign in to comment.