-
-
Notifications
You must be signed in to change notification settings - Fork 6
106 lines (105 loc) · 3.94 KB
/
compile.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: 🏗️ Compile Firmware + Lint Check
on:
pull_request:
types: [ opened, synchronize, reopened ]
branches:
- develop
workflow_dispatch:
jobs:
compile_firmware:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Compile firmware
uses: ./.github/workflows/firmware-compile
with:
project-folder: firmware
- name: Copy bin file
run: |
cp -f ${{ github.workspace }}/firmware/.pio/build/firmware/firmware.bin ${{ github.workspace }}/firmware.bin
- name: Upload firmware
uses: actions/upload-artifact@v4
with:
name: firmware.bin
path: ${{ github.workspace }}/firmware.bin
compile_firmware_lite:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Switch to LITE version
run: |
sed -i 's/#define LITE ./#define LITE 1/' ${{ github.workspace }}/firmware/src/Definitions.h
- name: Compile firmware
uses: ./.github/workflows/firmware-compile
with:
project-folder: firmware
- name: Copy bin file
run: |
cp -f ${{ github.workspace }}/firmware/.pio/build/firmware/firmware.bin ${{ github.workspace }}/firmware-lite.bin
- name: Upload firmware lite
uses: actions/upload-artifact@v4
with:
name: firmware-lite.bin
path: ${{ github.workspace }}/firmware-lite.bin
compile_jaam2_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Switch to TEST_MODE build
run: |
sed -i 's/#define LITE ./#define LITE 0/' ${{ github.workspace }}/firmware/src/Definitions.h
sed -i 's/#define TEST_MODE ./#define TEST_MODE 1/' ${{ github.workspace }}/firmware/src/Definitions.h
- name: Compile test firmware
uses: ./.github/workflows/firmware-compile
with:
project-folder: firmware
- name: Copy bin file
run: |
cp -f ${{ github.workspace }}/firmware/.pio/build/firmware/firmware.bin ${{ github.workspace }}/firmware-jaam2-test.bin
- name: Upload JAAM 2 test firmware
uses: actions/upload-artifact@v4
with:
name: firmware-jaam2-test.bin
path: ${{ github.workspace }}/firmware-jaam2-test.bin
# check_firmware:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Check firmware
# uses: ./.github/workflows/firmware-check
# with:
# project-folder: firmware
compile_updater:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Compile updater
uses: ./.github/workflows/firmware-compile
with:
project-folder: updater
- name: Copy bin file
run: |
cp -f ${{ github.workspace }}/updater/.pio/build/updater/firmware.bin ${{ github.workspace }}/updater.bin
- name: Upload updater
uses: actions/upload-artifact@v4
with:
name: updater.bin
path: ${{ github.workspace }}/updater.bin
check_flasher:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check flasher with proof-html
uses: anishathalye/proof-html@v2
with:
directory: ${{ github.workspace }}/flasher
run_black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Black in the check mode
uses: psf/black@stable
with:
options: "--check --verbose --line-length 120 --target-version py312 deploy"
src: ${{ github.workspace }}/deploy
version: "~= 24.0"