Skip to content

Commit daf8f18

Browse files
committed
fix
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
1 parent 3577b95 commit daf8f18

2 files changed

Lines changed: 38 additions & 2 deletions

File tree

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,49 @@
11
name: "Setup Prebuild"
2-
description: "Minimal setup for runners with pre-built Rust toolchain, nextest, and sccache"
2+
description: "Fast CI setup — uses pre-installed tools on prebuild AMIs, falls back to full setup-rust otherwise"
3+
4+
inputs:
5+
repo-token:
6+
description: "GitHub token for accessing the repository (typically secrets.GITHUB_TOKEN)"
7+
required: false
8+
default: "${{ github.token }}"
9+
toolchain:
10+
description: "optional override for the toolchain version (e.g. nightly)"
11+
required: false
12+
components:
13+
description: "optional override for the components to install for the step (e.g. clippy, rustfmt, miri)"
14+
default: "clippy, rustfmt"
15+
required: false
16+
targets:
17+
description: "optional targets override (e.g. wasm32-unknown-unknown)"
18+
required: false
19+
enable-sccache:
20+
description: "Should sccache be enabled, true by default."
21+
required: false
22+
default: "true"
323

424
runs:
525
using: "composite"
626
steps:
27+
# --- Prebuild path: tools already installed, just configure sccache ---
728
- name: Configure sccache timeout
29+
if: github.repository == 'vortex-data/vortex' && inputs.enable-sccache == 'true'
830
shell: bash
931
run: |
1032
mkdir -p ~/.config/sccache
1133
echo 'server_startup_timeout_ms = 15000' > ~/.config/sccache/config
1234
1335
- name: Pre-start sccache server
36+
if: github.repository == 'vortex-data/vortex' && inputs.enable-sccache == 'true'
1437
shell: bash
1538
run: sccache --start-server &
39+
40+
# --- Fallback path: full setup for forks ---
41+
- name: Full Rust setup
42+
if: github.repository != 'vortex-data/vortex'
43+
uses: ./.github/actions/setup-rust
44+
with:
45+
repo-token: ${{ inputs.repo-token }}
46+
toolchain: ${{ inputs.toolchain }}
47+
components: ${{ inputs.components }}
48+
targets: ${{ inputs.targets }}
49+
enable-sccache: ${{ inputs.enable-sccache }}

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,9 @@ jobs:
441441
cache-tools: true
442442
- uses: ./.github/actions/setup-prebuild
443443
- name: Install nightly for sanitizer
444-
run: rustup toolchain install $NIGHTLY_TOOLCHAIN --component rust-src rustfmt clippy llvm-tools-preview
444+
run: |
445+
rustup toolchain install $NIGHTLY_TOOLCHAIN
446+
rustup component add --toolchain $NIGHTLY_TOOLCHAIN rust-src rustfmt clippy llvm-tools-preview
445447
- name: Install nextest
446448
uses: taiki-e/install-action@v2
447449
with:

0 commit comments

Comments
 (0)