-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ci): disable sccache when secrets not avail (#874)
- Makes sccache optional so PRs from dependabot and forks can still run the test suite. - Increases sccache allotment to 50g. --------- Signed-off-by: Yohe-Am <[email protected]>
- Loading branch information
Showing
2 changed files
with
25 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ on: | |
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- ready_for_review | ||
|
||
|
@@ -20,18 +21,17 @@ env: | |
GHJK_ENV: "ci" | ||
RUST_BACKTRACE: "full" | ||
DENO_DIR: deno-dir | ||
RUSTC_WRAPPER: "sccache" | ||
# used by ghjk | ||
# TODO: add logic to setup-ghjk | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
DOCKER_BUILD_NO_SUMMARY: true | ||
SCCACHE_BUCKET: "metacache" | ||
SCCACHE_ENDPOINT: "https://s3.pub1.infomaniak.cloud" | ||
SCCACHE_REGION: "us-east-1" | ||
SCCACHE_S3_USE_SSL: "true" | ||
SCCACHE_CACHE_SIZE: "30G" | ||
SCCACHE_CACHE_SIZE: "50G" | ||
AWS_ACCESS_KEY_ID: ${{ secrets.SCCACHE_AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.SCCACHE_AWS_SECRET_ACCESS_KEY }} | ||
# used by ghjk | ||
# TODO: add logic to setup-ghjk | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
DOCKER_BUILD_NO_SUMMARY: true | ||
|
||
jobs: | ||
changes: | ||
|
@@ -71,7 +71,11 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dsherret/rust-toolchain-file@v1 | ||
- uses: mozilla-actions/[email protected] | ||
- if: ${{ env.AWS_ACCESS_KEY_ID != '' }} | ||
name: Setup sccache secrets | ||
run: echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV | ||
- if: ${{ env.AWS_ACCESS_KEY_ID != '' }} | ||
uses: mozilla-actions/[email protected] | ||
- uses: metatypedev/setup-ghjk@318209a9d215f70716a4ac89dbeb9653a2deb8bc | ||
- shell: bash | ||
run: | | ||
|
@@ -111,7 +115,11 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dsherret/rust-toolchain-file@v1 | ||
- uses: mozilla-actions/[email protected] | ||
- if: ${{ env.AWS_ACCESS_KEY_ID != '' }} | ||
name: Setup sccache secrets | ||
run: echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV | ||
- if: ${{ env.AWS_ACCESS_KEY_ID != '' }} | ||
uses: mozilla-actions/[email protected] | ||
- uses: metatypedev/setup-ghjk@318209a9d215f70716a4ac89dbeb9653a2deb8bc | ||
with: | ||
# temporary fix | ||
|
@@ -223,7 +231,11 @@ jobs: | |
with: | ||
detached: true | ||
- uses: dsherret/rust-toolchain-file@v1 | ||
- uses: mozilla-actions/[email protected] | ||
- if: ${{ env.AWS_ACCESS_KEY_ID != '' }} | ||
name: Setup sccache secrets | ||
run: echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV | ||
- if: ${{ env.AWS_ACCESS_KEY_ID != '' }} | ||
uses: mozilla-actions/[email protected] | ||
# - name: Cache deno dir | ||
# uses: actions/cache@v4 | ||
# with: | ||
|
@@ -245,6 +257,8 @@ jobs: | |
cache-disable: true | ||
- shell: bash | ||
run: | | ||
# the big run | ||
# we don't want bash sub shells to do ghjk_reload | ||
# TODO: consider disabling ghjk_reload on non-interactive shells | ||
# by default | ||
|