From 44372587ef55b864b8a33b82b0294aa616533db9 Mon Sep 17 00:00:00 2001 From: gxcreator Date: Mon, 2 Mar 2026 20:55:07 +0100 Subject: [PATCH] Add simple CI build flow for push requests --- .github/workflows/build.yml | 50 +++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..478e8bf --- /dev/null +++ b/.github/workflows/build.yml @@ -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