-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.25 KB
/
build-firmware.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Build Firmware
on:
push: # Trigger for pushes.
paths:
- hardware/firmware/**
- .github/workflows/build-firmware.yaml
pull_request: # Trigger for pull requests.
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch: # Allows for manual triggering.
inputs:
ref:
description: "The ref to build and test."
required: false
# If another instance of this workflow is started for the same PR, cancel the
# old one. If a PR is updated and a new test run is started, the old test run
# will be cancelled automatically to conserve resources.
concurrency:
group: ${{ github.workflow }}-${{ inputs.ref || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build Firmware
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.ref }}
- name: Install Arduino CLI
uses: arduino/setup-arduino-cli@v1
- name: Install Arduino RP2040 core
run: arduino-cli core install rp2040:rp2040
- name: Install Arduino libraries
run: arduino-cli lib install Ethernet
- name: Build firmware
run: |
cd hardware/firmware
make build