Pin to stable framework version (#37) #118
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PlatformIO CI | |
on: [pull_request, push] | |
defaults: | |
run: | |
working-directory: ./ | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set FIRMWARE_VERSION variable | |
run: | | |
FIRMWARE_VER=$(cat VERSION) | |
echo "FIRMWARE_VERSION=$FIRMWARE_VER" >> $GITHUB_ENV | |
- name: Set FIRMWARE_COMMIT_HASH variable | |
run: echo "FIRMWARE_COMMIT_SHA=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV" | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install platformio | |
- name: Build | |
run: pio run | |
- name: Rename firmware | |
run: mv .pio/build/rpipicow/firmware.uf2 .pio/build/rpipicow/xrp-wpilib-firmware-${{ env.FIRMWARE_VERSION }}-${{ env.FIRMWARE_COMMIT_SHA }}.uf2 | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: xrp-wpilib-firmware-${{ env.FIRMWARE_VERSION }}-${{ env.FIRMWARE_COMMIT_SHA }} | |
path: .pio/build/rpipicow/xrp-wpilib-firmware-*.uf2 |