Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 53 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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/
28 changes: 26 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Loading