Skip to content

Commit 039d2e8

Browse files
antmakigrr
authored andcommitted
ci: Add build for the ARMEL architecture and test it
1 parent d8969fe commit 039d2e8

File tree

1 file changed

+68
-12
lines changed

1 file changed

+68
-12
lines changed

.gitlab-ci.yml

Lines changed: 68 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,28 @@ build_linux:
135135
- MAKEFLAGS= make install-strip
136136
- *dist_archive
137137

138+
build_linux_armel:
139+
stage: build
140+
image: $CI_DOCKER_REGISTRY/esp32-toolchain-arm-cross
141+
tags:
142+
- build
143+
artifacts:
144+
paths:
145+
- ${DIST_ART_DIR}
146+
expire_in: 2 weeks
147+
variables:
148+
CONF_HOST: "arm-linux-gnueabi"
149+
PLATFORM_NAME: "armel"
150+
script:
151+
- *get_release_name
152+
- *add_gitlab_key
153+
- *submodules_mirror_update
154+
- ./bootstrap
155+
- ./configure --prefix=$PWD/$DIST_INSTALLED_DIR --host=${CONF_HOST} $OPENOCD_CONFIGURE_OPTS
156+
- make
157+
- MAKEFLAGS= make install-strip
158+
- *dist_archive
159+
138160
build_windows:
139161
stage: build
140162
image: $CI_DOCKER_REGISTRY/esp32-toolchain-win-cross
@@ -145,6 +167,7 @@ build_windows:
145167
- ${DIST_ART_DIR}
146168
expire_in: 2 weeks
147169
variables:
170+
CONF_HOST: "i686-w64-mingw32"
148171
PLATFORM_NAME: "win32"
149172
ARCHIVE_TOOL: "zip -r"
150173
ARCHIVE_EXT: "zip"
@@ -158,18 +181,18 @@ build_windows:
158181
- tar xzf $LIBUSB_VER.tar.gz && rm $LIBUSB_VER.tar.gz
159182
- pushd $LIBUSB_VER
160183
- ./bootstrap.sh
161-
- ./configure --prefix=$PWD/dist --host=i686-w64-mingw32 --enable-shared=no --enable-static=yes
184+
- ./configure --prefix=$PWD/dist --host=${CONF_HOST} --enable-shared=no --enable-static=yes
162185
- make
163186
- make install-strip
164187
- export PKG_CONFIG_PATH=$PWD/dist/lib/pkgconfig
165188
- popd
166189
# Build OpenOCD
167190
- git submodule update --init
168191
- ./bootstrap
169-
- ./configure --prefix=$PWD/$DIST_INSTALLED_DIR --host=i686-w64-mingw32 $OPENOCD_CONFIGURE_OPTS
192+
- ./configure --prefix=$PWD/$DIST_INSTALLED_DIR --host=${CONF_HOST} $OPENOCD_CONFIGURE_OPTS
170193
- make
171194
- MAKEFLAGS= make install-strip
172-
- cp /usr/i686-w64-mingw32/lib/libwinpthread-1.dll $DIST_INSTALLED_DIR/bin/
195+
- cp /usr/${CONF_HOST}/lib/libwinpthread-1.dll $DIST_INSTALLED_DIR/bin/
173196
- *dist_archive
174197

175198
build_macos:
@@ -245,6 +268,8 @@ build_test_app:
245268
- pushd esp-idf
246269
- tools/ci/mirror-submodule-update.sh
247270
- export IDF_PATH=$PWD
271+
- export BATCH_BUILD=1
272+
- export V=0
248273
- popd
249274
# Build generic test app
250275
- pushd testing/esp/test_apps/gen_ut_app
@@ -254,7 +279,7 @@ build_test_app:
254279
- make ut-build-single_core
255280
- popd
256281

257-
run_autotests:
282+
run_autotests_linux64:
258283
stage: test
259284
image: $CI_DOCKER_REGISTRY/esp32-ci-env
260285
tags:
@@ -271,14 +296,43 @@ run_autotests:
271296
variables:
272297
PLATFORM_NAME: "linux64"
273298
script:
274-
# Run tests
275-
- ARCHIVE_NAME=$(cat ${DIST_ART_DIR}/dist_name_${PLATFORM_NAME})
276-
- mkdir -p tmp
277-
- tar -C tmp/ -x -f ${DIST_ART_DIR}/${ARCHIVE_NAME}
278-
- export DIST_DIR=${PWD}/tmp/${DIST_INSTALLED_DIR}
279-
- pushd testing/esp
280-
- ./run_tests.py -o $DIST_DIR/bin/openocd -s $DIST_DIR/share/openocd/scripts -a $PWD/test_apps -d 4 -l ./debug_backend_tests.log
281-
- popd
299+
# Run tests
300+
- ARCHIVE_NAME=$(cat ${DIST_ART_DIR}/dist_name_${PLATFORM_NAME})
301+
- mkdir -p tmp
302+
- tar -C tmp/ -x -f ${DIST_ART_DIR}/${ARCHIVE_NAME}
303+
- export DIST_DIR=${PWD}/tmp/${DIST_INSTALLED_DIR}
304+
- pushd testing/esp
305+
- ./run_tests.py -o $DIST_DIR/bin/openocd -s $DIST_DIR/share/openocd/scripts -a $PWD/test_apps -d 4 -l ./debug_backend_tests.log
306+
- popd
307+
308+
run_autotests_armel:
309+
stage: test
310+
tags:
311+
- rpi-shell
312+
allow_failure: true
313+
artifacts:
314+
paths:
315+
- testing/esp/debug_backend_tests.log
316+
when: always
317+
expire_in: 1 week
318+
dependencies:
319+
- build_test_app
320+
- build_linux_armel
321+
variables:
322+
PLATFORM_NAME: "armel"
323+
script:
324+
# xtensa-esp32-elf was added to PATH
325+
# gitlab-runner user was added to plugdev group
326+
# udev rule for plugdev was added to rules.d/ (see github.com/arduino/OpenOCD/blob/master/contrib/60-openocd.rules)
327+
#
328+
# Run tests
329+
- ARCHIVE_NAME=$(cat ${DIST_ART_DIR}/dist_name_${PLATFORM_NAME})
330+
- mkdir -p tmp
331+
- tar -C tmp/ -x -f ${DIST_ART_DIR}/${ARCHIVE_NAME}
332+
- export DIST_DIR=${PWD}/tmp/${DIST_INSTALLED_DIR}
333+
- pushd testing/esp
334+
- ./run_tests.py -o $DIST_DIR/bin/openocd -s $DIST_DIR/share/openocd/scripts -a $PWD/test_apps -d 4 -l ./debug_backend_tests.log
335+
- popd
282336

283337
push_master_to_github:
284338
stage: deploy
@@ -320,6 +374,8 @@ release_tag_draft:
320374
# Upload archives
321375
- PLATFORM_NAME="linux64"
322376
- *gh_upload_archive
377+
- PLATFORM_NAME="armel"
378+
- *gh_upload_archive
323379
- PLATFORM_NAME="win32"
324380
- *gh_upload_archive
325381
- PLATFORM_NAME="macos"

0 commit comments

Comments
 (0)