forked from SmingHub/Sming
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
90 lines (74 loc) · 2.53 KB
/
appveyor.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
image:
- Ubuntu2004
- Visual Studio 2019
platform: x86
environment:
SMING_SECRET:
secure: rCs19uNvDR07w1d2pfwJIzewiEQ2zpKXdqFp5BqHQAA=
matrix:
- SMING_ARCH: Host
INSTALL_OPTS: host doc
- SMING_ARCH: Esp8266
INSTALL_OPTS: esp8266
BUILD_COMPILER: udk
- SMING_ARCH: Esp8266
INSTALL_OPTS: esp8266
BUILD_COMPILER: eqt
- SMING_ARCH: Esp32
INSTALL_OPTS: esp32
install:
- ps: |
# Set up environment variables for all environments and build types
$env:CI_BUILD_DIR = $env:APPVEYOR_BUILD_FOLDER
$env:CI_PROJECT_SLUG = $env:APPVEYOR_PROJECT_SLUG
$env:CI_REPO_NAME = $env:APPVEYOR_REPO_NAME
if ($env:APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME) {
$env:CI_PULL_REQUEST = "true"
}
# Esp8266
$env:UDK_ROOT = Join-Path $env:CI_BUILD_DIR "opt/esp-alt-sdk"
$env:EQT_ROOT = Join-Path $env:CI_BUILD_DIR "opt/esp-quick-toolchain"
if ($env:BUILD_COMPILER -eq "udk") {
$env:ESP_HOME = $env:UDK_ROOT
} else {
$env:ESP_HOME = $env:EQT_ROOT
}
# Esp32
$env:IDF_PATH = Join-Path $env:CI_BUILD_DIR "opt/esp-idf"
$env:IDF_TOOLS_PATH = Join-Path $env:CI_BUILD_DIR "opt/tools/esp32"
# General
$env:SMING_HOME = Join-Path $env:CI_BUILD_DIR "Sming"
- cmd: |
set PATH=C:\Python39;C:\MinGW\msys\1.0\bin;C:\MinGW\bin;%PATH%
set PYTHON=C:\Python39\python
set ESP32_PYTHON_PATH=C:\Python39
Tools\ci\install.cmd
set PATH=C:\Python39\Scripts;C:\tools\doxygen;C:\tools\Graphviz\bin;%PATH%
- sh: |
export PYTHON=$HOME/venv3.9/bin/python
export ESP32_PYTHON_PATH=$HOME/venv3.9/bin
source $HOME/venv3.9/bin/activate
Tools/install.sh $INSTALL_OPTS
cd $CI_BUILD_DIR
before_build:
- sh: |
# Check if we could run static code analysis
export CHECK_SCA=0
if [[ $APPVEYOR_REPO_TAG_NAME != "" || ( $APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED == *"[scan:coverity]"* && $CI_PULL_REQUEST == "" ) ]]; then
export CHECK_SCA=1
fi
build_script:
- cmd: Tools\ci\build.cmd
- sh: Tools/ci/build.sh
after_build:
- ps: |
if ($env:SMING_ARCH -eq "Host") {
$docFile = "sming-docs.zip"
Compress-Archive -Path $env:CI_BUILD_DIR/docs/build/html -DestinationPath $docFile
Push-AppveyorArtifact $docFile
}
deploy_script:
- sh: |
if [[ $APPVEYOR_REPO_TAG_NAME != "" && $APPVEYOR_BUILD_WORKER_IMAGE == "Ubuntu2004" && $SMING_ARCH == "Host" ]]; then
Tools/ci/deploy.sh $APPVEYOR_REPO_TAG_NAME
fi