Release/3.1.0 #438
Workflow file for this run
This file contains hidden or 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: pslab-firmware | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_call: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download project files | |
uses: actions/checkout@v4 | |
- name: Cache XC-16 Compiler | |
id: cache-compiler | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/mplab-xc | |
key: xc16-v2.10-cache | |
- name: Download XC16 Compiler | |
if: steps.cache-compiler.outputs.cache-hit != 'true' | |
run: | | |
mkdir -p ~/.cache/mplab-xc | |
cd ~/.cache/mplab-xc | |
wget https://ww1.microchip.com/downloads/aemDocuments/documents/DEV/ProductDocuments/SoftwareTools/xc16-v2.10-full-install-linux64-installer.run | |
chmod +x xc16-v2.10-full-install-linux64-installer.run | |
- name: Install XC16 Compiler | |
run: | | |
cd ~/.cache/mplab-xc | |
sudo ./xc16-v2.10-full-install-linux64-installer.run --mode unattended --netservername dontknow | |
- name: Set up cmake-microchip submodules | |
run: | | |
git submodule init | |
git submodule update | |
- name: Build firmware for v6 | |
run: | | |
mkdir build_v6 | |
cd build_v6 | |
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo | |
make | |
zip -r pslab-firmware_v6.zip pslab-firmware.hex | |
- name: Build firmware for v5 | |
run: | | |
mkdir build_v5 | |
cd build_v5 | |
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEGACY_HARDWARE=1 | |
make | |
zip -r pslab-firmware_v5.zip pslab-firmware.hex | |
- name: Build firmware for v6_esp01 | |
run: | | |
git switch esp-01 | |
mkdir build_v6_esp01 | |
cd build_v6_esp01 | |
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo | |
make | |
zip -r pslab-firmware_v6_esp01.zip pslab-firmware.hex | |
- name: Publish build files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: production-file | |
path: build*/*.zip |