Reverting to Ubuntu 22.04 #500
Workflow file for this run
This file contains 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: 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-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
# 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 | |
# 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 | |
# 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 | |
- name: Generate Docs | |
run: | | |
cargo doc --no-deps --all-features --workspace | |
- name: Deploy | |
uses: khonsulabs/sync-to-dossier@main | |
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/release' || startsWith(github.ref, 'refs/tags/') | |
with: | |
url: ${{ secrets.DOSSIER_URL }} | |
api-key-id: ${{ secrets.DOSSIER_API_KEY_ID }} | |
api-key: ${{ secrets.DOSSIER_API_KEY }} | |
project: cushy | |
from: target/doc/ | |
to: /${{ github.ref_name }}/docs | |
guide: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Install x11 dependencies for Kludgine | |
run: | | |
sudo apt-get update -y -qq | |
sudo add-apt-repository ppa:oibaf/graphics-drivers -y | |
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 | |
- name: Download mdbook | |
run: | | |
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.36/mdbook-v0.4.36-x86_64-unknown-linux-gnu.tar.gz | tar -xz | |
- name: Install mdbook-variables | |
run: | | |
cargo install mdbook-variables | |
- name: Regenerate Example Images | |
run: | | |
CAPTURE=1 cargo test -p cushy --examples --all-features -r | |
- name: Regenerate Guide Example Images | |
run: | | |
CAPTURE=1 cargo test -p guide-examples --examples -r | |
- name: Build Guide | |
run: | | |
./mdbook build guide | |
- name: Deploy | |
uses: khonsulabs/sync-to-dossier@main | |
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/release' || startsWith(github.ref, 'refs/tags/') | |
with: | |
url: ${{ secrets.DOSSIER_URL }} | |
api-key-id: ${{ secrets.DOSSIER_API_KEY_ID }} | |
api-key: ${{ secrets.DOSSIER_API_KEY }} | |
project: cushy | |
from: target/guide/ | |
to: /${{ github.ref_name }}/guide |