From 3187b7c269238e332cf1a844649b7b1b66758eb1 Mon Sep 17 00:00:00 2001 From: noam987 <50681033+noam987@users.noreply.github.com> Date: Fri, 28 Jun 2024 00:28:05 -0400 Subject: [PATCH] Attempt to add caching --- .github/workflows/main.yml | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9209b597..366d74b5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,13 +23,32 @@ jobs: with: repository: purduesigbots/pros ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} - + + - name: Retrieve gcc-arm-embedded from cache + id: cache-gcc + uses: actions/cache/restore@v4 + with: + path: + $(pwd)/gcc-arm-none-eabi-${TOOLCHAIN_UPDATE} + key: + gcc-non-eabi-${TOOLCHAIN_UPDATE} + - name: Install gcc-arm-embedded + if: steps.cache-gcc.outputs.cache-hit != 'true' run: | curl -LSso toolchain.tar.bz2 "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${TOOLCHAIN_UPDATE}/gcc-arm-none-eabi-${TOOLCHAIN_UPDATE}-x86_64-linux.tar.bz2" tar -xjvf toolchain.tar.bz2 - echo "$(pwd)/gcc-arm-none-eabi-${TOOLCHAIN_UPDATE}/bin" >> $GITHUB_PATH - echo "$GITHUB_PATH" + - name: Upload gcc-arm-embedded to cache + if: steps.cache-gcc.outputs.cache-hit != 'true + uses: actions/cache/save@v4 + with: + path: + $(pwd)/gcc-non-eabi-${TOOLCHAIN_UPDATE} + key: + gcc-non-eabi-${TOOLCHAIN_UPDATE} + + - name: Add gcc-arm-embedded to path + run: echo "$(pwd)/gcc-arm-none-eabi-${TOOLCHAIN_UPDATE}/bin" >> $GITHUB_PATH - name: Set up Python uses: actions/setup-python@v2 @@ -51,4 +70,4 @@ jobs: - name: Publish artifacts uses: actions/upload-artifact@v4 with: - path: artifacts/*.zip + path: artifacts/kernel@*.zip