-
Notifications
You must be signed in to change notification settings - Fork 1
80 lines (67 loc) · 2.83 KB
/
build.yml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Build Pico-ASHA
on:
push:
pull_request:
env:
PICO_SDK_COMMIT_HASH: efe2103f9b28458a1615ff096054479743ade236
BTSTACK_CREDITS_COMMIT_HASH: fa5389268014cd3572e84d70ff58c2f79f4b56cf
jobs:
build_pico_asha:
name: Build
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: pico-asha
- name: Cache Pico SDK
id: cache-pico-sdk
uses: actions/cache@v4
with:
path: pico-sdk
key: pico-sdk-${{ env.PICO_SDK_COMMIT_HASH }}
- name: Checkout Pico SDK
if: steps.cache-pico-sdk.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: raspberrypi/pico-sdk
path: pico-sdk
submodules: recursive
ref: "${{ env.PICO_SDK_COMMIT_HASH }}"
# Note: still required as of Pico SDK 2.0.0
- name: Apply Bluetooth DLE patch
if: steps.cache-pico-sdk.outputs.cache-hit != 'true'
run: |
wget https://github.com/raspberrypi/pico-sdk/files/12750460/0001-Update-firmware-for-Data-Length-Extension-fix.patch.zip
unzip 0001-Update-firmware-for-Data-Length-Extension-fix.patch.zip
cd pico-sdk/lib/cyw43-driver
git config --global user.email "gh@localhost"
git config --global user.name "GH Actions"
git am ../../../0001-Update-firmware-for-Data-Length-Extension-fix.patch
- name: Checkout btstack fork with credit patch
uses: actions/checkout@v4
with:
repository: shermp/btstack
path: btstack
ref: "${{ env.BTSTACK_CREDITS_COMMIT_HASH }}"
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get -y install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib
- name: Set env variables
run: |
echo "PICO_SDK_PATH=$(realpath ./pico-sdk)" >> "$GITHUB_ENV"
echo "PICO_BTSTACK_PATH=$(realpath ./btstack)" >> "$GITHUB_ENV"
- name: Configure build
run: |
mkdir pico-asha/build
cd pico-asha/build
cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..
- name: Compile
run: |
cd pico-asha/build
cmake --build .
- name: Upload UF2 and ELF binaries
uses: actions/upload-artifact@v4
with:
name: pico-asha-bin
path: pico-asha/build/pico-asha.[ue][fl][2f]