From 520f9865db583d188a1471d191f28f38c3cb4b31 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Fri, 26 Jan 2018 14:39:07 +0900 Subject: [PATCH] Bug 1432397 - Switch mingw builds to a Debian stretch-based docker image. r=dustin Don't build ucl when building upx, Debian stretch has a recent enough version. In fact, the last upstream version doesn't build with GCC in Debian stretch (http://bugs.debian.org/811707) --HG-- extra : rebase_source : aae67773b9dd3b99f6ddf9ab7f59a628037e6925 --- taskcluster/ci/build/windows.yml | 1 + taskcluster/ci/docker-image/kind.yml | 3 ++ taskcluster/ci/toolchain/linux.yml | 10 ++-- taskcluster/docker/mingw32-build/Dockerfile | 53 +++++++++++++++++++++ taskcluster/scripts/misc/build-upx.sh | 13 ----- 5 files changed, 62 insertions(+), 18 deletions(-) create mode 100644 taskcluster/docker/mingw32-build/Dockerfile diff --git a/taskcluster/ci/build/windows.yml b/taskcluster/ci/build/windows.yml index 4b49fbb9d715..790159cfefb2 100755 --- a/taskcluster/ci/build/windows.yml +++ b/taskcluster/ci/build/windows.yml @@ -650,6 +650,7 @@ win32-mingw32/debug: tier: 2 worker-type: aws-provisioner-v1/gecko-{level}-b-linux worker: + docker-image: {in-tree: mingw32-build} max-run-time: 7200 run: using: mozharness diff --git a/taskcluster/ci/docker-image/kind.yml b/taskcluster/ci/docker-image/kind.yml index 2be19612329e..346cae704b62 100644 --- a/taskcluster/ci/docker-image/kind.yml +++ b/taskcluster/ci/docker-image/kind.yml @@ -79,6 +79,9 @@ jobs: android-build: symbol: I(agb) parent: debian9-base + mingw32-build: + symbol: I(mingw) + parent: debian9-base index-task: symbol: I(idx) funsize-update-generator: diff --git a/taskcluster/ci/toolchain/linux.yml b/taskcluster/ci/toolchain/linux.yml index 3008858de4ba..39d9e59d061b 100755 --- a/taskcluster/ci/toolchain/linux.yml +++ b/taskcluster/ci/toolchain/linux.yml @@ -482,7 +482,7 @@ linux64-upx: tier: 2 worker-type: aws-provisioner-v1/gecko-{level}-b-linux worker: - docker-image: {in-tree: desktop-build} + docker-image: {in-tree: mingw32-build} max-run-time: 3600 run: using: toolchain-script @@ -498,7 +498,7 @@ linux64-wine: tier: 2 worker-type: aws-provisioner-v1/gecko-{level}-b-linux worker: - docker-image: {in-tree: desktop-build} + docker-image: {in-tree: mingw32-build} max-run-time: 10800 run: using: toolchain-script @@ -514,7 +514,7 @@ linux64-mingw32-gcc: tier: 2 worker-type: aws-provisioner-v1/gecko-{level}-b-linux worker: - docker-image: {in-tree: desktop-build} + docker-image: {in-tree: mingw32-build} max-run-time: 10800 run: using: toolchain-script @@ -532,7 +532,7 @@ linux64-mingw32-nsis: tier: 2 worker-type: aws-provisioner-v1/gecko-{level}-b-linux worker: - docker-image: {in-tree: desktop-build} + docker-image: {in-tree: mingw32-build} max-run-time: 3600 run: using: toolchain-script @@ -550,7 +550,7 @@ linux64-mingw32-fxc2: tier: 2 worker-type: aws-provisioner-v1/gecko-{level}-b-linux worker: - docker-image: {in-tree: desktop-build} + docker-image: {in-tree: mingw32-build} max-run-time: 1800 run: using: toolchain-script diff --git a/taskcluster/docker/mingw32-build/Dockerfile b/taskcluster/docker/mingw32-build/Dockerfile new file mode 100644 index 000000000000..e5924c996d12 --- /dev/null +++ b/taskcluster/docker/mingw32-build/Dockerfile @@ -0,0 +1,53 @@ +# %ARG DOCKER_IMAGE_PARENT +FROM $DOCKER_IMAGE_PARENT +MAINTAINER Mike Hommey + +VOLUME /builds/worker/checkouts +VOLUME /builds/worker/workspace +VOLUME /builds/worker/tooltool-cache + +ENV XZ_OPT=-T0 + +RUN dpkg --add-architecture i386 + +# Ideally, we wouldn't need gcc-multilib and the extra linux-libc-dev, +# but the latter is required to make the former installable, and the former +# because of bug 1409276. +RUN apt-get update && \ + apt-get install \ + autoconf2.13 \ + bison \ + bzip2 \ + flex \ + curl \ + file \ + gawk \ + g++-multilib \ + gnupg \ + libucl-dev \ + p7zip-full \ + scons \ + tar \ + unzip \ + uuid \ + wget \ + x11-utils \ + xvfb \ + yasm \ + zip \ + zlib1g-dev \ + libfreetype6-dev:i386 \ + libx11-dev:i386 + +# Stubbed out credentials; mozharness looks for this file an issues a WARNING +# if it's not found, which causes the build to fail. Note that this needs to +# be in the parent of the workspace directory and in the directory where +# mozharness is run (not its --work-dir). See Bug 1169652. +# %include taskcluster/docker/desktop-build/oauth.txt +COPY topsrcdir/taskcluster/docker/desktop-build/oauth.txt /builds/worker/ + +# stubbed out buildprops, which keeps mozharness from choking +# Note that this needs to be in the parent of the workspace directory and in +# the directory where mozharness is run (not its --work-dir) +# %include taskcluster/docker/desktop-build/buildprops.json +COPY topsrcdir/taskcluster/docker/desktop-build/buildprops.json /builds/worker/ diff --git a/taskcluster/scripts/misc/build-upx.sh b/taskcluster/scripts/misc/build-upx.sh index 85135aa6506b..9a3b7b15f929 100755 --- a/taskcluster/scripts/misc/build-upx.sh +++ b/taskcluster/scripts/misc/build-upx.sh @@ -10,23 +10,10 @@ mkdir -p $INSTALL_DIR/bin cd $WORKSPACE -# -------------- - -wget --progress=dot:mega http://www.oberhumer.com/opensource/ucl/download/ucl-1.03.tar.gz -echo "5847003d136fbbca1334dd5de10554c76c755f7c ucl-1.03.tar.gz" | sha1sum -c - -tar xf ucl-1.03.tar.gz -cd ucl-1.03 -./configure -make -j$(nproc) - -# -------------- - -cd .. git clone -n https://github.com/upx/upx.git upx-clone cd upx-clone git checkout d31947e1f016e87f24f88b944439bbee892f0429 # Asserts integrity of the clone (right?) git submodule update --init --recursive -export UPX_UCLDIR=$WORKSPACE/ucl-1.03 cd src make -j$(nproc) cp upx.out $INSTALL_DIR/bin/upx