|
1 |
| -name: Build and Cache Example |
| 1 | +name: Build and Publish |
2 | 2 |
|
3 | 3 | on:
|
4 | 4 | push:
|
5 | 5 | branches:
|
6 | 6 | - '*'
|
7 | 7 |
|
8 | 8 | jobs:
|
9 |
| - build_and_cache: |
| 9 | + build_template: |
10 | 10 | runs-on: ubuntu-latest
|
11 | 11 |
|
12 | 12 | env:
|
13 | 13 | TOOLCHAIN_UPDATE: 10.3-2021.10
|
14 | 14 |
|
15 | 15 | steps:
|
16 | 16 |
|
| 17 | + - name: Install SSH key |
| 18 | + uses: webfactory/[email protected] |
| 19 | + with: |
| 20 | + ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} |
17 | 21 | - name: Checkout code
|
18 | 22 | uses: actions/checkout@v2
|
| 23 | + with: |
| 24 | + repository: purduesigbots/pros |
| 25 | + ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} |
19 | 26 |
|
20 | 27 | - name: Retrieve gcc-arm-embedded from cache
|
21 | 28 | id: cache-gcc
|
22 |
| - uses: actions/cache@v2 |
| 29 | + uses: actions/cache@v4 |
23 | 30 | with:
|
24 |
| - path: gcc-arm-none-eabi-${{ env.TOOLCHAIN_UPDATE }} |
25 |
| - key: gcc-arm-none-eabi-${{ env.TOOLCHAIN_UPDATE }} |
| 31 | + path: |
| 32 | + ~/gcc-arm-none-eabi-${{env.TOOLCHAIN_UPDATE}} |
| 33 | + key: |
| 34 | + gcc-arm-none-eabi-${{env.TOOLCHAIN_UPDATE}} |
26 | 35 |
|
27 | 36 | - name: Install gcc-arm-embedded
|
28 | 37 | if: steps.cache-gcc.outputs.cache-hit != 'true'
|
29 | 38 | run: |
|
30 |
| - curl -LSso toolchain.tar.bz2 "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${{ env.TOOLCHAIN_UPDATE }}/gcc-arm-none-eabi-${{ env.TOOLCHAIN_UPDATE }}-x86_64-linux.tar.bz2" |
| 39 | + 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" |
31 | 40 | tar -xjvf toolchain.tar.bz2
|
32 |
| - rm toolchain.tar.bz2 |
33 |
| - |
| 41 | +
|
34 | 42 | - name: Add gcc-arm-embedded to path
|
35 |
| - run: echo "$(pwd)/gcc-arm-none-eabi-${{ env.TOOLCHAIN_UPDATE }}/bin" >> $GITHUB_PATH |
| 43 | + run: echo "$(pwd)/gcc-arm-none-eabi-${TOOLCHAIN_UPDATE}/bin" >> $GITHUB_PATH |
36 | 44 |
|
37 | 45 | - name: Set up Python
|
38 | 46 | uses: actions/setup-python@v2
|
|
52 | 60 | cp template/*.zip artifacts
|
53 | 61 |
|
54 | 62 | - name: Publish artifacts
|
55 |
| - uses: actions/upload-artifact@v2 |
| 63 | + uses: actions/upload-artifact@v4 |
56 | 64 | with:
|
57 | 65 | path: artifacts/kernel@*.zip
|
58 | 66 | compression-level: 0
|
0 commit comments