-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
show sccache stats update cache from/to config try to optimize dockerfile fix dockerfile fix chef command try to use sccache directory of the gh runner enable debug logs for sccache use build context to mount runner sccache to container sccache fix typo update sccache dir update target destination test test test test test test debug revert dockerfile changes try to cache manually change cache dir Trigger pipeline: test caching remove sccache dir Trigger pipeline: test caching remove uneeded args remove mozilla-actions/sccache-action, it doesn't work anyway Trigger pipeline: test caching docker layers manually set a better cache invalidation policy use cargo.lock for cache key better than toml files Trigger pipeline: local cache should work fix growing cache size issue Trigger pipeline: test after fixing growing cache size try to inject sccache into docker builds change key for docker caching debug sccache add sccache just command debug sccache env vars update rust wrapper env var remove sccache debug logs Trigger pipeline: test latest state include dev-tools dockerfile in creating cache key use cache map Trigger pipeline: test latest state try gha cache after letting gha set env vars automatically Trigger pipeline: test gha cache clean up after gha worked and try warp build cache Trigger pipeline: test gha warpbuild cache
- Loading branch information
Showing
3 changed files
with
38 additions
and
24 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 |
---|---|---|
|
@@ -68,9 +68,22 @@ jobs: | |
driver-opts: | | ||
network=host | ||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected] | ||
- name: Cache sccache | ||
uses: actions/cache@v4 | ||
with: | ||
path: sccache-cache | ||
key: ${{ runner.os }}-sccache-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Inject sccache-cache into Docker | ||
uses: reproducible-containers/buildkit-cache-dance@v3 | ||
with: | ||
cache-map: | | ||
{ | ||
"sccache-cache": "/var/cache/sccache" | ||
} | ||
skip-extraction: ${{ steps.cache.outputs.cache-hit }} | ||
|
||
|
||
- name: Log into GitHub container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
|
@@ -107,7 +120,7 @@ jobs: | |
- name: Build${{inputs.uploadImageAsTarball != true && ' and push ' || ' '}}Docker image | ||
id: build | ||
uses: docker/build-push-action@v5 | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
file: "docker/Dockerfile" | ||
|
@@ -119,13 +132,11 @@ jobs: | |
network: host | ||
build-args: | | ||
CARGO_PROFILE_RELEASE_DEBUG=${{ inputs.debug }} | ||
ACTIONS_CACHE_URL=http://127.0.0.1:49160/ | ||
ACTIONS_RUNTIME_TOKEN | ||
SCCACHE_GHA_ENABLED=true | ||
RESTATE_FEATURES=${{ inputs.features || '' }} | ||
cache-from: type=gha,scope=${{ github.workflow }},url=http://127.0.0.1:49160/ | ||
cache-to: type=gha,mode=max,scope=${{ github.workflow }},url=http://127.0.0.1:49160/ | ||
|
||
SCCACHE_DIR=~/.cache/sccache | ||
cache-from: type=gha,url=http://127.0.0.1:49160/ | ||
cache-to: type=gha,url=http://127.0.0.1:49160/,mode=max | ||
|
||
- name: Save docker image as tar | ||
if: ${{ inputs.uploadImageAsTarball }} | ||
run: | | ||
|
@@ -144,7 +155,7 @@ jobs: | |
# This won't actually build again, it'll just use cache | ||
- name: Push Docker image | ||
if: ${{ inputs.uploadImageAsTarball && github.ref == 'refs/heads/main' }} | ||
uses: docker/build-push-action@v5 | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
file: "docker/Dockerfile" | ||
|
@@ -157,9 +168,8 @@ jobs: | |
network: host | ||
build-args: | | ||
CARGO_PROFILE_RELEASE_DEBUG=${{ inputs.debug }} | ||
ACTIONS_CACHE_URL=http://127.0.0.1:49160/ | ||
ACTIONS_RUNTIME_TOKEN | ||
SCCACHE_GHA_ENABLED=true | ||
RESTATE_FEATURES=${{ inputs.features || '' }} | ||
cache-from: type=gha,scope=${{ github.workflow }},url=http://127.0.0.1:49160/ | ||
cache-to: type=gha,mode=max,scope=${{ github.workflow }},url=http://127.0.0.1:49160/ | ||
SCCACHE_DIR=/sccache-cache | ||
cache-from: type=gha,url=http://127.0.0.1:49160/ | ||
cache-to: type=gha,url=http://127.0.0.1:49160/,mode=max | ||
|
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