-
Notifications
You must be signed in to change notification settings - Fork 31
/
.gitlab-ci.yml
70 lines (61 loc) · 1.52 KB
/
.gitlab-ci.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
variables:
DEBIAN_FRONTEND: noninteractive # 设置 DEBIAN_FRONTEND 环境变量
ESP_IDF_SRC_DIR: $CI_PROJECT_DIR/esp-idf
cache:
key: "$CI_COMMIT_REF_NAME-$CI_JOB_NAME" # 缓存键
paths:
- $ESP_IDF_SRC_DIR
stages:
- build
- docs
- release
build-job:
stage: build
script:
- sudo apt-get update -qy
- sudo apt-get install git wget flex bison gperf python3 python3-pip python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0 -y
- source tools/ci.sh && ci_esp32_idf522_setup
- source tools/ci.sh && ci_esp32_nightly_build
artifacts:
paths:
- m5stack/build-*/uiflow-*-*.bin
- third-party/build-*/uiflow-*-*.bin
tags:
- uiflow-firmware
only:
changes:
- "m5stack/**"
- "tools/**"
- "third-party/**"
build-docs:
stage: docs
script:
- echo "Building the documentation..."
- cd docs
- python3 -m venv .
- source bin/activate
- pip3 install -r requirements.txt
- sphinx-build -b html -D language=zh_CN ./en/ build/html/zh_CN
- sphinx-build -b html -D language=en ./en/ build/html/en
- cd -
artifacts:
paths:
- docs/build/
tags:
- uiflow-firmware
only:
changes:
- "docs/**"
release_job:
stage: release
script:
- echo "Releasing the M5Burn..."
- 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