Skip to content

Commit

Permalink
remove support for INJECT_QEMU
Browse files Browse the repository at this point in the history
  • Loading branch information
mathias-luedtke committed Dec 21, 2019
1 parent 08435a5 commit d02886f
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 29 deletions.
7 changes: 6 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ services:
- docker:dind

before_script:
- apk add --update bash coreutils tar # install industrial_ci dependencies
- apk add --update bash coreutils tar grep # install industrial_ci dependencies
# for regular users: - git clone --quiet --depth 1 https://github.com/ros-industrial/industrial_ci .industrial_ci -b master
- mkdir .industrial_ci && cp -a * .industrial_ci # this is only needed for branch testing of industrial_ci itself

Expand Down Expand Up @@ -62,3 +62,8 @@ docker_no_pull:
- docker pull rosindustrial/ci:kinetic-xenial-shadow-fixed
- docker tag rosindustrial/ci:kinetic-xenial-shadow-fixed industrial-ci/ubuntu:xenial
- .industrial_ci/gitlab.sh ROS_DISTRO=kinetic DOCKER_IMAGE="industrial-ci/ubuntu:xenial" DOCKER_PULL=false

test_arm:
script:
- docker run --rm --privileged multiarch/qemu-user-static --reset --credential yes --persistent yes
- .industrial_ci/gitlab.sh DOCKER_IMAGE='arm32v7/ros:melodic-ros-core' BEFORE_INIT='[[ $(uname -p) == armv7l ]] && exit 42' EXPECT_EXIT_CODE=42
12 changes: 7 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ env:
- ROS_DISTRO=indigo TARGET_WORKSPACE='industrial_ci/mockups/industrial_ci_testpkg' CATKIN_LINT=pedantic EXPECT_EXIT_CODE=1
- ROS_DISTRO=indigo TARGET_WORKSPACE='industrial_ci/mockups/industrial_ci_testpkg' ROSDEP_SKIP_KEYS="rospy_tutorials rostest" EXPECT_EXIT_CODE=1
- ROS_DISTRO=indigo TARGET_WORKSPACE='industrial_ci/mockups/testpkg_broken_install' EXPECT_EXIT_CODE=1
- DOCKER_IMAGE='arm32v7/ros:indigo-ros-core' ADDITIONAL_DEBS="build-essential python-catkin-tools python-pip" INJECT_QEMU=arm BEFORE_INIT='[[ $(uname -p) == armv7l ]]'
- ROS_DISTRO=melodic NOT_TEST_BUILD='true' _GUARD_INTERVAL=10
- ROS_DISTRO=indigo NOT_TEST_INSTALL='true' BEFORE_INIT='test -z "${CXX+x}"' # test that CXX is not set
- ROS_DISTRO=indigo NOT_TEST_INSTALL='true' CXX=/usr/bin/gcc BEFORE_INIT='test -z "${CXX+x}"' EXPECT_EXIT_CODE=1 # test the CXX test
Expand Down Expand Up @@ -84,16 +83,19 @@ matrix:
allow_failures:
- env: ROS_DISTRO=indigo NOT_TEST_BUILD='true' NOT_TEST_INSTALL='true' POST_PROCESS='I_am_supposed_to_fail'
include:
- install:
- docker run --rm --privileged multiarch/qemu-user-static --reset --credential yes --persistent yes
env:
- DOCKER_IMAGE='arm32v7/ros:melodic-ros-core' BEFORE_INIT='[[ $(uname -p) == armv7l ]] && exit 42' EXPECT_EXIT_CODE=42
name: "Test on ARM"
- script:
- industrial_ci/scripts/run_travis
- industrial_ci/scripts/run_travis 1
env: [run_travis]
name: run_travis
- script: shellcheck -x *.sh industrial_ci/scripts/*_ci industrial_ci/src/*.sh industrial_ci/src/*/*.sh industrial_ci/*.sh
env: [shellcheck]
name: shellcheck


install:
- sudo apt-get install qemu-user-static
script:
- industrial_ci/_wrap_test.sh # this script is only for internal use
- if ! [ -z "$POST_PROCESS" ]; then $POST_PROCESS; fi
1 change: 0 additions & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ Note that some of these currently tied only to a single option, but we still lea
* **DOWNSTREAM_CMAKE_ARGS** (default: not set): Addtional CMake arguments for downstream `workspace <#workspace-management>`__.
* **DOWNSTREAM_WORKSPACE** (default: not set): Definition of downstream `workspace <#workspace-management>`__.
* **EXPECT_EXIT_CODE** (default: 0): exit code must match this value for test to succeed
* **INJECT_QEMU** (default: not set): Inject static qemu emulator for cross-platform builds, e.g. `INJECT_QEMU=arm`. This requires to install `qemu-user-static` on the host. The emulated build might take much longer!
* **IMMEDIATE_TEST_OUTPUT** (default: not set): If true, test output is printed immediately during the tests
* **NOT_TEST_BUILD** (default: not set): If true, tests in `build` space won't be run.
* **NOT_TEST_DOWNSTREAM** (default: not set): If true, tests in the downstream workspace won't be run.
Expand Down
10 changes: 10 additions & 0 deletions doc/migration_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Some features are not supported anymore:
* Support of ROS hydro
* Devel space builds
* Testing installed \*.test files
* Injecting QEMU (see [`INJECT_QEMU`](#inject_qemu))
* Job control settings have been removed for now

If you depend on these, you can still use the [legacy](https://github.com/ros-industrial/industrial_ci/tree/legacy) version.
Expand Down Expand Up @@ -54,6 +55,7 @@ Special care must be taken, if you use any of these variables:
* [`DOCKER_IMAGE`](#docker_image)
* [`HASHKEY_SKS`](#hashkey_sks)
* [`NOT_TEST_INSTALL`](#not_test_install)
* [`INJECT_QEMU`](#inject_qemu)
* [`PKGS_DOWNSTREAM`](#pkgs_downstream)
* [`ROSINSTALL_FILENAME`](#rosinstall_filename)
* [`ROS_PARALLEL_JOBS`](#ros_parallel_jobs)
Expand Down Expand Up @@ -197,6 +199,14 @@ This variable is still supported, but the [workspace layout has changed](#worksp

Will only be used if [`APTKEY_STORE_HTTPS`](#aptkey_store_https) is not set.

### INJECT_QEMU

This option was removed. It is not needed for newer versions of `qemu-user-static` (host OS: Ubuntu cosmic or newer, Debian buster or newer).
For older versions, please try
```
docker run --rm --privileged multiarch/qemu-user-static --reset --credential yes --persistent yes
```

### NOT_TEST_INSTALL

This feature was removed, please use the [legacy](https://github.com/ros-industrial/industrial_ci/tree/legacy) version.
Expand Down
22 changes: 0 additions & 22 deletions industrial_ci/src/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,6 @@ function ici_run_cmd_in_docker() {
run_opts+=(-v "$CCACHE_DIR:/root/.ccache" -e "CCACHE_DIR=/root/.ccache")
fi

if [ -n "$INJECT_QEMU" ]; then
local qemu_path
qemu_path=$(command -v "qemu-$INJECT_QEMU-static") || ici_error "please install qemu-user-static"
run_opts+=(-v "$qemu_path:$qemu_path:ro")
fi

local hooks=()
for hook in $(env | grep -o '^\(BEFORE\|AFTER\)_[^=]*'); do
hooks+=(-e "$hook")
Expand Down Expand Up @@ -220,22 +214,6 @@ function ici_prepare_docker_image() {
# (None)

function ici_build_default_docker_image() {
if [ -n "$INJECT_QEMU" ]; then
local qemu_path
qemu_path=$(command -v "qemu-$INJECT_QEMU-static") || ici_error "please install qemu-user-static"
echo "Inject qemu..."
local qemu_temp
qemu_temp=$(mktemp -d)
cat <<EOF > "$qemu_temp/Dockerfile"
FROM $DOCKER_BASE_IMAGE
COPY '$(basename "$qemu_path")' '$qemu_path'
EOF
cp "$qemu_path" "$qemu_temp"
unset INJECT_QEMU
export DOCKER_BASE_IMAGE="$DOCKER_BASE_IMAGE-qemu"
DOCKER_IMAGE="$DOCKER_BASE_IMAGE" ici_quiet ici_docker_build "$qemu_temp"
rm -rf "$qemu_temp"
fi
# choose a unique image name
export DOCKER_IMAGE="industrial-ci/$ROS_DISTRO/$DOCKER_BASE_IMAGE"
echo "Building image '$DOCKER_IMAGE':"
Expand Down
1 change: 1 addition & 0 deletions industrial_ci/src/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

ici_enforce_deprecated BEFORE_SCRIPT "Please migrate to new hook system."
ici_enforce_deprecated CATKIN_CONFIG "Explicit catkin configuration is not available anymore."
ici_enforce_deprecated INJECT_QEMU "Please check https://github.com/ros-industrial/industrial_ci/blob/master/doc/migration_guide.md#inject_qemu"

if [ -n "$NOT_TEST_INSTALL" ]; then
if [ "$NOT_TEST_INSTALL" != true ]; then
Expand Down

0 comments on commit d02886f

Please sign in to comment.