diff --git a/.travis.yml b/.travis.yml index bb40bc7..b8fc1a3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ sudo: required -dist: trusty +services: + - docker language: generic @@ -7,22 +8,23 @@ env: matrix: - CC=gcc ARCH_SUFFIX= ARCH_NATIVE=1 MINIMAL= - CC=gcc ARCH_SUFFIX=amd64 ARCH_NATIVE=1 MINIMAL= + - CC=arm-linux-gnueabi-gcc ARCH_SUFFIX=armel ARCH_NATIVE= MINIMAL= - CC=arm-linux-gnueabihf-gcc ARCH_SUFFIX=armhf ARCH_NATIVE= MINIMAL= - CC=aarch64-linux-gnu-gcc ARCH_SUFFIX=arm64 ARCH_NATIVE= MINIMAL= - CFLAGS="-m32" ARCH_SUFFIX=i386 ARCH_NATIVE= MINIMAL= + - CC=powerpc64le-linux-gnu-gcc ARCH_SUFFIX=ppc64el ARCH_NATIVE= MINIMAL= + - CC=s390x-linux-gnu-gcc ARCH_SUFFIX=s390x ARCH_NATIVE= MINIMAL= - CC=musl-gcc ARCH_SUFFIX=muslc-amd64 ARCH_NATIVE=1 MINIMAL= - CC=gcc ARCH_SUFFIX=amd64 ARCH_NATIVE=1 MINIMAL=1 global: - - SIGN_BINARIES=1 - secure: "RKF9Z9gLxp6k/xITqn7ma1E9HfpYcDXuJFf4862WeH9EMnK9lDq+TWnGsQfkIlqh8h9goe7U+BvRiTibj9MiD5u7eluLo3dlwsLxPpYtyswYeLeC1wKKdT5LPGAXbRKomvBalRYMI+dDnGIM4w96mHgGGvx2zZXGkiAQhm6fJ3k=" - - DIST_DIR="${HOME}/up" + - DIST_DIR="${PWD}/dist" before_install: - openssl aes-256-cbc -K $encrypted_2893fd5649e7_key -iv $encrypted_2893fd5649e7_iv -in sign.key.enc -out sign.key -d || echo "Encrypted signing key unavailable" script: - - sudo ./ci/install_deps.sh - - ./ci/run_build.sh + - ./ddist.sh "$ARCH_SUFFIX" - ls -lah "$DIST_DIR" - git diff --exit-code diff --git a/Dockerfile b/Dockerfile index a71d0d6..4ee1a8b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:trusty +FROM ubuntu:xenial ARG ARCH_SUFFIX diff --git a/ci/install_deps.sh b/ci/install_deps.sh index 6c6a211..693d5ce 100755 --- a/ci/install_deps.sh +++ b/ci/install_deps.sh @@ -4,17 +4,23 @@ set -o nounset set -o xtrace DEPS=( - build-essential git gdb valgrind cmake rpm \ - python-dev libcap-dev python-pip python-virtualenv \ + build-essential git gdb valgrind cmake rpm file + libcap-dev python-dev python-pip python-setuptools hardening-includes gnupg ) if [[ -z "${ARCH_SUFFIX-}" ]] || [[ "$ARCH_SUFFIX" = "amd64" ]]; then true +elif [[ "$ARCH_SUFFIX" = "armel" ]]; then + DEPS+=(gcc-arm-linux-gnueabi binutils-arm-linux-gnueabi libc6-dev-armel-cross) elif [[ "$ARCH_SUFFIX" = "armhf" ]]; then - DEPS+=(gcc-arm-linux-gnueabihf binutils-arm-linux-gnueabi libc6-dev-armhf-cross) + DEPS+=(gcc-arm-linux-gnueabihf binutils-arm-linux-gnueabihf libc6-dev-armhf-cross) elif [[ "$ARCH_SUFFIX" = "arm64" ]]; then DEPS+=(gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu libc6-dev-arm64-cross) +elif [[ "$ARCH_SUFFIX" = "ppc64el" ]]; then + DEPS+=(gcc-powerpc64le-linux-gnu binutils-powerpc64le-linux-gnu libc6-dev-ppc64el-cross) +elif [[ "$ARCH_SUFFIX" = "s390x" ]]; then + DEPS+=(gcc-s390x-linux-gnu binutils-s390x-linux-gnu libc6-dev-s390x-cross) elif [[ "$ARCH_SUFFIX" = "i386" ]]; then DEPS+=(libc6-dev-i386 gcc-multilib) elif [[ "$ARCH_SUFFIX" = "muslc-amd64" ]]; then @@ -27,3 +33,5 @@ fi apt-get update apt-get install --no-install-recommends --yes "${DEPS[@]}" rm -rf /var/lib/apt/lists/* + +pip install virtualenv diff --git a/ddist.sh b/ddist.sh index 8d576b0..0625399 100755 --- a/ddist.sh +++ b/ddist.sh @@ -29,7 +29,8 @@ docker run -it --rm \ -e GPG_PASSPHRASE="${GPG_PASSPHRASE:=}" \ -e CC="${CC:=gcc}" \ -e CFLAGS="${CFLAGS-}" \ - -e ARCH_NATIVE="${ARCH_NATIVE-1}" \ + -e ARCH_NATIVE="${ARCH_NATIVE-}" \ -e ARCH_SUFFIX="${suffix}" \ -e MINIMAL="${MINIMAL-}" \ + -u "$(id -u):$(id -g)" \ "${IMG}" "${SRC}/ci/run_build.sh"