Skip to content

chore: extract composite action for CI setup, selective mise installs#1387

Open
brucearctor wants to merge 2 commits into
temporalio:mainfrom
brucearctor:feat/mise-composite
Open

chore: extract composite action for CI setup, selective mise installs#1387
brucearctor wants to merge 2 commits into
temporalio:mainfrom
brucearctor:feat/mise-composite

Conversation

@brucearctor

Copy link
Copy Markdown
Contributor

Summary

Extract the repeated 4-step CI setup pattern into a reusable composite action and add selective mise tool installation per job.

PR 2 of 3 — depends on #1386. See #1383 for the full effort.

Changes

.github/actions/setup/action.yml (new)

Composite action encapsulating:

  1. dtolnay/rust-toolchain (stable via rust-toolchain.toml)
  2. jdx/mise-action (with configurable install_args)
  3. Set PROTOC env var
  4. Swatinem/rust-cache (with cache-bin: false)

Inputs: mise-install-args, rust-cache-key, save-cache

per-pr.yml — refactor all 9 jobs

Each job now uses:

- uses: ./.github/actions/setup
  with:
    mise-install-args: protoc  # only what this job needs

Selective installs by job:

Job Tools
7 jobs (build-and-lint, test, integ-tests, cloud-tests, docker-integ, c-bridge, examples*) protoc only
msrv protoc cargo:cargo-msrv
wasm-workflow-tests protoc cargo:cargo-component
examples protoc temporal

heavy.yml — same refactor

Reduces per-pr.yml from ~325 lines to ~248 lines (-24%).

Depends on #1386
Ref #1383

- Add temporal 1.7.2, cargo-component 0.21.1, cargo-msrv 0.19.3
  to mise.toml (versions pinned per 2-week minimum age policy)
- Remove redundant 'rustup component add rustfmt clippy' (2 places)
  Already declared in rust-toolchain.toml components
- Remove 'cargo install cargo-msrv' (now via mise)
- Remove 'cargo install --locked cargo-component' (now via mise)
- Remove 'temporalio/setup-temporal' action (now via mise)
- Add missing 'cache-bin: false' to wasm-workflow-tests rust-cache
- Remove dead 'submodules: recursive' (3 places, no submodules exist)

Closes temporalio#1383
…alls

Extract the repeated 4-step setup pattern (rust-toolchain, mise-action,
Set PROTOC, rust-cache) into .github/actions/setup/action.yml.

All 10 CI jobs across per-pr.yml and heavy.yml now use the composite
action with selective mise installs via 'mise-install-args':
  - 7 jobs: protoc only
  - msrv: protoc + cargo-msrv
  - wasm-workflow-tests: protoc + cargo-component
  - examples: protoc + temporal

This avoids installing all mise tools in every job and reduces
per-pr.yml from ~330 lines to ~250 lines.
@brucearctor brucearctor force-pushed the feat/mise-composite branch from 6fd19ec to b27a43d Compare July 9, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant