@@ -9,15 +9,6 @@ PIMORONI_PICO_VERSION="feature/picovector2-and-layers"
9
9
PY_DECL_VERSION=" v0.0.3"
10
10
DIR2UF2_VERSION=" v0.0.9"
11
11
12
- if [ -z ${CI_PROJECT_ROOT+x} ]; then
13
- SCRIPT_PATH=" $( dirname $0 ) "
14
- CI_PROJECT_ROOT=$( realpath " $SCRIPT_PATH /.." )
15
- fi
16
-
17
- if [ -z ${CI_BUILD_ROOT+x} ]; then
18
- CI_BUILD_ROOT=$( pwd)
19
- fi
20
-
21
12
22
13
function log_success {
23
14
echo -e " $( tput setaf 2) $1 $( tput sgr0) "
@@ -102,8 +93,8 @@ function ci_cmake_configure {
102
93
BOARD=$1
103
94
TOOLS_DIR=" $CI_BUILD_ROOT /tools"
104
95
MICROPY_BOARD_DIR=$CI_PROJECT_ROOT /boards/$BOARD
105
- if [ ! -f " $MICROPY_BOARD_DIR /mpconfigboard .cmake" ]; then
106
- log_warning " Invalid board: $MICROPY_BOARD_DIR "
96
+ if [ ! -f " $MICROPY_BOARD_DIR /usermodules .cmake" ]; then
97
+ log_warning " Invalid board: \" $BOARD \" . Run with ci_cmake_configure <board_name>. "
107
98
return 1
108
99
fi
109
100
USER_C_MODULES_FILE=" $CI_PROJECT_ROOT /boards/usermod-common.cmake"
@@ -112,6 +103,7 @@ function ci_cmake_configure {
112
103
-DPICOTOOL_FORCE_FETCH_FROM_GIT=1 \
113
104
-DPICO_BUILD_DOCS=0 \
114
105
-DPICO_NO_COPRO_DIS=1 \
106
+ -DPICOTOOL_FETCH_FROM_GIT_PATH=" $TOOLS_DIR /picotool" \
115
107
-DPIMORONI_PICO_PATH=" $CI_BUILD_ROOT /pimoroni-pico" \
116
108
-DPIMORONI_TOOLS_DIR=" $TOOLS_DIR " \
117
109
-DUSER_C_MODULES=" $USER_C_MODULES_FILE " \
@@ -124,6 +116,10 @@ function ci_cmake_configure {
124
116
function ci_cmake_build {
125
117
BOARD=$1
126
118
MICROPY_BOARD_DIR=$CI_PROJECT_ROOT /boards/$BOARD
119
+ if [ ! -f " $MICROPY_BOARD_DIR /usermodules.cmake" ]; then
120
+ log_warning " Invalid board: \" $BOARD \" . Run with ci_cmake_build <board_name>."
121
+ return 1
122
+ fi
127
123
BUILD_DIR=" $CI_BUILD_ROOT /build-$BOARD "
128
124
ccache --zero-stats || true
129
125
cmake --build $BUILD_DIR -j 2
@@ -137,3 +133,11 @@ function ci_cmake_build {
137
133
cp " $BUILD_DIR /firmware-with-filesystem.uf2" $BOARD -with-filesystem.uf2
138
134
fi
139
135
}
136
+
137
+ if [ -z ${CI_USE_ENV+x} ] || [ -z ${CI_PROJECT_ROOT+x} ] || [ -z ${CI_BUILD_ROOT+x} ]; then
138
+ SCRIPT_PATH=" $( dirname $0 ) "
139
+ CI_PROJECT_ROOT=$( realpath " $SCRIPT_PATH /.." )
140
+ CI_BUILD_ROOT=$( pwd)
141
+ fi
142
+
143
+ ci_debug
0 commit comments