From b596ec78ad5b2cdc2986a65a4a5fb9728316d069 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 2 Aug 2021 10:43:08 -0700 Subject: [PATCH 1/2] Adjust "--enable-jit" to be properly conditional --- 3.8-rc/alpine/Dockerfile | 7 ++++++- 3.8-rc/ubuntu/Dockerfile | 7 ++++++- 3.8/alpine/Dockerfile | 7 ++++++- 3.8/ubuntu/Dockerfile | 7 ++++++- 3.9-rc/alpine/Dockerfile | 7 ++++++- 3.9-rc/ubuntu/Dockerfile | 7 ++++++- 3.9/alpine/Dockerfile | 7 ++++++- 3.9/ubuntu/Dockerfile | 7 ++++++- Dockerfile-alpine.template | 7 ++++++- Dockerfile-ubuntu.template | 7 ++++++- 10 files changed, 60 insertions(+), 10 deletions(-) diff --git a/3.8-rc/alpine/Dockerfile b/3.8-rc/alpine/Dockerfile index 2261e686..a5df046e 100644 --- a/3.8-rc/alpine/Dockerfile +++ b/3.8-rc/alpine/Dockerfile @@ -116,6 +116,11 @@ RUN set -eux; \ hostArch="$(dpkg-architecture --query DEB_HOST_GNU_TYPE)"; \ buildArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ dpkgArch="$(dpkg --print-architecture)"; dpkgArch="${dpkgArch##*-}"; \ +# JIT is only supported on amd64 (until 24.x+1, where it will support arm64 as well); https://github.com/erlang/otp/blob/OTP-24.0.5/erts/configure#L21694-L21709 / https://github.com/erlang/otp/pull/4869 + jitFlag=; \ + case "$dpkgArch" in \ + amd64) jitFlag='--enable-jit' ;; \ + esac; \ ./configure \ --host="$hostArch" \ --build="$buildArch" \ @@ -123,7 +128,6 @@ RUN set -eux; \ --disable-hipe \ --disable-sctp \ --disable-silent-rules \ - --enable-jit \ --enable-clock-gettime \ --enable-hybrid-heap \ --enable-kernel-poll \ @@ -149,6 +153,7 @@ RUN set -eux; \ --without-ssh \ --without-tftp \ --without-wx \ + $jitFlag \ ; \ # Compile & install Erlang/OTP make -j "$(getconf _NPROCESSORS_ONLN)" GEN_OPT_FLGS="-O2 -fno-strict-aliasing"; \ diff --git a/3.8-rc/ubuntu/Dockerfile b/3.8-rc/ubuntu/Dockerfile index 08d6b279..03548f71 100644 --- a/3.8-rc/ubuntu/Dockerfile +++ b/3.8-rc/ubuntu/Dockerfile @@ -123,6 +123,11 @@ RUN set -eux; \ hostArch="$(dpkg-architecture --query DEB_HOST_GNU_TYPE)"; \ buildArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ dpkgArch="$(dpkg --print-architecture)"; dpkgArch="${dpkgArch##*-}"; \ +# JIT is only supported on amd64 (until 24.x+1, where it will support arm64 as well); https://github.com/erlang/otp/blob/OTP-24.0.5/erts/configure#L21694-L21709 / https://github.com/erlang/otp/pull/4869 + jitFlag=; \ + case "$dpkgArch" in \ + amd64) jitFlag='--enable-jit' ;; \ + esac; \ ./configure \ --host="$hostArch" \ --build="$buildArch" \ @@ -130,7 +135,6 @@ RUN set -eux; \ --disable-hipe \ --disable-sctp \ --disable-silent-rules \ - --enable-jit \ --enable-clock-gettime \ --enable-hybrid-heap \ --enable-kernel-poll \ @@ -156,6 +160,7 @@ RUN set -eux; \ --without-ssh \ --without-tftp \ --without-wx \ + $jitFlag \ ; \ # Compile & install Erlang/OTP make -j "$(getconf _NPROCESSORS_ONLN)" GEN_OPT_FLGS="-O2 -fno-strict-aliasing"; \ diff --git a/3.8/alpine/Dockerfile b/3.8/alpine/Dockerfile index 51b9399d..a7493465 100644 --- a/3.8/alpine/Dockerfile +++ b/3.8/alpine/Dockerfile @@ -116,6 +116,11 @@ RUN set -eux; \ hostArch="$(dpkg-architecture --query DEB_HOST_GNU_TYPE)"; \ buildArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ dpkgArch="$(dpkg --print-architecture)"; dpkgArch="${dpkgArch##*-}"; \ +# JIT is only supported on amd64 (until 24.x+1, where it will support arm64 as well); https://github.com/erlang/otp/blob/OTP-24.0.5/erts/configure#L21694-L21709 / https://github.com/erlang/otp/pull/4869 + jitFlag=; \ + case "$dpkgArch" in \ + amd64) jitFlag='--enable-jit' ;; \ + esac; \ ./configure \ --host="$hostArch" \ --build="$buildArch" \ @@ -123,7 +128,6 @@ RUN set -eux; \ --disable-hipe \ --disable-sctp \ --disable-silent-rules \ - --enable-jit \ --enable-clock-gettime \ --enable-hybrid-heap \ --enable-kernel-poll \ @@ -149,6 +153,7 @@ RUN set -eux; \ --without-ssh \ --without-tftp \ --without-wx \ + $jitFlag \ ; \ # Compile & install Erlang/OTP make -j "$(getconf _NPROCESSORS_ONLN)" GEN_OPT_FLGS="-O2 -fno-strict-aliasing"; \ diff --git a/3.8/ubuntu/Dockerfile b/3.8/ubuntu/Dockerfile index b85736b6..6424f429 100644 --- a/3.8/ubuntu/Dockerfile +++ b/3.8/ubuntu/Dockerfile @@ -123,6 +123,11 @@ RUN set -eux; \ hostArch="$(dpkg-architecture --query DEB_HOST_GNU_TYPE)"; \ buildArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ dpkgArch="$(dpkg --print-architecture)"; dpkgArch="${dpkgArch##*-}"; \ +# JIT is only supported on amd64 (until 24.x+1, where it will support arm64 as well); https://github.com/erlang/otp/blob/OTP-24.0.5/erts/configure#L21694-L21709 / https://github.com/erlang/otp/pull/4869 + jitFlag=; \ + case "$dpkgArch" in \ + amd64) jitFlag='--enable-jit' ;; \ + esac; \ ./configure \ --host="$hostArch" \ --build="$buildArch" \ @@ -130,7 +135,6 @@ RUN set -eux; \ --disable-hipe \ --disable-sctp \ --disable-silent-rules \ - --enable-jit \ --enable-clock-gettime \ --enable-hybrid-heap \ --enable-kernel-poll \ @@ -156,6 +160,7 @@ RUN set -eux; \ --without-ssh \ --without-tftp \ --without-wx \ + $jitFlag \ ; \ # Compile & install Erlang/OTP make -j "$(getconf _NPROCESSORS_ONLN)" GEN_OPT_FLGS="-O2 -fno-strict-aliasing"; \ diff --git a/3.9-rc/alpine/Dockerfile b/3.9-rc/alpine/Dockerfile index 1b85ad9d..5ad66c8b 100644 --- a/3.9-rc/alpine/Dockerfile +++ b/3.9-rc/alpine/Dockerfile @@ -116,6 +116,11 @@ RUN set -eux; \ hostArch="$(dpkg-architecture --query DEB_HOST_GNU_TYPE)"; \ buildArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ dpkgArch="$(dpkg --print-architecture)"; dpkgArch="${dpkgArch##*-}"; \ +# JIT is only supported on amd64 (until 24.x+1, where it will support arm64 as well); https://github.com/erlang/otp/blob/OTP-24.0.5/erts/configure#L21694-L21709 / https://github.com/erlang/otp/pull/4869 + jitFlag=; \ + case "$dpkgArch" in \ + amd64) jitFlag='--enable-jit' ;; \ + esac; \ ./configure \ --host="$hostArch" \ --build="$buildArch" \ @@ -123,7 +128,6 @@ RUN set -eux; \ --disable-hipe \ --disable-sctp \ --disable-silent-rules \ - --enable-jit \ --enable-clock-gettime \ --enable-hybrid-heap \ --enable-kernel-poll \ @@ -149,6 +153,7 @@ RUN set -eux; \ --without-ssh \ --without-tftp \ --without-wx \ + $jitFlag \ ; \ # Compile & install Erlang/OTP make -j "$(getconf _NPROCESSORS_ONLN)" GEN_OPT_FLGS="-O2 -fno-strict-aliasing"; \ diff --git a/3.9-rc/ubuntu/Dockerfile b/3.9-rc/ubuntu/Dockerfile index f36cafc0..0dc8fa32 100644 --- a/3.9-rc/ubuntu/Dockerfile +++ b/3.9-rc/ubuntu/Dockerfile @@ -123,6 +123,11 @@ RUN set -eux; \ hostArch="$(dpkg-architecture --query DEB_HOST_GNU_TYPE)"; \ buildArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ dpkgArch="$(dpkg --print-architecture)"; dpkgArch="${dpkgArch##*-}"; \ +# JIT is only supported on amd64 (until 24.x+1, where it will support arm64 as well); https://github.com/erlang/otp/blob/OTP-24.0.5/erts/configure#L21694-L21709 / https://github.com/erlang/otp/pull/4869 + jitFlag=; \ + case "$dpkgArch" in \ + amd64) jitFlag='--enable-jit' ;; \ + esac; \ ./configure \ --host="$hostArch" \ --build="$buildArch" \ @@ -130,7 +135,6 @@ RUN set -eux; \ --disable-hipe \ --disable-sctp \ --disable-silent-rules \ - --enable-jit \ --enable-clock-gettime \ --enable-hybrid-heap \ --enable-kernel-poll \ @@ -156,6 +160,7 @@ RUN set -eux; \ --without-ssh \ --without-tftp \ --without-wx \ + $jitFlag \ ; \ # Compile & install Erlang/OTP make -j "$(getconf _NPROCESSORS_ONLN)" GEN_OPT_FLGS="-O2 -fno-strict-aliasing"; \ diff --git a/3.9/alpine/Dockerfile b/3.9/alpine/Dockerfile index ec449f24..74620af5 100644 --- a/3.9/alpine/Dockerfile +++ b/3.9/alpine/Dockerfile @@ -116,6 +116,11 @@ RUN set -eux; \ hostArch="$(dpkg-architecture --query DEB_HOST_GNU_TYPE)"; \ buildArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ dpkgArch="$(dpkg --print-architecture)"; dpkgArch="${dpkgArch##*-}"; \ +# JIT is only supported on amd64 (until 24.x+1, where it will support arm64 as well); https://github.com/erlang/otp/blob/OTP-24.0.5/erts/configure#L21694-L21709 / https://github.com/erlang/otp/pull/4869 + jitFlag=; \ + case "$dpkgArch" in \ + amd64) jitFlag='--enable-jit' ;; \ + esac; \ ./configure \ --host="$hostArch" \ --build="$buildArch" \ @@ -123,7 +128,6 @@ RUN set -eux; \ --disable-hipe \ --disable-sctp \ --disable-silent-rules \ - --enable-jit \ --enable-clock-gettime \ --enable-hybrid-heap \ --enable-kernel-poll \ @@ -149,6 +153,7 @@ RUN set -eux; \ --without-ssh \ --without-tftp \ --without-wx \ + $jitFlag \ ; \ # Compile & install Erlang/OTP make -j "$(getconf _NPROCESSORS_ONLN)" GEN_OPT_FLGS="-O2 -fno-strict-aliasing"; \ diff --git a/3.9/ubuntu/Dockerfile b/3.9/ubuntu/Dockerfile index 39ca84ec..865fec17 100644 --- a/3.9/ubuntu/Dockerfile +++ b/3.9/ubuntu/Dockerfile @@ -123,6 +123,11 @@ RUN set -eux; \ hostArch="$(dpkg-architecture --query DEB_HOST_GNU_TYPE)"; \ buildArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ dpkgArch="$(dpkg --print-architecture)"; dpkgArch="${dpkgArch##*-}"; \ +# JIT is only supported on amd64 (until 24.x+1, where it will support arm64 as well); https://github.com/erlang/otp/blob/OTP-24.0.5/erts/configure#L21694-L21709 / https://github.com/erlang/otp/pull/4869 + jitFlag=; \ + case "$dpkgArch" in \ + amd64) jitFlag='--enable-jit' ;; \ + esac; \ ./configure \ --host="$hostArch" \ --build="$buildArch" \ @@ -130,7 +135,6 @@ RUN set -eux; \ --disable-hipe \ --disable-sctp \ --disable-silent-rules \ - --enable-jit \ --enable-clock-gettime \ --enable-hybrid-heap \ --enable-kernel-poll \ @@ -156,6 +160,7 @@ RUN set -eux; \ --without-ssh \ --without-tftp \ --without-wx \ + $jitFlag \ ; \ # Compile & install Erlang/OTP make -j "$(getconf _NPROCESSORS_ONLN)" GEN_OPT_FLGS="-O2 -fno-strict-aliasing"; \ diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index f90cd502..785be355 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -132,6 +132,11 @@ RUN set -eux; \ hostArch="$(dpkg-architecture --query DEB_HOST_GNU_TYPE)"; \ buildArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ dpkgArch="$(dpkg --print-architecture)"; dpkgArch="${dpkgArch##*-}"; \ +# JIT is only supported on amd64 (until 24.x+1, where it will support arm64 as well); https://github.com/erlang/otp/blob/OTP-24.0.5/erts/configure#L21694-L21709 / https://github.com/erlang/otp/pull/4869 + jitFlag=; \ + case "$dpkgArch" in \ + amd64) jitFlag='--enable-jit' ;; \ + esac; \ ./configure \ --host="$hostArch" \ --build="$buildArch" \ @@ -139,7 +144,6 @@ RUN set -eux; \ --disable-hipe \ --disable-sctp \ --disable-silent-rules \ - --enable-jit \ --enable-clock-gettime \ --enable-hybrid-heap \ --enable-kernel-poll \ @@ -165,6 +169,7 @@ RUN set -eux; \ --without-ssh \ --without-tftp \ --without-wx \ + $jitFlag \ ; \ # Compile & install Erlang/OTP make -j "$(getconf _NPROCESSORS_ONLN)" GEN_OPT_FLGS="-O2 -fno-strict-aliasing"; \ diff --git a/Dockerfile-ubuntu.template b/Dockerfile-ubuntu.template index dcbcaa56..85d1231d 100644 --- a/Dockerfile-ubuntu.template +++ b/Dockerfile-ubuntu.template @@ -139,6 +139,11 @@ RUN set -eux; \ hostArch="$(dpkg-architecture --query DEB_HOST_GNU_TYPE)"; \ buildArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ dpkgArch="$(dpkg --print-architecture)"; dpkgArch="${dpkgArch##*-}"; \ +# JIT is only supported on amd64 (until 24.x+1, where it will support arm64 as well); https://github.com/erlang/otp/blob/OTP-24.0.5/erts/configure#L21694-L21709 / https://github.com/erlang/otp/pull/4869 + jitFlag=; \ + case "$dpkgArch" in \ + amd64) jitFlag='--enable-jit' ;; \ + esac; \ ./configure \ --host="$hostArch" \ --build="$buildArch" \ @@ -146,7 +151,6 @@ RUN set -eux; \ --disable-hipe \ --disable-sctp \ --disable-silent-rules \ - --enable-jit \ --enable-clock-gettime \ --enable-hybrid-heap \ --enable-kernel-poll \ @@ -172,6 +176,7 @@ RUN set -eux; \ --without-ssh \ --without-tftp \ --without-wx \ + $jitFlag \ ; \ # Compile & install Erlang/OTP make -j "$(getconf _NPROCESSORS_ONLN)" GEN_OPT_FLGS="-O2 -fno-strict-aliasing"; \ From c0bec38afa909ce7a2ae9cea016453a94c033b25 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 2 Aug 2021 11:03:29 -0700 Subject: [PATCH 2/2] Only test i386 on Alpine builds (no support for Ubuntu on i386 anymore and qemu-user-static is way too slow on GitHub's runners) --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eef12a15..b490f5db 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,6 +25,7 @@ jobs: git clone --depth 1 https://github.com/docker-library/bashbrew.git -b master ~/bashbrew strategy="$(~/bashbrew/scripts/github-actions/generate.sh)" strategy="$(~/bashbrew/scripts/github-actions/munge-i386.sh -c <<<"$strategy")" + strategy="$(jq -c '.matrix.include |= [ .[] | select(.name | (test("i386") | not) or test("alpine")) ]' <<<"$strategy")" # Ubuntu no longer supports i386 (so we can only build test Alpine there; qemu-user-static is too slow for other arches) jq . <<<"$strategy" # sanity check / debugging aid echo "::set-output name=strategy::$strategy"