Skip to content

Commit f63939a

Browse files
authored
Merge pull request #2644 from rust-lang/tshepang/ci
ci: avoid sembr getting rebuilt on every push
2 parents b0ca60a + b138492 commit f63939a

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
BASE_SHA: ${{ github.event.pull_request.base.sha }}
2323
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2424
steps:
25-
- uses: actions/checkout@v4
25+
- uses: actions/checkout@v5
2626
with:
2727
# linkcheck needs the base commit.
2828
fetch-depth: 0
@@ -83,8 +83,18 @@ jobs:
8383
git commit -m "Deploy ${GITHUB_SHA} to gh-pages"
8484
git push --quiet -f "https://x-token:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}" HEAD:gh-pages
8585
86+
- name: Cache sembr build
87+
uses: actions/cache@v4
88+
with:
89+
path: |
90+
~/.cargo/registry/index/
91+
~/.cargo/registry/cache/
92+
~/.cargo/git/db/
93+
ci/sembr/target/
94+
key: sembr-${{ hashFiles('ci/sembr/Cargo.lock') }}
95+
8696
- name: Check if files comply with semantic line breaks
8797
continue-on-error: true
8898
run: |
8999
# using split_inclusive that uses regex feature that uses an unstable feature
90-
RUSTC_BOOTSTRAP=1 cargo run --manifest-path ci/sembr/Cargo.toml src
100+
RUSTC_BOOTSTRAP=1 cargo run --release --manifest-path ci/sembr/Cargo.toml src

.github/workflows/date-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
steps:
1717
- name: Checkout repo
18-
uses: actions/checkout@v4
18+
uses: actions/checkout@v5
1919

2020
- name: Ensure Rust is up-to-date
2121
run: |

0 commit comments

Comments
 (0)