upgrade from rspirv 0.12 to 0.13 #13
This file contains hidden or 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: Release-plz | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| # Release unpublished packages. | |
| release-plz-release: | |
| name: Release-plz release | |
| if: ${{ github.repository_owner == 'rust-gpu' }} | |
| runs-on: ubuntu-latest | |
| environment: release | |
| permissions: | |
| contents: write | |
| pull-requests: read | |
| id-token: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| submodules: true | |
| - &install-rust | |
| name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Run release-plz | |
| uses: release-plz/action@v0.5 | |
| with: | |
| command: release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # Create a PR with the new versions and changelog, preparing the next release. | |
| release-plz-pr: | |
| name: Release-plz PR | |
| if: ${{ github.repository_owner == 'rust-gpu' }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| concurrency: | |
| group: release-plz-${{ github.ref }} | |
| cancel-in-progress: false | |
| steps: | |
| # `persist-credentials: true` so the follow-up step below can push to | |
| # the release PR. See https://release-plz.dev/docs/github/output#example-commit-files-to-the-release-pr | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: true | |
| submodules: true | |
| - *install-rust | |
| - name: Run release-plz | |
| id: release-plz | |
| uses: release-plz/action@v0.5 | |
| with: | |
| command: release-pr | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # The difftest workspace pulls `spirv-std` / `spirv-builder` via path | |
| # deps, so its `Cargo.lock` references their versions. release-plz only | |
| # bumps the root workspace, so we update the difftest lockfile here and | |
| # push it onto the release PR before CI runs against it. | |
| - name: Update difftest Cargo.lock in release PR | |
| if: ${{ steps.release-plz.outputs.prs_created == 'true' }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| PR: ${{ steps.release-plz.outputs.pr }} | |
| # `rust-toolchain.toml` pins nightly; force stable so rustup doesn't | |
| # auto-install ~1GB of nightly + components just to update a lockfile. | |
| RUSTUP_TOOLCHAIN: stable | |
| run: | | |
| set -euo pipefail | |
| pr_number=$(echo "$PR" | jq -r '.number') | |
| gh pr checkout "$pr_number" | |
| cargo update --manifest-path tests/difftests/tests/Cargo.toml \ | |
| -p spirv-std \ | |
| -p spirv-std-macros \ | |
| -p spirv-std-types \ | |
| -p spirv-builder \ | |
| -p rustc_codegen_spirv-types | |
| if ! git diff --quiet tests/difftests/tests/Cargo.lock; then | |
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| git add tests/difftests/tests/Cargo.lock | |
| git commit -m "chore: update difftest Cargo.lock" | |
| git push | |
| fi |