From baad84efb28f828ca3dce459eced2163590d839d Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Thu, 12 Nov 2020 12:22:41 +0000 Subject: [PATCH] ci: run aarch64 compile tests on Drone Besides Travis CI Drone CI seems to be only service providing ARM based builds. This switches the aarch64 and arm32 builds to drone.io. Because Drone CI is running in a Docker container we cannot use 'setarch linux32' as it requires the blocked syscall 'personality(2)'. But Drone CI provides an 'arch: arm' which gives the same architecture as 'setarch linux32' on Travis aarch64: armv8l Signed-off-by: Adrian Reber --- .drone.yml | 65 ++++++++++++++++++++++++++++++++++++++ .travis.yml | 10 ------ scripts/ci/run-ci-tests.sh | 10 +++--- 3 files changed, 71 insertions(+), 14 deletions(-) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 000000000..d21b6edbb --- /dev/null +++ b/.drone.yml @@ -0,0 +1,65 @@ +--- +kind: pipeline +type: docker +name: aarch64 build GCC (native) + +platform: + os: linux + arch: arm64 + +steps: +- name: build + image: ubuntu:focal + commands: + - scripts/ci/apt-install make + - make -C scripts/ci local + +--- +kind: pipeline +type: docker +name: aarch64 build CLANG (native) + +platform: + os: linux + arch: arm64 + +steps: +- name: build + image: ubuntu:focal + commands: + - scripts/ci/apt-install make + - make -C scripts/ci local CLANG=1 + +--- +kind: pipeline +type: docker +name: armhf build GCC (native) + +platform: + os: linux + arch: arm + +steps: +- name: build + # At the time of setting up focal did not work + image: ubuntu:bionic + commands: + - scripts/ci/apt-install make + - make -C scripts/ci local + +--- +kind: pipeline +type: docker +name: armhf build CLANG (native) + +platform: + os: linux + arch: arm + +steps: +- name: build + # At the time of setting up focal did not work + image: ubuntu:bionic + commands: + - scripts/ci/apt-install make + - make -C scripts/ci local CLANG=1 diff --git a/.travis.yml b/.travis.yml index 562026bf2..10437aa4e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,16 +33,6 @@ jobs: group: edge virt: vm dist: bionic - - os: linux - arch: arm64 - # This runs on aarch64 with 'setarch linux32' - env: TR_ARCH=armv7hf - dist: bionic - - os: linux - arch: arm64 - # This runs on aarch64 with 'setarch linux32' - env: TR_ARCH=armv7hf CLANG=1 - dist: bionic - os: linux arch: arm64 env: TR_ARCH=fedora-rawhide diff --git a/scripts/ci/run-ci-tests.sh b/scripts/ci/run-ci-tests.sh index 1a51d6aeb..900bba594 100755 --- a/scripts/ci/run-ci-tests.sh +++ b/scripts/ci/run-ci-tests.sh @@ -4,7 +4,8 @@ set -x -e CI_PKGS="protobuf-c-compiler libprotobuf-c-dev libaio-dev libgnutls28-dev libgnutls30 libprotobuf-dev protobuf-compiler libcap-dev libnl-3-dev gdb bash libnet-dev util-linux asciidoctor - libnl-route-3-dev time ccache flake8 libbsd-dev" + libnl-route-3-dev time ccache flake8 libbsd-dev + libperl-dev pkg-config" if [ -e /etc/lsb-release ]; then @@ -51,12 +52,13 @@ ci_prep () { # This can fail on aarch64 travis service apport stop || : - CC=gcc - # clang support if [ "$CLANG" = "1" ]; then - CI_PKGS="$CI_PKGS clang" + # clang support CC=clang + else + CC=gcc fi + CI_PKGS="$CI_PKGS $CC" [ -n "$GCOV" ] && { apt-add-repository -y "ppa:ubuntu-toolchain-r/test"