Skip to content

Commit

Permalink
Attempt to add caching
Browse files Browse the repository at this point in the history
  • Loading branch information
noam987 committed Jun 28, 2024
1 parent 34aa38b commit 3187b7c
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -51,4 +70,4 @@ jobs:
- name: Publish artifacts
uses: actions/upload-artifact@v4
with:
path: artifacts/*.zip
path: artifacts/kernel@*.zip

0 comments on commit 3187b7c

Please sign in to comment.