Skip to content

Commit

Permalink
chore: use sccache (#2183)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx authored May 25, 2024
1 parent 262fa2e commit 70f4b95
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
DRY_RUN: ${{ startsWith(github.event.ref, 'refs/tags/v') && '0' || '1' }}
RUSTC_WRAPPER: sccache
SCCACHE_ENDPOINT: minio.jdx.dev
SCCACHE_BUCKET: sccache
SCCACHE_REGION: auto
SCCACHE_S3_NO_CREDENTIALS: ${{ secrets.MINIO_AWS_ACCESS_KEY_ID && '0' || '1' }}
AWS_ACCESS_KEY_ID: ${{ secrets.MINIO_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.MINIO_AWS_SECRET_ACCESS_KEY }}

jobs:
build-tarball:
Expand Down Expand Up @@ -70,6 +77,7 @@ jobs:
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_ID_APPLICATION_CERTS_P12 }}
p12-password: ${{ secrets.APPLE_DEVELOPER_ID_APPLICATION_CERTS_P12_PASS }}
- uses: actions/checkout@v4
- uses: mozilla-actions/[email protected]
- uses: actions/cache@v4
with:
path: ~/.cargo/bin/zipsign
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ env:
MISE_TRUSTED_CONFIG_PATHS: ${{ github.workspace }}
MISE_EXPERIMENTAL: 1
RUST_BACKTRACE: 1
RUSTC_WRAPPER: sccache
SCCACHE_ENDPOINT: minio.jdx.dev
SCCACHE_BUCKET: sccache
SCCACHE_REGION: auto
SCCACHE_S3_NO_CREDENTIALS: ${{ secrets.MINIO_AWS_ACCESS_KEY_ID && '0' || '1' }}
AWS_ACCESS_KEY_ID: ${{ secrets.MINIO_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.MINIO_AWS_SECRET_ACCESS_KEY }}

permissions:
pull-requests: write
Expand All @@ -32,6 +39,7 @@ jobs:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.RTX_GITHUB_BOT_TOKEN || github.token }}
- uses: mozilla-actions/[email protected]
- uses: actions-rust-lang/setup-rust-toolchain@v1
with: { toolchain: stable, components: rustfmt }
- uses: taiki-e/install-action@v2
Expand All @@ -40,6 +48,7 @@ jobs:
- run: |
cargo build --all-features
echo "$PWD/target/debug" >> "$GITHUB_PATH"
- run: ${SCCACHE_PATH} --show-stats
- run: mise install
- run: mise x -- cargo nextest run --all-features
- run: cargo deny check
Expand Down Expand Up @@ -77,6 +86,7 @@ jobs:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.RTX_GITHUB_BOT_TOKEN || github.token }}
- uses: mozilla-actions/[email protected]
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
{ toolchain: nightly, components: "rustfmt, clippy", rustflags: "" }
Expand Down Expand Up @@ -115,6 +125,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: mozilla-actions/[email protected]
- uses: Swatinem/rust-cache@v2
with:
shared-key: coverage
Expand Down

0 comments on commit 70f4b95

Please sign in to comment.