-
Notifications
You must be signed in to change notification settings - Fork 17
102 lines (83 loc) · 2.88 KB
/
build.yml
File metadata and controls
102 lines (83 loc) · 2.88 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: Build EPD Reader
on:
push:
branches: [ main ]
tags:
- 'v*'
pull_request:
branches: [ main ]
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
target:
- sf32-oed-epd_v11
fail-fast: false
name: Build ${{ matrix.target }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup SiFli SDK environment
run: |
cd SiFli-SDK
./install.sh
- name: Build ${{ matrix.target }}
run: |
cd SiFli-SDK
source ./export.sh
cd ../epdiy-epub/project
scons --board=${{ matrix.target }} --board_search_path=.. -j$(nproc)
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.target }}
path: |
epdiy-epub/project/build_*
retention-days: 7
- name: Prepare release files
if: startsWith(github.ref, 'refs/tags/')
run: |
BUILD_DIR="epdiy-epub/project/build_${{ matrix.target }}_hcpu"
# Create release directory first
mkdir -p "release/${{ matrix.target }}"
# Copy all .bin, .json, .ini files while preserving directory structure
cd "$BUILD_DIR"
find . -type f \( -name "*.bin" -o -name "*.json" -o -name "*.ini" \) -exec cp --parents {} "../../../release/${{ matrix.target }}/" \;
cd ../../..
# List files for debugging
echo "Release files for ${{ matrix.target }}:"
find release/${{ matrix.target }}/ -type f | sort
# Create a zip archive for this target
cd release
zip -r ${{ matrix.target }}.zip ${{ matrix.target }}/
- name: Create Release
if: startsWith(github.ref, 'refs/tags/')
uses: ncipollo/release-action@v1
with:
artifacts: "release/${{ matrix.target }}.zip"
generateReleaseNotes: true
allowUpdates: true
artifactErrorsFailBuild: false
name: "EPD Reader Release ${{ github.ref_name }}"
tag: ${{ github.ref_name }}
token: ${{ secrets.GITHUB_TOKEN }}
body: |
## EPD Reader Firmware Release ${{ github.ref_name }}
### Build Information
- Target Board: ${{ matrix.target }}
- Build Date: ${{ github.event.head_commit.timestamp }}
- Commit: ${{ github.sha }}
### Files Included
- `bootloader.bin` - Bootloader binary
- `ftab.bin` - Flash table binary
- `*.bin` - Main application binaries
- `fs_root.bin` - File system image (if available)
### Installation
1. Extract the zip file for your target board
2. Flash the binaries to your EPD reader device