Skip to content

Commit

Permalink
Add caching for downloading compiler-rt
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross35 committed May 24, 2024
1 parent 4868089 commit 4065fc9
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on: [push, pull_request]
env:
RUSTDOCFLAGS: -Dwarnings
RUSTFLAGS: -Dwarnings
RUST_LLVM_VERSION: 18.0-2024-02-13
RUST_COMPILER_RT_ROOT: ./compiler-rt

jobs:
test:
Expand Down Expand Up @@ -115,12 +117,18 @@ jobs:
path: /tmp/.buildx-cache
key: ${{ matrix.target }}-buildx-${{ github.sha }}
restore-keys: ${{ matrix.target }}-buildx-


- name: Cache compiler-rt
id: cache-compiler-rt
uses: actions/cache@v4
with:
path: compiler-rt
key: ${{ runner.os }}-compiler-rt-${{ env.RUST_LLVM_VERSION }}
- name: Download compiler-rt reference sources
if: steps.cache-compiler-rt.outputs.cache-hit != 'true'
run: |
curl -L -o code.tar.gz https://github.com/rust-lang/llvm-project/archive/rustc/18.0-2024-02-13.tar.gz
tar xzf code.tar.gz --strip-components 1 llvm-project-rustc-18.0-2024-02-13/compiler-rt
echo RUST_COMPILER_RT_ROOT=./compiler-rt >> $GITHUB_ENV
curl -L -o code.tar.gz "https://github.com/rust-lang/llvm-project/archive/rustc/${RUST_LLVM_VERSION}.tar.gz"
tar xzf code.tar.gz --strip-components 1 llvm-project-rustc-${RUST_LLVM_VERSION}/compiler-rt
shell: bash

# Non-linux tests just use our raw script
Expand Down

0 comments on commit 4065fc9

Please sign in to comment.