Skip to content

Commit 7959fd8

Browse files
Test github actions
1 parent 844a1c7 commit 7959fd8

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/compile.yaml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: PlatformIO CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v3
11+
- uses: actions/cache@v3
12+
with:
13+
path: |
14+
~/.cache/pip
15+
~/.platformio/.cache
16+
key: ${{ runner.os }}-pio
17+
18+
- uses: actions/setup-python@v4
19+
with:
20+
python-version: '3.9'
21+
22+
- name: Install PlatformIO Core
23+
run: pip install --upgrade platformio esptool
24+
25+
- name: Build PlatformIO Project
26+
run: |
27+
cd CYD-Klipper-Display
28+
pio run
29+
30+
- name: Make output dir
31+
run: mkdir -p output
32+
33+
- name: Build Binary
34+
run: |
35+
cp ./CYD-Klipper-Display/.pio/build/esp32dev/bootloader.bin output
36+
cp ./CYD-Klipper-Display/.pio/build/esp32dev/partitions.bin output
37+
cp ./CYD-Klipper-Display/.pio/build/esp32dev/firmware.bin output
38+
cp ~/platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin output
39+
esptool --chip esp32 merge_bin -o ./output/merged-firmware.bin --flash_mode dio --flash_freq 40m --flash_size 4MB 0x1000 ./output/bootloader.bin 0x8000 ./output/partitions.bin 0xe000 ./output/boot_app0.bin 0x10000 ./output/firmware.bin
40+
41+
- name: Upload artefact
42+
uses: actions/upload-artifact@v3
43+
with:
44+
name: firmware
45+
path: ./output

0 commit comments

Comments
 (0)