Skip to content

Commit

Permalink
Disable CI caching in merge group. (#151)
Browse files Browse the repository at this point in the history
Helps bring the CI in sync with the latest Linebender standard.
  • Loading branch information
xStrom authored Oct 31, 2024
1 parent 09f7e6d commit de87a46
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,22 @@ env:
# For no_std checks we target x86_64-unknown-none, because this target doesn't support std
# and as such will error out if our dependency tree accidentally tries to use std.
# https://doc.rust-lang.org/stable/rustc/platform-support/x86_64-unknown-none.html
#
# We don't save caches in the merge-group cases, because those caches will never be re-used (apart
# from the very rare cases where there are multiple PRs in the merge queue).
# This is because GitHub doesn't share caches between merge queues and the main branch.

name: CI

on:
pull_request:
merge_group:
# We run on push, even though the commit is the same as when we ran in merge_group.
# This allows the cache to be primed.
# See https://github.com/orgs/community/discussions/66430
push:
branches:
- main

jobs:
fmt:
Expand Down Expand Up @@ -82,6 +92,8 @@ jobs:

- name: restore cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name != 'merge_group' }}

- name: install stable toolchain
uses: dtolnay/rust-toolchain@master
Expand Down Expand Up @@ -116,6 +128,8 @@ jobs:

- name: restore cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name != 'merge_group' }}

- name: install stable toolchain
uses: dtolnay/rust-toolchain@master
Expand Down Expand Up @@ -146,6 +160,8 @@ jobs:

- name: restore cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name != 'merge_group' }}

- name: install stable toolchain
uses: dtolnay/rust-toolchain@master
Expand All @@ -166,6 +182,8 @@ jobs:

- name: restore cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name != 'merge_group' }}

- name: install msrv toolchain
uses: dtolnay/rust-toolchain@master
Expand Down Expand Up @@ -195,6 +213,8 @@ jobs:

- name: restore cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name != 'merge_group' }}

- name: install msrv toolchain
uses: dtolnay/rust-toolchain@master
Expand All @@ -221,6 +241,8 @@ jobs:

- name: restore cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name != 'merge_group' }}

- name: install nightly toolchain
uses: dtolnay/rust-toolchain@nightly
Expand Down

0 comments on commit de87a46

Please sign in to comment.