Skip to content

Commit ade8e16

Browse files
committed
Add github action.
Signed-off-by: xSlendiX <slendi@socopon.com>
1 parent 6cc7310 commit ade8e16

File tree

4 files changed

+63
-0
lines changed

4 files changed

+63
-0
lines changed

.github/build.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
alias arduino="arduino-cli --additional-urls 'https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json'"
2+
3+
arduino-cli core update-index
4+
5+
arduino core install 'rp2040:rp2040'
6+
arduino board attach -b 'rp2040:rp2040:rpipico' --board-options 'flash=2097152_1048576,usbstack=tinyusb'
7+
arduino lib install 'Adafruit SPIFlash'
8+
arduino config set sketch.always_export_binaries true
9+
10+
arduino compile -b 'rp2040:rp2040:rpipico' -e --board-options 'flash=2097152_1048576,usbstack=tinyusb'
11+

.github/workflows/build.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: build-pico
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- '.github/**'
9+
- '!.github/workflows/build.yml'
10+
- '.vscode/**'
11+
- 'docs/**'
12+
- 'scripts/**'
13+
- 'static/**'
14+
- '*.md'
15+
tags:
16+
- '[0-9]+.[0-9]+.[0-9]+*'
17+
workflow_dispatch:
18+
pull_request:
19+
paths-ignore:
20+
- '.github/**'
21+
- '!.github/workflows/build.yml'
22+
- '.vscode/**'
23+
- 'docs/**'
24+
- 'scripts/**'
25+
- 'static/**'
26+
- '*.md'
27+
28+
jobs:
29+
build-matrix:
30+
runs-on: ubuntu-18.04
31+
32+
steps:
33+
# First of all, we clone the repo using the `checkout` action.
34+
- name: Checkout
35+
uses: actions/checkout@v3
36+
37+
# We use the `arduino/setup-arduino-cli` action to install and
38+
# configure the Arduino CLI on the system.
39+
- name: Setup Arduino CLI
40+
uses: arduino/setup-arduino-cli@v1
41+
42+
# We then install the platform, which one will be determined
43+
# dynamically by the build matrix.
44+
- name: Build
45+
run: |
46+
sh .github/build.sh

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
*.tmp
2+
build
23

sketch.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"cpu": {
3+
"fqbn": "rp2040:rp2040:rpipico:flash=2097152_1048576,usbstack=tinyusb"
4+
}
5+
}

0 commit comments

Comments
 (0)