-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (56 loc) · 1.93 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
name: Build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v4
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install platformio
pip install wheel
- name: Cache PlatformIO
uses: actions/cache@v3
with:
path: ~/.platformio
key: ${{ runner.os }}-platformio
- name: Install NodeJS
uses: oven-sh/setup-bun@v1
- name: Install WebUI dependencies
run: |
cd web-ui
bun install
- name: Build WebUI
run: |
cd web-ui
bun run build
- name: Run PlatformIO
run: |
mkdir -p ~/artifacts/firmware
platformio pkg install --platform native
platformio pkg update
pio run --environment betafpv-elrs-lite-24_uart
pio run --target buildfs --environment betafpv-elrs-lite-24_uart
OUTDIR=~/artifacts/firmware/LBT/betafpv-elrs-lite-24_uart
mkdir -p $OUTDIR
mv .pio/build/betafpv-elrs-lite-24_uart/firmware.bin $OUTDIR/firmware.bin >& /dev/null || :
mv .pio/build/betafpv-elrs-lite-24_uart/littlefs.bin $OUTDIR/filesystem.bin >& /dev/null || :
- name: Store Artifacts
uses: actions/upload-artifact@v3
with:
name: firmware
path: ~/artifacts/**/*
continue-on-error: true