-
Notifications
You must be signed in to change notification settings - Fork 2
69 lines (67 loc) · 2.54 KB
/
main.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 production version
on:
push:
branches: [main]
jobs:
build-everything:
runs-on: ubuntu-latest
name: Build All Binaries
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Set up Git identity
run: |
git config --local user.name "Leønid Yakubovič"
git config --local user.email "[email protected]"
- name: Prepare environment
uses: ./.github/actions/prepare_pio
- name: Download AquesTalk
run: |
wget https://www.a-quest.com/archive/package/aquestalk-esp32_0243.zip -O /tmp/aquestalk.zip
unzip /tmp/aquestalk.zip -d /tmp
mv /tmp/aquestalk-esp32/src/esp32/libaquestalk.a ./lib/nonfree-aquestalk/libaquestalk.a
mv /tmp/aquestalk-esp32/src/aquestalk.h ./lib/nonfree-aquestalk/aquestalk.h
- name: Create env file
run: cp ./.env.example ./.env
- name: Build all targets
run: pio run
continue-on-error: true # TODO make this more graceful
- name: Upload firmware images
uses: actions/upload-artifact@v4
with:
path: ./.pio/build/*/firmware.bin
name: firmwares.zip
if-no-files-found: error
- name: Delete WIP tunes
run: rm ./data/music/wip_*.pomf
- name: Add FS version into the file system
run: echo "$(git rev-parse --short HEAD)" > ./data/FS_VER
- name: Create LittleFS image
run: pio run --target buildfs --environment music-pomf
- name: Upload filesystem image
uses: actions/upload-artifact@v4
with:
path: ./.pio/build/music-pomf/littlefs.bin
name: filesystem.zip
if-no-files-found: error
- name: Switch to public branch
run: git checkout pub
- name: Merge changes from main
run: git merge main
- name: Move things to FVUDATA for publishing
run: ./helper/ci/create_fvudata.sh
- name: Add FVUDATA stuff into git and push
run: |
git add -f ./webroot/fvudata/*
git commit -m "ci: Publish firmwares at $(git rev-parse --short HEAD)"
git push --force -u origin pub
# Thanks to yet another weird limitation of Github Actions, we need to run the upcoming workflow manually
# https://github.com/orgs/community/discussions/25702
# Remove when a better solution is found
- name: Publish webroot
run: gh workflow run web.yml --ref pub