Skip to content

Update main.yml

Update main.yml #36

Workflow file for this run

name: Build and Cache Example
on:
push:
branches:
- '*'
jobs:
build_and_cache:
runs-on: ubuntu-latest
env:
TOOLCHAIN_UPDATE: 10.3-2021.10
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Retrieve gcc-arm-embedded from cache
id: cache-gcc
uses: actions/cache@v2
with:
path: gcc-arm-none-eabi-${{ env.TOOLCHAIN_UPDATE }}
key: gcc-arm-none-eabi-${{ env.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/${{ env.TOOLCHAIN_UPDATE }}/gcc-arm-none-eabi-${{ env.TOOLCHAIN_UPDATE }}-x86_64-linux.tar.bz2"
tar -xjvf toolchain.tar.bz2
rm toolchain.tar.bz2
- name: Add gcc-arm-embedded to path
run: echo "$(pwd)/gcc-arm-none-eabi-${{ env.TOOLCHAIN_UPDATE }}/bin" >> $GITHUB_PATH
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install CLI
run: |
pip install pros-cli
- name: Build template
run: |
git submodule init
git submodule update
make template
mkdir -p artifacts
cp template/*.zip artifacts
- name: Publish artifacts
uses: actions/upload-artifact@v2
with:
path: artifacts/kernel@*.zip
compression-level: 0