forked from google/pebble
-
Notifications
You must be signed in to change notification settings - Fork 84
80 lines (66 loc) · 1.95 KB
/
Copy pathbuild-firmware.yml
File metadata and controls
80 lines (66 loc) · 1.95 KB
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
name: Build Firmware
on:
push:
branches: [main]
pull_request:
branches: [main]
paths:
- '.github/workflows/build-firmware.yml'
- 'resources/**'
- 'sdk/**'
- 'src/**'
- 'stored_apps/**'
- 'tools/**'
- 'third_party/**'
- 'waftools/**'
- 'waf'
- 'wscript'
jobs:
build:
runs-on: ubuntu-24.04
container:
image: ghcr.io/pebble-dev/pebbleos-docker:v1
strategy:
matrix:
board: ["asterix", "obelix_dvt", "obelix_pvt"]
steps:
- name: Mark Github workspace as safe
run: git config --system --add safe.directory "${GITHUB_WORKSPACE}"
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Install Python dependencies
run: |
pip install -U pip
pip install -r requirements.txt
- name: Get npm cache directory
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- name: Node modules cache
uses: actions/cache@v4
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('third_party/jerryscript/jerryscript/js_tooling/package.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Configure
run: ./waf configure --board ${{ matrix.board }}
- name: Build
run: ./waf build
- name: Bundle
run: ./waf bundle
- name: Store
uses: actions/upload-artifact@v4
with:
name: firmware-${{ matrix.board }}
path: |
build/**/*.elf
build/**/*.pbz
build/src/fw/tintin_fw_loghash_dict.json
- name: Get Build ID
id: build_id
run: |
echo "BUILD_ID=$(arm-none-eabi-readelf -n build/src/fw/tintin_fw.elf | sed -n -e 's/^.*Build ID: //p')" >> "$GITHUB_OUTPUT"