mirror of
https://github.com/librekeys/pico-fido2.git
synced 2026-07-28 08:01:47 -07:00
Add simple CI build flow for push requests
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user