forked from google/pebble
-
Notifications
You must be signed in to change notification settings - Fork 14
84 lines (71 loc) · 2.65 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
80
81
82
83
84
name: Build
on:
push:
branches: [main, python-uv]
pull_request:
branches: [main]
env:
ARM_GNU_TOOLCHAIN_VERSION: 14.2.rel1
HATCH_VERSION: 1.9.7
jobs:
build:
runs-on: ubuntu-24.04
strategy:
matrix:
board: ["snowy_bb2", "spalding_bb2", "silk_bb2", "asterix_vla_dvb1"]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.6.1"
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up environment
run: |
sudo apt-get update
sudo apt-get install -y gettext gcc-multilib
curl -Lf https://github.com/pypa/hatch/releases/download/hatch-v${HATCH_VERSION}/hatch-${HATCH_VERSION}-$(uname -m)-unknown-linux-gnu.tar.gz | tar xzf -
sudo mv hatch-${HATCH_VERSION}-$(uname -m)-unknown-linux-gnu /usr/local/bin/hatch
uv sync --dev
wget --no-verbose "https://developer.arm.com/-/media/Files/downloads/gnu/${ARM_GNU_TOOLCHAIN_VERSION}/binrel/arm-gnu-toolchain-${ARM_GNU_TOOLCHAIN_VERSION}-x86_64-arm-none-eabi.tar.xz"
sudo tar xf arm-gnu-toolchain-${ARM_GNU_TOOLCHAIN_VERSION}-x86_64-arm-none-eabi.tar.xz -C /opt
echo "/opt/arm-gnu-toolchain-${ARM_GNU_TOOLCHAIN_VERSION}-x86_64-arm-none-eabi/bin" >> $GITHUB_PATH
- name: Configure
run: uv run ./waf configure --board ${{ matrix.board }} --nojs
- name: Build FW
run: uv run ./waf build
- name: Build recovery FW
if: ${{ matrix.board == 'asterix_vla_dvb1' }}
run: uv run ./waf build_prf
- name: Store firmware images
uses: actions/upload-artifact@v4
with:
name: firmware-${{ matrix.board }}
path: |
build/**/*.elf
build/**/*.hex
build/**/*.bin
build/**/*.map
build/**/*.pbpack
- name: Configure (QEMU)
if: ${{ matrix.board != 'asterix_vla_dvb1' }}
run: uv run ./waf clean configure --board ${{ matrix.board }} --nojs --qemu
- name: Build FW (QEMU)
if: ${{ matrix.board != 'asterix_vla_dvb1' }}
run: uv run ./waf build qemu_image_micro qemu_image_spi
- name: Store firmware images (QEMU)
if: ${{ matrix.board != 'asterix_vla_dvb1' }}
uses: actions/upload-artifact@v4
with:
name: firmware-${{ matrix.board }}-qemu
path: |
build/qemu_micro_flash.bin
build/qemu_spi_flash.bin