diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f3e8200fe..bca063ca9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: @@ -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/sccache-action@v0.0.4 - uses: actions/cache@v4 with: path: ~/.cargo/bin/zipsign diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index da77aff9c..784a8d741 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 @@ -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/sccache-action@v0.0.4 - uses: actions-rust-lang/setup-rust-toolchain@v1 with: { toolchain: stable, components: rustfmt } - uses: taiki-e/install-action@v2 @@ -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 @@ -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/sccache-action@v0.0.4 - uses: actions-rust-lang/setup-rust-toolchain@v1 with: { toolchain: nightly, components: "rustfmt, clippy", rustflags: "" } @@ -115,6 +125,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + - uses: mozilla-actions/sccache-action@v0.0.4 - uses: Swatinem/rust-cache@v2 with: shared-key: coverage