Skip to content

Commit

Permalink
Merge pull request rust-lang#4178 from tgross35/ci-caching
Browse files Browse the repository at this point in the history
 ci: Add caching
  • Loading branch information
tgross35 authored Dec 7, 2024
2 parents fc3234f + af7e126 commit 9b88158
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,20 @@ jobs:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
run: ./ci/install-rust.sh

# FIXME(ci): These `du` statements are temporary for debugging cache
- name: Target size before restoring cache
run: du -sh target | sort -k 2 || true
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.os }}-${{ matrix.toolchain }}
- name: Target size after restoring cache
run: du -sh target | sort -k 2 || true

- name: Execute build.sh
run: ./ci/verify-build.sh
- name: Target size after job completion
run: du -sh target | sort -k 2

test_tier1:
name: Test tier1
Expand Down Expand Up @@ -81,6 +93,9 @@ jobs:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
run: ./ci/install-rust.sh
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}
- name: Run natively
if: "!matrix.docker"
run: ./ci/run.sh ${{ matrix.target }}
Expand Down Expand Up @@ -132,6 +147,9 @@ jobs:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
run: ./ci/install-rust.sh
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}
- name: Execute run-docker.sh
run: ./ci/run-docker.sh ${{ matrix.target }}

Expand Down

0 comments on commit 9b88158

Please sign in to comment.