From 0014c05705d0540b240ab3829c5e67ff6c3b373e Mon Sep 17 00:00:00 2001 From: firestar99 Date: Tue, 7 Apr 2026 13:36:10 +0200 Subject: [PATCH 1/5] release-plz: remove `cargo release` configuration --- .github/workflows/rust-ci.yml | 2 -- release.toml | 14 -------------- spirv-tools-sys/CHANGELOG.md | 4 ---- spirv-tools/CHANGELOG.md | 4 ---- 4 files changed, 24 deletions(-) delete mode 100644 release.toml diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml index 386456c..f5ab4ac 100644 --- a/.github/workflows/rust-ci.yml +++ b/.github/workflows/rust-ci.yml @@ -103,8 +103,6 @@ jobs: - 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 diff --git a/release.toml b/release.toml deleted file mode 100644 index 18dba89..0000000 --- a/release.toml +++ /dev/null @@ -1,14 +0,0 @@ -# You should just need to run this to do a release of both crates: -# $ cargo release - -pre-release-commit-message = "Release {{version}}" -tag-message = "Release `{{crate_name}}` {{version}}" -allow-branch = ["main"] -shared-version = true -pre-release-replacements = [ - { file = "CHANGELOG.md", search = "Unreleased", replace = "{{version}}" }, - { file = "CHANGELOG.md", search = "\\.\\.\\.HEAD", replace = "...{{tag_name}}" }, - { file = "CHANGELOG.md", search = "ReleaseDate", replace = "{{date}}" }, - { file = "CHANGELOG.md", search = "", replace = "\n## [Unreleased] - ReleaseDate" }, - { file = "CHANGELOG.md", search = "", replace = "\n[Unreleased]: https://github.com/rust-gpu/spirv-tools-rs/compare/{{tag_name}}...HEAD" }, -] diff --git a/spirv-tools-sys/CHANGELOG.md b/spirv-tools-sys/CHANGELOG.md index d1978f4..16dc9ac 100644 --- a/spirv-tools-sys/CHANGELOG.md +++ b/spirv-tools-sys/CHANGELOG.md @@ -1,12 +1,9 @@ - - # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - ## [Unreleased] - ReleaseDate ## [0.13.2] - 2026-02-16 ## [0.13.1] - 2026-02-12 @@ -15,7 +12,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [0.12.1] - 2025-07-17 ## [0.12.0] - 2025-06-15 - [Unreleased]: https://github.com/rust-gpu/spirv-tools-rs/compare/spirv-tools-sys-v0.13.2...HEAD [0.13.2]: https://github.com/rust-gpu/spirv-tools-rs/compare/spirv-tools-sys-v0.13.1...spirv-tools-sys-v0.13.2 [0.13.1]: https://github.com/rust-gpu/spirv-tools-rs/compare/spirv-tools-sys-v0.13.0...spirv-tools-sys-v0.13.1 diff --git a/spirv-tools/CHANGELOG.md b/spirv-tools/CHANGELOG.md index 87769ff..a30f755 100644 --- a/spirv-tools/CHANGELOG.md +++ b/spirv-tools/CHANGELOG.md @@ -1,12 +1,9 @@ - - # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - ## [Unreleased] - ReleaseDate ## [0.13.2] - 2026-02-16 - [PR#26](https://github.com/Rust-GPU/spirv-tools-rs/pull/26) never skip C++ compile on clippy, [caused issues downstream](https://github.com/Rust-GPU/cargo-gpu/issues/140) @@ -108,7 +105,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Added initial implementation, which includes the assembler, validator, and most of the optimizer, which meets the current needs of rust-gpu. - [Unreleased]: https://github.com/rust-gpu/spirv-tools-rs/compare/spirv-tools-v0.13.2...HEAD [0.13.2]: https://github.com/rust-gpu/spirv-tools-rs/compare/spirv-tools-v0.13.1...spirv-tools-v0.13.2 [0.13.1]: https://github.com/rust-gpu/spirv-tools-rs/compare/spirv-tools-v0.13.0...spirv-tools-v0.13.1 From e1f153da2919ad93d54c361227c2e899f26255cf Mon Sep 17 00:00:00 2001 From: firestar99 Date: Tue, 7 Apr 2026 13:36:10 +0200 Subject: [PATCH 2/5] release-plz: setup release-plz with manually written changelog --- .github/workflows/release-plz.yml | 57 +++++++++++++++++++++++++++++++ .release-plz.toml | 4 +++ spirv-tools-sys/CHANGELOG.md | 1 + spirv-tools/CHANGELOG.md | 1 + 4 files changed, 63 insertions(+) create mode 100644 .github/workflows/release-plz.yml create mode 100644 .release-plz.toml diff --git a/.github/workflows/release-plz.yml b/.github/workflows/release-plz.yml new file mode 100644 index 0000000..9b75249 --- /dev/null +++ b/.github/workflows/release-plz.yml @@ -0,0 +1,57 @@ +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 + permissions: + contents: write + pull-requests: read + steps: + - &checkout + 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 }} + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_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: + - *checkout + - *install-rust + - name: Run release-plz + uses: release-plz/action@v0.5 + with: + command: release-pr + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/.release-plz.toml b/.release-plz.toml new file mode 100644 index 0000000..917497a --- /dev/null +++ b/.release-plz.toml @@ -0,0 +1,4 @@ +[changelog] +body = """ +## [{{ version }}]{%- if release_link -%}({{ release_link }}){% endif %} - {{ timestamp | date(format="%Y-%m-%d") }}\n +""" diff --git a/spirv-tools-sys/CHANGELOG.md b/spirv-tools-sys/CHANGELOG.md index 16dc9ac..1ad88fe 100644 --- a/spirv-tools-sys/CHANGELOG.md +++ b/spirv-tools-sys/CHANGELOG.md @@ -1,4 +1,5 @@ # Changelog + All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), diff --git a/spirv-tools/CHANGELOG.md b/spirv-tools/CHANGELOG.md index a30f755..ef9058c 100644 --- a/spirv-tools/CHANGELOG.md +++ b/spirv-tools/CHANGELOG.md @@ -1,4 +1,5 @@ # Changelog + All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), From 6bce6fe0d5b61a9e1defe2e566eb7ccc7dcf4971 Mon Sep 17 00:00:00 2001 From: firestar99 Date: Tue, 7 Apr 2026 15:52:48 +0200 Subject: [PATCH 3/5] release plz: `allow_dirty = true` to work around ignored commited files in spirv-tools submodule --- .release-plz.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.release-plz.toml b/.release-plz.toml index 917497a..3820c03 100644 --- a/.release-plz.toml +++ b/.release-plz.toml @@ -1,3 +1,8 @@ +[workspace] +# The folder `./spirv-tools-sys/spirv-tools/build_overrides` in the spirv-tools submodule is `.gitignore`-ed by the +# pattern `/build*/`, even though it contains commited files, which release-plz is complaining about. +allow_dirty = true + [changelog] body = """ ## [{{ version }}]{%- if release_link -%}({{ release_link }}){% endif %} - {{ timestamp | date(format="%Y-%m-%d") }}\n From 3d9975c7beb7cbf089ef08f4b1efeccab36ec6a1 Mon Sep 17 00:00:00 2001 From: firestar99 Date: Tue, 7 Apr 2026 16:45:28 +0200 Subject: [PATCH 4/5] release plz: dry-run in ci --- .github/workflows/rust-ci.yml | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml index f5ab4ac..21fb202 100644 --- a/.github/workflows/rust-ci.yml +++ b/.github/workflows/rust-ci.yml @@ -93,27 +93,29 @@ jobs: submodules: true - uses: EmbarkStudios/cargo-deny-action@v2 - publish-check: - name: Publish Check - runs-on: ubuntu-22.04 + release-plz-dry-run: + name: Release-plz dry-run + runs-on: ubuntu-latest + permissions: {} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: + ref: ${{ github.head_ref }} + fetch-depth: 0 + persist-credentials: false submodules: true - - uses: cargo-bins/cargo-binstall@main - - run: cargo binstall cargo-release - - run: cargo fetch --locked - # 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 + - name: Run release-plz + uses: release-plz/action@v0.5 + with: + dry_run: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This allows us to have a single job we can branch protect on, rather than needing # to update the branch protection rules when the test matrix changes test_success: runs-on: ubuntu-24.04 - needs: [lint, test, deny-check, publish-check] + needs: [lint, test, deny-check, release-plz-dry-run] # Hack for buggy GitHub Actions behavior with skipped checks: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks if: ${{ always() }} steps: @@ -123,7 +125,7 @@ jobs: [[ "${{ needs.lint.result }}" == "success" ]] || exit 1 [[ "${{ needs.test.result }}" == "success" ]] || exit 1 [[ "${{ needs.deny-check.result }}" == "success" ]] || exit 1 - [[ "${{ needs.publish-check.result }}" == "success" ]] || exit 1 + [[ "${{ needs.release-plz-dry-run.result }}" == "success" ]] || exit 1 defaults: run: From 56454d21cb79b0d4e7f30aea57c89f88c68a52ce Mon Sep 17 00:00:00 2001 From: firestar99 Date: Wed, 8 Apr 2026 11:56:34 +0200 Subject: [PATCH 5/5] changelog: write changelog for 1.13.3 release --- spirv-tools/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spirv-tools/CHANGELOG.md b/spirv-tools/CHANGELOG.md index ef9058c..7c5fa11 100644 --- a/spirv-tools/CHANGELOG.md +++ b/spirv-tools/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] - ReleaseDate +- [PR#28](https://github.com/Rust-GPU/spirv-tools-rs/pull/28) fix `CXX=clang++` failing to build, and don't error on warnings + ## [0.13.2] - 2026-02-16 - [PR#26](https://github.com/Rust-GPU/spirv-tools-rs/pull/26) never skip C++ compile on clippy, [caused issues downstream](https://github.com/Rust-GPU/cargo-gpu/issues/140)