Skip to content

Commit

Permalink
ci: Add build for the ARMEL architecture and test it
Browse files Browse the repository at this point in the history
  • Loading branch information
antmak authored and igrr committed Apr 18, 2018
1 parent d8969fe commit 039d2e8
Showing 1 changed file with 68 additions and 12 deletions.
80 changes: 68 additions & 12 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,28 @@ build_linux:
- MAKEFLAGS= make install-strip
- *dist_archive

build_linux_armel:
stage: build
image: $CI_DOCKER_REGISTRY/esp32-toolchain-arm-cross
tags:
- build
artifacts:
paths:
- ${DIST_ART_DIR}
expire_in: 2 weeks
variables:
CONF_HOST: "arm-linux-gnueabi"
PLATFORM_NAME: "armel"
script:
- *get_release_name
- *add_gitlab_key
- *submodules_mirror_update
- ./bootstrap
- ./configure --prefix=$PWD/$DIST_INSTALLED_DIR --host=${CONF_HOST} $OPENOCD_CONFIGURE_OPTS
- make
- MAKEFLAGS= make install-strip
- *dist_archive

build_windows:
stage: build
image: $CI_DOCKER_REGISTRY/esp32-toolchain-win-cross
Expand All @@ -145,6 +167,7 @@ build_windows:
- ${DIST_ART_DIR}
expire_in: 2 weeks
variables:
CONF_HOST: "i686-w64-mingw32"
PLATFORM_NAME: "win32"
ARCHIVE_TOOL: "zip -r"
ARCHIVE_EXT: "zip"
Expand All @@ -158,18 +181,18 @@ build_windows:
- tar xzf $LIBUSB_VER.tar.gz && rm $LIBUSB_VER.tar.gz
- pushd $LIBUSB_VER
- ./bootstrap.sh
- ./configure --prefix=$PWD/dist --host=i686-w64-mingw32 --enable-shared=no --enable-static=yes
- ./configure --prefix=$PWD/dist --host=${CONF_HOST} --enable-shared=no --enable-static=yes
- make
- make install-strip
- export PKG_CONFIG_PATH=$PWD/dist/lib/pkgconfig
- popd
# Build OpenOCD
- git submodule update --init
- ./bootstrap
- ./configure --prefix=$PWD/$DIST_INSTALLED_DIR --host=i686-w64-mingw32 $OPENOCD_CONFIGURE_OPTS
- ./configure --prefix=$PWD/$DIST_INSTALLED_DIR --host=${CONF_HOST} $OPENOCD_CONFIGURE_OPTS
- make
- MAKEFLAGS= make install-strip
- cp /usr/i686-w64-mingw32/lib/libwinpthread-1.dll $DIST_INSTALLED_DIR/bin/
- cp /usr/${CONF_HOST}/lib/libwinpthread-1.dll $DIST_INSTALLED_DIR/bin/
- *dist_archive

build_macos:
Expand Down Expand Up @@ -245,6 +268,8 @@ build_test_app:
- pushd esp-idf
- tools/ci/mirror-submodule-update.sh
- export IDF_PATH=$PWD
- export BATCH_BUILD=1
- export V=0
- popd
# Build generic test app
- pushd testing/esp/test_apps/gen_ut_app
Expand All @@ -254,7 +279,7 @@ build_test_app:
- make ut-build-single_core
- popd

run_autotests:
run_autotests_linux64:
stage: test
image: $CI_DOCKER_REGISTRY/esp32-ci-env
tags:
Expand All @@ -271,14 +296,43 @@ run_autotests:
variables:
PLATFORM_NAME: "linux64"
script:
# Run tests
- ARCHIVE_NAME=$(cat ${DIST_ART_DIR}/dist_name_${PLATFORM_NAME})
- mkdir -p tmp
- tar -C tmp/ -x -f ${DIST_ART_DIR}/${ARCHIVE_NAME}
- export DIST_DIR=${PWD}/tmp/${DIST_INSTALLED_DIR}
- pushd testing/esp
- ./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
- popd
# Run tests
- ARCHIVE_NAME=$(cat ${DIST_ART_DIR}/dist_name_${PLATFORM_NAME})
- mkdir -p tmp
- tar -C tmp/ -x -f ${DIST_ART_DIR}/${ARCHIVE_NAME}
- export DIST_DIR=${PWD}/tmp/${DIST_INSTALLED_DIR}
- pushd testing/esp
- ./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
- popd

run_autotests_armel:
stage: test
tags:
- rpi-shell
allow_failure: true
artifacts:
paths:
- testing/esp/debug_backend_tests.log
when: always
expire_in: 1 week
dependencies:
- build_test_app
- build_linux_armel
variables:
PLATFORM_NAME: "armel"
script:
# xtensa-esp32-elf was added to PATH
# gitlab-runner user was added to plugdev group
# udev rule for plugdev was added to rules.d/ (see github.com/arduino/OpenOCD/blob/master/contrib/60-openocd.rules)
#
# Run tests
- ARCHIVE_NAME=$(cat ${DIST_ART_DIR}/dist_name_${PLATFORM_NAME})
- mkdir -p tmp
- tar -C tmp/ -x -f ${DIST_ART_DIR}/${ARCHIVE_NAME}
- export DIST_DIR=${PWD}/tmp/${DIST_INSTALLED_DIR}
- pushd testing/esp
- ./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
- popd

push_master_to_github:
stage: deploy
Expand Down Expand Up @@ -320,6 +374,8 @@ release_tag_draft:
# Upload archives
- PLATFORM_NAME="linux64"
- *gh_upload_archive
- PLATFORM_NAME="armel"
- *gh_upload_archive
- PLATFORM_NAME="win32"
- *gh_upload_archive
- PLATFORM_NAME="macos"
Expand Down

0 comments on commit 039d2e8

Please sign in to comment.