-
Notifications
You must be signed in to change notification settings - Fork 6
65 lines (56 loc) · 2.89 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
name: X16 SMC firmware build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Setup Arduino CLI
uses: arduino/setup-arduino-cli@v1
- name: Install ATTinyCore platform
run: |
arduino-cli core update-index --additional-urls file://$PWD/package_drazzy.com_index.json
arduino-cli core install ATTinyCore:avr --additional-urls file://$PWD/package_drazzy.com_index.json
- name: Compile Arduino default sketch
run: arduino-cli compile -b ATTinyCore:avr:attinyx61 --board-options "chip=861,clock=16pll,pinmapping=new,TimerClockSource=default,LTO=enable,millis=enabled,eesave=aenable,bod=4v3" --build-path .build/default
- name: Compile Arduino sketch with Community X16 pin support
run: arduino-cli compile -b ATTinyCore:avr:attinyx61 --board-options "chip=861,clock=16pll,pinmapping=new,TimerClockSource=default,LTO=enable,millis=enabled,eesave=aenable,bod=4v3" --build-property "build.extra_flags=-DCOMMUNITYX16_PINS" --build-path .build/community
- name: Install IntelHex library
run: pip install intelhex
- name: Make default SMC.BIN file
run: python make_bin.py ./.build/default/x16-smc.ino.hex .build/default
- name: Make SMC.BIN file with CommunityX16 pin support
run: python make_bin.py ./.build/community/x16-smc.ino.hex .build/community
- name: Move readme files to build folders
run: |
mv .doc/readme-default .build/default/readme
mv .doc/readme-community .build/community/readme
- name: Fetch bootloader
run: wget -O .build/bootloader.hex https://github.com/stefan-b-jakobsson/x16-smc-bootloader/releases/download/2/bootloader.hex
- name: Create firmware_with_bootloader files
run: |
./merge_bootloader.sh .build/default/x16-smc.ino.hex .build/bootloader.hex .build/default/firmware_with_bootloader.hex
./merge_bootloader.sh .build/community/x16-smc.ino.hex .build/bootloader.hex .build/community/firmware_with_bootloader.hex
- name: Archive default firmware
uses: actions/upload-artifact@v4
with:
name: SMC default firmware
path: |
.build/default/firmware_with_bootloader.hex
.build/default/x16-smc.ino.elf
.build/default/x16-smc.ino.hex
.build/default/SMC*.BIN
.build/default/readme
- name: Archive CommunityX16 firmware
uses: actions/upload-artifact@v4
with:
name: SMC CommunityX16 firmware
path: |
.build/community/firmware_with_bootloader.hex
.build/community/x16-smc.ino.elf
.build/community/x16-smc.ino.hex
.build/community/SMC*.BIN
.build/community/readme