Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): disable sccache when secrets not avail #874

Merged
merged 5 commits into from
Oct 16, 2024
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
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ updates:
exclude-patterns:
- "swc_*"
- package-ecosystem: pip
directory: /typegraph
directory: /src/typegraph
schedule:
interval: monthly
groups:
Expand All @@ -35,7 +35,7 @@ updates:
patterns:
- "*"
- package-ecosystem: npm
directory: /website
directory: /docs
schedule:
interval: monthly
groups:
Expand Down
32 changes: 23 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review

Expand All @@ -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:
Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down
Loading