Skip to content

Commit

Permalink
caching the compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
dkm committed Nov 27, 2024
1 parent 67ce3e2 commit 7be81ab
Showing 1 changed file with 27 additions and 6 deletions.
33 changes: 27 additions & 6 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,29 @@ jobs:
dejagnu;
# install Rust directly using rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0;
curl "https://s3.amazonaws.com/compiler-explorer/opt/gcc-5.4.0.tar.xz" -o /tmp/gcc.tar.xz;
sudo mkdir -p /usr/local/;
cd /usr/local;
sudo tar xvf /tmp/gcc.tar.xz
- name: Restore cached gcc-5.4
id: restore-gcc5.4
uses: actions/cache/restore@v4
with:
key: ce-tar-gcc-5.4
path: /usr/local/gcc-5.4

- name: Download and install gcc5.4
if: ${{ steps.restore-gcc5.4.outputs.cache-hit != 'true' }}
run: |
curl "https://s3.amazonaws.com/compiler-explorer/opt/gcc-5.4.0.tar.xz" -o /tmp/gcc.tar.xz;
sudo mkdir -p /usr/local/;
cd /usr/local;
sudo tar xvf /tmp/gcc.tar.xz
- name: Store gcc-5.4 to cache
id: cache-gcc5.4
if: always() && steps.restore-gcc5.4.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
key: ${{ steps.restore-gcc5.4.outputs.cache-primary-key }}
path: /usr/local/gcc-5.4

- name: Make Source Read-Only
run: chmod -R a-w ./*
Expand All @@ -308,8 +327,10 @@ jobs:
run: |
mkdir -p gccrs-build;
cd gccrs-build;
PATH=/usr/local/gcc-5.4.0/bin:$PATH gcc --version;
PATH=/usr/local/gcc-5.4.0/bin:$PATH type gcc;
# Add cargo to our path quickly
. "$HOME/.cargo/env";
PATH=/usr/local/gcc-5.4.0/bin:$PATH \
../configure \
--enable-languages=rust \
Expand Down

0 comments on commit 7be81ab

Please sign in to comment.