Merge pull request #22 from HerrZatacke/main #30
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: Compile Raspberry Pi Pico Project | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup node.js | |
uses: actions/[email protected] | |
with: | |
node-version: '20.x' | |
- name: Install npm dependencies | |
run: | | |
cd frontend | |
npm cache clear -f | |
npm install | |
- name: Build frontend | |
run: | | |
cd frontend | |
npm run build | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y cmake gcc-arm-none-eabi | |
- name: Set up Pico SDK | |
run: | | |
git clone -b master https://github.com/raspberrypi/pico-sdk.git | |
cd pico-sdk | |
git submodule update --init | |
echo "PICO_SDK_PATH=$PWD" >> $GITHUB_ENV | |
- name: Build project | |
env: | |
PICO_SDK_PATH: ${{ env.PICO_SDK_PATH }} | |
run: | | |
mkdir -p build | |
gcc -o build/makefsdata -I$PICO_SDK_PATH/lib/lwip/src/include/ -Iinclude -I. makefsdata/makefsdata.c | |
./build/makefsdata ./fs -f:include/pico_printer_fs.c | |
cd build | |
cmake .. | |
make -j$(nproc) | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pico-gb-printer-firmware | |
path: build/pico_gb_printer.uf2 |