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
74 changes: 47 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,19 @@ jobs:
if: needs.changes.outputs.rust == 'true'
runs-on: ubuntu-latest
timeout-minutes: 15
env:
RUSTC_WRAPPER: sccache
SCCACHE_GHA_ENABLED: "true"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: mozilla-actions/sccache-action@v0.0.9
- name: Rust build cache (kache)
uses: kunobi-ninja/kache-action@ad7317540dcdd71c904f7a60a87b620a0c0e67ed # v2.0.0
with:
version: "2.0.0"
cache-executables: "false"
github-cache: "true"
manifest-key: ci-clippy
save-cache: ${{ github.ref == 'refs/heads/main' }}
- name: cargo clippy
run: cargo clippy --workspace --all-targets -j 2 -- -D warnings

Expand All @@ -112,13 +116,17 @@ jobs:
if: needs.changes.outputs.rust == 'true'
runs-on: ubuntu-latest
timeout-minutes: 15
env:
RUSTC_WRAPPER: sccache
SCCACHE_GHA_ENABLED: "true"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: mozilla-actions/sccache-action@v0.0.9
- name: Rust build cache (kache)
uses: kunobi-ninja/kache-action@ad7317540dcdd71c904f7a60a87b620a0c0e67ed # v2.0.0
with:
version: "2.0.0"
cache-executables: "false"
github-cache: "true"
manifest-key: ci-check
save-cache: ${{ github.ref == 'refs/heads/main' }}
- name: cargo check
run: cargo check --workspace --all-targets -j 2

Expand All @@ -128,13 +136,17 @@ jobs:
if: needs.changes.outputs.rust == 'true'
runs-on: ubuntu-latest
timeout-minutes: 15
env:
RUSTC_WRAPPER: sccache
SCCACHE_GHA_ENABLED: "true"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: mozilla-actions/sccache-action@v0.0.9
- name: Rust build cache (kache)
uses: kunobi-ninja/kache-action@ad7317540dcdd71c904f7a60a87b620a0c0e67ed # v2.0.0
with:
version: "2.0.0"
cache-executables: "false"
github-cache: "true"
manifest-key: ci-test
save-cache: ${{ github.ref == 'refs/heads/main' }}
- name: cargo test
run: cargo test --workspace -j 2

Expand All @@ -144,13 +156,17 @@ jobs:
if: needs.changes.outputs.rust == 'true'
runs-on: ubuntu-latest
timeout-minutes: 10
env:
RUSTC_WRAPPER: sccache
SCCACHE_GHA_ENABLED: "true"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: mozilla-actions/sccache-action@v0.0.9
- name: Rust build cache (kache)
uses: kunobi-ninja/kache-action@ad7317540dcdd71c904f7a60a87b620a0c0e67ed # v2.0.0
with:
version: "2.0.0"
cache-executables: "false"
github-cache: "true"
manifest-key: ci-smoke
save-cache: ${{ github.ref == 'refs/heads/main' }}
- name: smoke test
run: make smoke

Expand All @@ -173,15 +189,19 @@ jobs:
if: needs.changes.outputs.rust == 'true'
runs-on: ubuntu-latest
timeout-minutes: 20
env:
RUSTC_WRAPPER: sccache
SCCACHE_GHA_ENABLED: "true"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: mozilla-actions/sccache-action@v0.0.9
- name: Rust build cache (kache)
uses: kunobi-ninja/kache-action@ad7317540dcdd71c904f7a60a87b620a0c0e67ed # v2.0.0
with:
version: "2.0.0"
cache-executables: "false"
github-cache: "true"
manifest-key: ci-xwork
save-cache: ${{ github.ref == 'refs/heads/main' }}
- name: cargo xtask xwork
run: cargo xtask xwork

Expand All @@ -201,13 +221,13 @@ jobs:
run: |
rustup toolchain install
rustc --version
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
- name: Rust build cache (kache)
uses: kunobi-ninja/kache-action@ad7317540dcdd71c904f7a60a87b620a0c0e67ed # v2.0.0
with:
shared-key: xtask-ci
# The tool pins live in gates.rs, so a pin change must miss the cache.
key: ${{ hashFiles('crates/xtask/src/gates.rs') }}
# The pinned tools `cargo xtask tools` builds into .tools/.
cache-directories: .tools
cache-on-failure: true
version: "2.0.0"
cache-executables: "false"
github-cache: "true"
manifest-key: xtask-ci
save-cache: ${{ github.ref == 'refs/heads/main' }}
- name: cargo xtask ci
run: cargo xtask ci
24 changes: 16 additions & 8 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,20 @@ jobs:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 10
env:
RUSTC_WRAPPER: sccache
SCCACHE_GHA_ENABLED: "true"
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: mozilla-actions/sccache-action@v0.0.9
- name: Rust build cache (kache)
uses: kunobi-ninja/kache-action@ad7317540dcdd71c904f7a60a87b620a0c0e67ed # v2.0.0
with:
version: "2.0.0"
cache-executables: "false"
github-cache: "true"
manifest-key: package-signed-commits
save-cache: ${{ github.ref == 'refs/heads/main' }}
- name: cargo xtask verify-signed
env:
GH_TOKEN: ${{ github.token }}
Expand All @@ -84,9 +88,6 @@ jobs:
if: needs.changes.outputs.image == 'true'
runs-on: ubuntu-latest
timeout-minutes: 30
env:
RUSTC_WRAPPER: sccache
SCCACHE_GHA_ENABLED: "true"
permissions:
contents: read
packages: write
Expand All @@ -96,7 +97,14 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-unknown-linux-musl
- uses: mozilla-actions/sccache-action@v0.0.9
- name: Rust build cache (kache)
uses: kunobi-ninja/kache-action@ad7317540dcdd71c904f7a60a87b620a0c0e67ed # v2.0.0
with:
version: "2.0.0"
cache-executables: "false"
github-cache: "true"
manifest-key: package-image
save-cache: ${{ github.ref == 'refs/heads/main' }}
- name: cargo xtask package
run: cargo xtask package
- uses: docker/setup-buildx-action@v3
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/prewarm.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Prewarm

# Fill the sccache store from main so pull requests start from warm compiles.
# Fill the kache store from main so pull requests start from warm compiles.
# Caches written on main are readable by every PR branch; caches written on a PR branch
# are not. GitHub evicts caches unused for 7 days, so a schedule keeps the store warm.

Expand Down Expand Up @@ -28,8 +28,6 @@ env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: "0"
CARGO_NET_RETRY: "10"
RUSTC_WRAPPER: sccache
SCCACHE_GHA_ENABLED: "true"

jobs:
prewarm:
Expand All @@ -42,7 +40,14 @@ jobs:
with:
components: clippy
targets: x86_64-unknown-linux-musl
- uses: mozilla-actions/sccache-action@v0.0.9
- name: Rust build cache (kache)
uses: kunobi-ninja/kache-action@ad7317540dcdd71c904f7a60a87b620a0c0e67ed # v2.0.0
with:
version: "2.0.0"
cache-executables: "false"
github-cache: "true"
manifest-key: prewarm
save-cache: ${{ github.ref == 'refs/heads/main' }}
# Same cargo invocations as ci.yml and package.yml, so the cache keys match.
- name: check
run: cargo check --workspace --all-targets -j 2
Expand All @@ -52,5 +57,3 @@ jobs:
run: cargo test --workspace --no-run -j 2
- name: musl release build
run: cargo build --release -j 2 -p lsc --target x86_64-unknown-linux-musl
- name: sccache stats
run: sccache --show-stats
Loading