Add a semantic versioning checker #4
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: semver-checks | |
on: | |
pull_request: | |
types: [opened, synchronize] | |
env: | |
# | |
# Dependency versioning | |
# from wgpu repo: https://github.com/gfx-rs/wgpu/blob/trunk/.github/workflows/ci.yml | |
# | |
# Sourced from https://vulkan.lunarg.com/sdk/home#linux | |
VULKAN_SDK_VERSION: "1.3.268" | |
# Sourced from https://www.nuget.org/packages/Microsoft.Direct3D.WARP | |
WARP_VERSION: "1.0.8" | |
# Sourced from https://github.com/microsoft/DirectXShaderCompiler/releases | |
# | |
# Must also be changed in shaders.yaml | |
DXC_RELEASE: "v1.7.2308" | |
DXC_FILENAME: "dxc_2023_08_14.zip" | |
# Sourced from https://archive.mesa3d.org/. Bumping this requires | |
# updating the mesa build in https://github.com/gfx-rs/ci-build and creating a new release. | |
MESA_VERSION: "23.3.1" | |
# Corresponds to https://github.com/gfx-rs/ci-build/releases | |
CI_BINARY_BUILD: "build18" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
semver-checks: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Install llvmpipe and lavapipe | |
run: | | |
sudo apt-get update -y -qq | |
sudo add-apt-repository ppa:kisak/kisak-mesa -y | |
sudo apt-get update | |
sudo apt install -y libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers | |
- name: Install Objective-C++ cross-compiler | |
run: | | |
sudo apt install gobjc++-mingw-w64 | |
- name: Install vulkan sdk | |
# from wgpu repo: https://github.com/gfx-rs/wgpu/blob/trunk/.github/workflows/ci.yml | |
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 | |
- name: Install mesa | |
# from wgpu repo: https://github.com/gfx-rs/wgpu/blob/trunk/.github/workflows/ci.yml | |
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: Check semantic versioning violations | |
uses: obi1kenobi/cargo-semver-checks-action@v2 | |