Skip to content

Move spirv tools

Move spirv tools #72

Workflow file for this run

on:
push:
branches:
- main
pull_request:
# Cancel PR actions on new commits
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
name: CI
jobs:
lint:
name: Lint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: cargo fetch --locked
run: cargo fetch --locked
# make sure all code has been formatted with rustfmt
- name: check rustfmt
run: cargo fmt -- --check --color always
# run clippy to verify we have no warnings
- name: cargo clippy
run: cargo clippy --all-targets --all-features -- -D warnings
test:
name: Test
strategy:
matrix:
os: [ ubuntu-24.04, windows-2022, macOS-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Vulkan SDK
uses: humbletim/[email protected]
with:
version: 1.4.309.0
cache: true
# just need a random command that forces the installation of rust-toolchain
# figure out native target triple while we're at it
- name: install rust-toolchain
run: echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV"
# Fetch dependencies in a separate step to clearly show how long each part
# of the testing takes
- name: cargo fetch --locked
run: cargo fetch --locked --target $TARGET
- run: cargo fetch --locked
- name: cargo test build
run: cargo build --tests --release --all-features
- name: cargo test
run: cargo test --release --all-features
deny-check:
name: cargo-deny
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: EmbarkStudios/cargo-deny-action@v2
publish-check:
name: Publish Check
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: cargo-bins/cargo-binstall@main
- run: cargo binstall cargo-release
- run: cargo fetch --locked
- name: cargo release --workspace
run: cargo release patch --allow-branch=*
# cargo release in workspace root doesn't actually run `publish check` on any crate, do so manually
- name: cargo publish check spirv-tools-sys
run: cargo release patch --allow-branch=* --manifest-path spirv-tools-sys/Cargo.toml
- name: cargo publish check spirv-tools
run: cargo release patch --allow-branch=* --manifest-path spirv-tools/Cargo.toml
defaults:
run:
shell: bash