-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Refactor actions cache to be build on main #20144
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
base: main
Are you sure you want to change the base?
Changes from 3 commits
52534ab
f893744
2e56807
4ea76db
ab2d4a2
fb82c60
e504480
c433a7d
ca0c083
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,19 @@ jobs: | |
- name: Disable audio | ||
# Disable audio through a patch. on github m1 runners, audio timeouts after 15 minutes | ||
run: git apply --ignore-whitespace tools/example-showcase/disable-audio.patch | ||
- uses: actions/cache/restore@v4 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have a ton of copy-pasted cache code so every adjustment or fix has to touch a lot of places and you're bound to miss one at some point. I strongly suggest we create a composite action for that, which could be done directly in this repo, in |
||
with: | ||
# key won't match, will rely on restore-keys | ||
key: ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}- | ||
restore-keys: | | ||
${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}- | ||
${{ runner.os }}-stable-- | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
- name: Run examples | ||
run: | | ||
for example in .github/example-run/*.ron; do | ||
|
@@ -84,16 +97,20 @@ jobs: | |
run: | | ||
sudo add-apt-repository ppa:kisak/turtle -y | ||
sudo apt-get install --no-install-recommends libxkbcommon-x11-0 xvfb libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers | ||
- uses: actions/cache@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: actions/cache/restore@v4 | ||
with: | ||
# key won't match, will rely on restore-keys | ||
key: ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}- | ||
restore-keys: | | ||
${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}- | ||
${{ runner.os }}-stable-- | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
key: ${{ runner.os }}-cargo-run-examples-${{ hashFiles('**/Cargo.toml') }} | ||
- uses: dtolnay/rust-toolchain@stable | ||
- name: Run examples | ||
run: | | ||
for example in .github/example-run/*.ron; do | ||
|
@@ -143,6 +160,19 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: actions/cache/restore@v4 | ||
with: | ||
# key won't match, will rely on restore-keys | ||
key: ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}- | ||
restore-keys: | | ||
${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}- | ||
${{ runner.os }}-stable-- | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
- name: Run examples | ||
shell: bash | ||
run: | | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a nit: I would document that these have to follow the keys in
update-caches.yml