-
Notifications
You must be signed in to change notification settings - Fork 76
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
200 lines (188 loc) · 4.84 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
200 lines (188 loc) · 4.84 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
workflow:
auto_cancel:
on_new_commit: conservative # the default behavior
variables:
DEBIAN_FRONTEND: noninteractive
ESP_IDF_SRC_DIR: $CI_PROJECT_DIR/esp-idf
cache:
key: "$CI_PROJECT_ID-esp-idf-v551"
paths:
- ${ESP_IDF_SRC_DIR}
policy: pull-push
when: on_success
.build_firmware_template:
stage: build
interruptible: true
variables:
BOARD_LIST_THIRD_PARTY: ""
cache:
key: "$CI_PROJECT_ID-esp-idf-v551"
paths:
- ${ESP_IDF_SRC_DIR}
policy: pull
before_script:
- sudo apt-get update -qy
- sudo apt-get install git wget flex bison gperf quilt python3 python3-pip python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0 locales -y
- source tools/ci.sh && ci_esp32_idf551_setup
- source tools/ci.sh && ci_esp32_prepare_build_env
script:
- source tools/ci.sh && ci_esp32_build_board_list m5stack "$BOARD_LIST_M5STACK"
- source tools/ci.sh && ci_esp32_build_board_list third-party "$BOARD_LIST_THIRD_PARTY"
artifacts:
name: "$CI_JOB_NAME-$SHARD_NAME"
paths:
- m5stack/build-*/uiflow-*-*.bin
- third-party/build-*/uiflow-*-*.bin
tags:
- uiflow-firmware
stages:
- code_format
- docs
- build
- release
code-format:
stage: code_format
interruptible: true
rules:
- changes:
- m5stack/**/*
- third-party/**/*
- micropython/**/*
- tools/ci.sh
- pyproject.toml
- .pre-commit-config.yaml
- .gitlab-ci.yml
- when: never
before_script:
- export PATH="$HOME/.local/bin:$PATH"
script:
- make -C m5stack submodules
- sudo apt-get update -qy
- sudo apt-get install build-essential python3 python3-pip python-is-python3 cmake -y
- source tools/ci.sh && ci_code_formatting_setup
- source tools/ci.sh && ci_code_formatting_run
- git diff --exit-code
tags:
- uiflow-docs
build-firmware:
extends: .build_firmware_template
rules:
- changes:
- m5stack/**/*
- third-party/**/*
- micropython/**/*
- tools/ci.sh
- .gitlab-ci.yml
- when: never
parallel:
matrix:
- SHARD_NAME: ["esp32-list1"] # 11 boards
BOARD_LIST_M5STACK: >-
M5STACK_AirQ
M5STACK_Atom_Echo
M5STACK_Atom_Lite
M5STACK_Atom_Matrix
M5STACK_AtomS3
M5STACK_AtomS3_Lite
M5STACK_AtomS3R
M5STACK_AtomS3R_CAM
M5STACK_AtomS3U
M5STACK_Atom_EchoS3R
M5STACK_AtomU
- SHARD_NAME: ["esp32-list2"] # 11 boards
BOARD_LIST_M5STACK: >-
M5STACK_Basic
M5STACK_Basic_4MB
M5STACK_Fire
M5STACK_StickC
M5STACK_StickC_PLUS
M5STACK_Tough
M5STACK_CoreInk
M5STACK_Paper
M5STACK_PowerHub
M5STACK_Station
M5STACK_StamPLC
- SHARD_NAME: ["esp32-list3"] # 11 boards
BOARD_LIST_M5STACK: >-
M5STACK_Capsule
M5STACK_Cardputer
M5STACK_CardputerADV
M5STACK_CoreS3
M5STACK_StackChan
M5STACK_Dial
M5STACK_DinMeter
M5STACK_DualKey
M5STACK_StickC_PLUS2
M5STACK_StickS3
M5STACK_StopWatch
M5STACK_Tab5
M5STACK_Core2
- SHARD_NAME: ["esp32-list4"] # 11 M5Stack boards + 2 third-party boards
BOARD_LIST_M5STACK: >-
M5STACK_NanoC6
M5STACK_Unit_C6L
M5STACK_Unit_PoEP4
M5STACK_StampP4
M5STACK_Stamp_PICO
M5STACK_StampS3
M5STACK_StampS3Bat
M5STACK_StampC5
M5STACK_PaperS3
M5STACK_PaperColor
Nesso_N1
BOARD_LIST_THIRD_PARTY: >-
ESPRESSIF_ESP32_S3_BOX_3
SEEED_STUDIO_XIAO_ESP32S3
build-docs:
stage: docs
interruptible: true
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
key: "$CI_PROJECT_ID-docs-pip"
paths:
- .cache/pip
policy: pull-push
rules:
- changes:
- docs/**/*
- m5stack/libs/**/*
- .gitlab-ci.yml
- when: never
script:
- echo "Building the documentation..."
- cd docs
- python3 -m venv .
- source bin/activate
- pip3 install -r requirements.txt
- make zh
- make en
- cd -
artifacts:
paths:
- docs/build/
tags:
- uiflow-docs
release_job:
stage: release
needs:
- job: build-firmware
artifacts: true
script:
- echo "Releasing the M5Burn..."
- sudo apt install pipx -y
- pipx install uv
- pipx ensurepath
- export PATH="$PATH:$HOME/.local/bin"
- uv venv
- source .venv/bin/activate
- uv pip install requests
- python ./tools/release.py
only:
refs:
- tags
variables:
- $CI_COMMIT_TAG =~ /^release\/[0-9]+\.[0-9]+\.[0-9]+$/
- $CI_COMMIT_REF_SLUG == "develop_m5things"
tags:
- uiflow-firmware