#1747 Upgrade Rust dependencies #4129
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: test | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'Cargo.lock' | |
- '**.rs' | |
- '**.sh' | |
- '**.ps1' | |
- '**.yml' | |
- '**.toml' | |
- '!**.md' | |
- '!LICENSE-APACHE' | |
- '!LICENSE-MIT' | |
pull_request: | |
types: [opened, synchronize] | |
paths: | |
- 'Cargo.lock' | |
- '**.rs' | |
- '**.sh' | |
- '**.ps1' | |
- '**.yml' | |
- '**.toml' | |
- '!**.md' | |
- '!LICENSE-APACHE' | |
- '!LICENSE-MIT' | |
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.280" | |
# Sourced from https://www.nuget.org/packages/Microsoft.Direct3D.WARP | |
WARP_VERSION: "1.0.11" | |
# Sourced from https://github.com/microsoft/DirectXShaderCompiler/releases | |
# | |
# Must also be changed in shaders.yaml | |
DXC_RELEASE: "1.8.2403.2" | |
DXC_FILENAME: "dxc_2024_03_29.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" | |
# Typos version | |
TYPOS_VERSION: "1.21.0" | |
# Grcov version | |
GRCOV_VERSION: "0.8.19" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-2022] | |
# We support both the latest Rust toolchain and the preceding version. | |
rust: [stable] | |
test: ['std'] | |
include: | |
- cache: stable | |
rust: stable | |
- cache: 1-78-0 | |
rust: 1.78.0 | |
- os: windows-2022 | |
wgpu-flags: "DISABLE_WGPU=1" | |
# not used yet, as wgpu tests are disabled on windows for now | |
# see issue: https://github.com/tracel-ai/burn/issues/1062 | |
# auto-graphics-backend-flags: "AUTO_GRAPHICS_BACKEND=dx12";' | |
exclude: | |
# only need to check this once | |
- rust: 1.78.0 | |
test: 'examples' | |
# Do not run no-std tests on macos | |
- os: blaze/macos-14 | |
test: 'no-std' | |
# Do not run no-std tests on Windows | |
- os: windows-2022 | |
test: 'no-std' | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4.1.5 | |
- name: install rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
components: rustfmt, clippy | |
toolchain: ${{ matrix.rust }} | |
- name: caching | |
uses: Swatinem/rust-cache@v2.7.3 | |
with: | |
key: ${{ runner.os }}-${{ matrix.cache }}-${{ matrix.test}}-${{ hashFiles('**/Cargo.toml') }} | |
prefix-key: "v5-rust" | |
# ----------------------------------------------------------------------------------- | |
# BEGIN -- Windows steps disabled as long as DISABLE_WGPU=1 (wgpu tests are disabled) | |
# ----------------------------------------------------------------------------------- | |
# - name: (windows) install dxc | |
# # from wgpu repo: https://github.com/gfx-rs/wgpu/blob/trunk/.github/workflows/ci.yml | |
# if: runner.os == 'Windows' | |
# shell: bash | |
# run: | | |
# set -e | |
# curl.exe -L --retry 5 https://github.com/microsoft/DirectXShaderCompiler/releases/download/$DXC_RELEASE/$DXC_FILENAME -o dxc.zip | |
# 7z.exe e dxc.zip -odxc bin/x64/{dxc.exe,dxcompiler.dll,dxil.dll} | |
# # We need to use cygpath to convert PWD to a windows path as we're using bash. | |
# cygpath --windows "$PWD/dxc" >> "$GITHUB_PATH" | |
# - name: (windows) install warp | |
# # from wgpu repo: https://github.com/gfx-rs/wgpu/blob/trunk/.github/workflows/ci.yml | |
# if: runner.os == 'Windows' | |
# shell: bash | |
# run: | | |
# set -e | |
# # Make sure dxc is in path. | |
# dxc --version | |
# curl.exe -L --retry 5 https://www.nuget.org/api/v2/package/Microsoft.Direct3D.WARP/$WARP_VERSION -o warp.zip | |
# 7z.exe e warp.zip -owarp build/native/amd64/d3d10warp.dll | |
# mkdir -p target/llvm-cov-target/debug/deps | |
# cp -v warp/d3d10warp.dll target/llvm-cov-target/debug/ | |
# cp -v warp/d3d10warp.dll target/llvm-cov-target/debug/deps | |
# - name: (windows) install mesa | |
# # from wgpu repo: https://github.com/gfx-rs/wgpu/blob/trunk/.github/workflows/ci.yml | |
# if: runner.os == 'Windows' | |
# shell: bash | |
# run: | | |
# set -e | |
# curl.exe -L --retry 5 https://github.com/pal1000/mesa-dist-win/releases/download/$MESA_VERSION/mesa3d-$MESA_VERSION-release-msvc.7z -o mesa.7z | |
# 7z.exe e mesa.7z -omesa x64/{opengl32.dll,libgallium_wgl.dll,libglapi.dll,vulkan_lvp.dll,lvp_icd.x86_64.json} | |
# cp -v mesa/* target/llvm-cov-target/debug/ | |
# cp -v mesa/* target/llvm-cov-target/debug/deps | |
# # We need to use cygpath to convert PWD to a windows path as we're using bash. | |
# echo "VK_DRIVER_FILES=`cygpath --windows $PWD/mesa/lvp_icd.x86_64.json`" >> "$GITHUB_ENV" | |
# echo "GALLIUM_DRIVER=llvmpipe" >> "$GITHUB_ENV" | |
# ----------------------------------------------------------------------------------- | |
# END -- Windows steps disabled as long as DISABLE_WGPU=1 (wgpu tests are disabled) | |
# ----------------------------------------------------------------------------------- | |
- name: run checks & tests | |
shell: bash | |
run: DISABLE_WGPU=1 cargo xtask run-checks std |