Add simple CI build flow for push requests

This commit is contained in:
gxcreator
2026-03-02 20:55:07 +01:00
parent 7fce121fe1
commit 44372587ef
+50
View File
@@ -0,0 +1,50 @@
name: "Build"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
name: Build ${{ matrix.board }}
strategy:
fail-fast: false
matrix:
board: [weact_studio_rp2040_16mb]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib
- name: Clone and build pico-sdk
run: |
git clone https://github.com/raspberrypi/pico-sdk
cd pico-sdk
git checkout tags/2.1.1
git submodule update --init
cd ..
- name: Build firmware
env:
PICO_SDK_PATH: ${{ github.workspace }}/pico-sdk
run: |
mkdir -p build_ci
cd build_ci
cmake .. -DPICO_BOARD=${{ matrix.board }}
make -j$(nproc)
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: pico_fido2_${{ matrix.board }}
path: build_ci/pico_fido2.uf2