-
Notifications
You must be signed in to change notification settings - Fork 2
83 lines (71 loc) · 2.43 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
name: Build and Release Graphical Bootloader
on:
push:
tags:
- 'v*.*'
workflow_dispatch:
jobs:
create-release:
runs-on: ubuntu-22.04
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Create Draft Release
id: create_release
run: |
gh release create ${{ github.ref }} --title "Release ${{ github.ref }}" --notes "Release notes for ${{ github.ref }}" --draft
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-and-upload:
needs: create-release
strategy:
matrix:
board:
- { name: "ESP32-S3-BOX-3", sdkconfig: "sdkconfig.defaults.esp-box-3" }
- { name: "ESP32-S3-BOX", sdkconfig: "sdkconfig.defaults.esp-box" }
#- { name: "ESP32-P4", sdkconfig: "sdkconfig.defaults.esp32_p4_function_ev_board" }
- { name: "M5Stack-CoreS3", sdkconfig: "sdkconfig.defaults.m5stack_core_s3" }
runs-on: ubuntu-22.04
container: espressif/idf:release-v5.3
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Set SDKCONFIG_DEFAULTS
run: echo "SDKCONFIG_DEFAULTS=${{ matrix.board.sdkconfig }}" >> $GITHUB_ENV
- name: Build the main application and sub-applications
run: |
. /opt/esp/idf/export.sh
cmake -Daction=select_board -P Bootloader.cmake
cmake -Daction=build_all_apps -P Bootloader.cmake
- name: Merge binaries into a single image
run: |
. /opt/esp/idf/export.sh
cmake -Daction=merge_binaries -P Bootloader.cmake
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: graphical_bootloader_${{ matrix.board.name }}
path: build/combined.bin
upload-release-assets:
needs: build-and-upload
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: ./artifacts
- name: Upload Release Assets
run: |
echo "Listing files"
find artifacts
echo "Enf of list"
for file in ./artifacts/*; do
gh release upload ${{ needs.create-release.outputs.upload_url }} "$file" --clobber
done
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}