From d40ed8f8743a0f59bcc09736e226dd4d98356e44 Mon Sep 17 00:00:00 2001 From: Joey Yandle Date: Wed, 18 Nov 2026 04:34:44 +0100 Subject: [PATCH] Migrate CI off stacks-sbtc/actions to upstream actions, pinned by SHA --- .github/workflows/ci.yml | 66 ++++++++++++++++++++++++++++------- .github/workflows/publish.yml | 28 +++++++++++++-- .github/workflows/static.yml | 8 ++--- 3 files changed, 83 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c2786c2f..5ffbf2a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,11 +19,18 @@ jobs: steps: - name: Checkout Repository id: checkout_repository - uses: stacks-sbtc/actions/checkout@505c42b153ba2ac261c276e96bc5dc7b68d61039 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Setup Rust id: setup_rust - uses: stacks-sbtc/actions/setup-rust-toolchain@505c42b153ba2ac261c276e96bc5dc7b68d61039 + uses: actions-rust-lang/setup-rust-toolchain@a188e68d0fd2bd36ad51dccb2b07ba6e75105f30 # v2.0.1 + with: + # Set explicitly rather than inherited: v1 defaulted rustflags to + # "-D warnings", v2 defaults it to "" and denies via + # CARGO_BUILD_WARNINGS instead, which needs Cargo >= 1.91. Pinning + # the mechanism keeps the gate identical across action versions. + rustflags: "-D warnings" + build-warnings: "" - name: Cargo Check id: cargo_check @@ -36,11 +43,14 @@ jobs: steps: - name: Checkout Repository id: checkout_repository - uses: stacks-sbtc/actions/checkout@505c42b153ba2ac261c276e96bc5dc7b68d61039 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Setup Rust id: setup_rust - uses: stacks-sbtc/actions/setup-rust-toolchain@505c42b153ba2ac261c276e96bc5dc7b68d61039 + uses: actions-rust-lang/setup-rust-toolchain@a188e68d0fd2bd36ad51dccb2b07ba6e75105f30 # v2.0.1 + with: + rustflags: "-D warnings" + build-warnings: "" - name: Cargo Test id: cargo_test @@ -54,13 +64,15 @@ jobs: steps: - name: Checkout Repository id: checkout_repository - uses: stacks-sbtc/actions/checkout@505c42b153ba2ac261c276e96bc5dc7b68d61039 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Setup Rust id: setup_rust - uses: stacks-sbtc/actions/setup-rust-toolchain@505c42b153ba2ac261c276e96bc5dc7b68d61039 + uses: actions-rust-lang/setup-rust-toolchain@a188e68d0fd2bd36ad51dccb2b07ba6e75105f30 # v2.0.1 with: components: rustfmt + rustflags: "-D warnings" + build-warnings: "" - name: Cargo Fmt id: cargo_fmt @@ -73,32 +85,60 @@ jobs: steps: - name: Checkout Repository id: checkout_repository - uses: stacks-sbtc/actions/checkout@505c42b153ba2ac261c276e96bc5dc7b68d61039 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Setup Rust id: setup_rust - uses: stacks-sbtc/actions/setup-rust-toolchain@505c42b153ba2ac261c276e96bc5dc7b68d61039 + uses: actions-rust-lang/setup-rust-toolchain@a188e68d0fd2bd36ad51dccb2b07ba6e75105f30 # v2.0.1 with: components: clippy + rustflags: "-D warnings" + build-warnings: "" - name: Cargo Clippy id: cargo_clippy run: | cargo clippy --all-targets --all-features -- -D warnings -A clippy::op-ref -A clippy::needless-range-loop + package: + name: package + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + id: checkout_repository + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - name: Setup Rust + id: setup_rust + uses: actions-rust-lang/setup-rust-toolchain@a188e68d0fd2bd36ad51dccb2b07ba6e75105f30 # v2.0.1 + with: + rustflags: "-D warnings" + build-warnings: "" + + # Exercises the same packaging and verify-build that `cargo publish` + # performs, without needing the crates.io environment or a token. This + # is where mistakes in required-features, [[bin]] targets or `exclude` + # surface, so it gates every PR rather than waiting for a release tag. + - name: Cargo Publish Dry Run + id: cargo_publish_dry_run + run: | + cargo publish --dry-run + doc: permissions: contents: read - pages: write runs-on: ubuntu-latest steps: - name: Checkout Repository id: checkout_repository - uses: stacks-sbtc/actions/checkout@505c42b153ba2ac261c276e96bc5dc7b68d61039 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Setup Rust id: setup_rust - uses: stacks-sbtc/actions/setup-rust-toolchain@505c42b153ba2ac261c276e96bc5dc7b68d61039 + uses: actions-rust-lang/setup-rust-toolchain@a188e68d0fd2bd36ad51dccb2b07ba6e75105f30 # v2.0.1 + with: + rustflags: "-D warnings" + build-warnings: "" - name: Install LaTeX id: install_latex @@ -110,14 +150,14 @@ jobs: - name: Upload PDF id: upload_pdf - uses: stacks-sbtc/actions/upload-artifact@505c42b153ba2ac261c276e96bc5dc7b68d61039 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: wsts.pdf path: wsts.pdf - name: Upload Website id: upload_website - uses: stacks-sbtc/actions/upload-artifact@505c42b153ba2ac261c276e96bc5dc7b68d61039 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: website path: ./target/doc/ diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1c52cab3..47b3e974 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,6 +5,19 @@ on: tags: - "v[0-9]+.[0-9]+.[0-9]+" + # Lets the publish path be exercised without a tag. This workflow had never + # run before, so a release tag would otherwise be both its first execution + # and a real upload at the same time. A dispatch with dry_run left at true + # covers checkout, toolchain install, the environment approval gate and + # secret injection, with the upload disabled. + workflow_dispatch: + inputs: + dry_run: + description: "Package and verify only; do not upload to crates.io" + type: boolean + required: false + default: true + permissions: contents: read @@ -15,14 +28,25 @@ jobs: steps: - name: Checkout Repository id: checkout_repository - uses: stacks-sbtc/actions/checkout@505c42b153ba2ac261c276e96bc5dc7b68d61039 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Setup Rust id: setup_rust - uses: stacks-sbtc/actions/setup-rust-toolchain@505c42b153ba2ac261c276e96bc5dc7b68d61039 + uses: actions-rust-lang/setup-rust-toolchain@a188e68d0fd2bd36ad51dccb2b07ba6e75105f30 # v2.0.1 + with: + rustflags: "-D warnings" + build-warnings: "" + + # Always runs, including on a real release, so a packaging failure stops + # the job before anything is uploaded. + - name: Cargo Publish Dry Run + id: cargo_publish_dry_run + run: | + cargo publish --dry-run - name: Cargo Publish id: cargo_publish + if: ${{ github.event_name == 'push' || !inputs.dry_run }} env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} run: | diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index dcf4b1c1..51a47b5f 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -30,11 +30,11 @@ jobs: steps: - name: Checkout Repository id: checkout_repository - uses: stacks-sbtc/actions/checkout@505c42b153ba2ac261c276e96bc5dc7b68d61039 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Setup Pages id: setup_pages - uses: stacks-sbtc/actions/github-pages/configure-pages@505c42b153ba2ac261c276e96bc5dc7b68d61039 + uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0 - name: Install LaTeX id: install_latex @@ -46,10 +46,10 @@ jobs: - name: Upload Artifact id: upload_artifact - uses: stacks-sbtc/actions/github-pages/upload-pages-artifact@ed353a33594a2fa97ea6702d838e4a935cce374d + uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 with: path: './target/doc/' - name: Deploy to GitHub Pages id: deploy_pages - uses: stacks-sbtc/actions/github-pages/deploy-pages@505c42b153ba2ac261c276e96bc5dc7b68d61039 + uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1