Add support for armel (ARMv5), ppc64el (IBM POWER 8), and s390x (IBM z Systems)

This required updating to Ubuntu Xenial for some of the cross compilers, but Travis doesn't support Xenial builders, so this instead converts Travis to use the already-existing "ddist.sh" script for building via Docker.
pull/98/head
Tianon Gravi 7 years ago
parent 0c28623811
commit 7be42da42b
  1. 12
      .travis.yml
  2. 2
      Dockerfile
  3. 14
      ci/install_deps.sh
  4. 3
      ddist.sh

@ -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

@ -1,4 +1,4 @@
FROM ubuntu:trusty
FROM ubuntu:xenial
ARG ARCH_SUFFIX

@ -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

@ -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"

Loading…
Cancel
Save