From 2d4fb586c48b067b432cf56653ee2541d94fdd7d Mon Sep 17 00:00:00 2001 From: Joseph Ferguson Date: Wed, 12 Jun 2024 15:54:11 -0700 Subject: [PATCH] Attempt to speed up riscv64 builds --- 3.10/alpine3.19/Dockerfile | 2 +- 3.10/alpine3.20/Dockerfile | 2 +- 3.11/alpine3.19/Dockerfile | 2 +- 3.11/alpine3.20/Dockerfile | 2 +- 3.12/alpine3.19/Dockerfile | 2 +- 3.12/alpine3.20/Dockerfile | 2 +- 3.13-rc/alpine3.19/Dockerfile | 2 +- 3.13-rc/alpine3.20/Dockerfile | 2 +- Dockerfile-linux.template | 8 ++++++++ 9 files changed, 16 insertions(+), 8 deletions(-) diff --git a/3.10/alpine3.19/Dockerfile b/3.10/alpine3.19/Dockerfile index bd3ebc813..9ea2eba30 100644 --- a/3.10/alpine3.19/Dockerfile +++ b/3.10/alpine3.19/Dockerfile @@ -73,7 +73,7 @@ RUN set -eux; \ ./configure \ --build="$gnuArch" \ --enable-loadable-sqlite-extensions \ - --enable-optimizations \ + $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--enable-optimizations') \ --enable-option-checking=fatal \ --enable-shared \ --with-lto \ diff --git a/3.10/alpine3.20/Dockerfile b/3.10/alpine3.20/Dockerfile index 6a97864fd..3e64dc52b 100644 --- a/3.10/alpine3.20/Dockerfile +++ b/3.10/alpine3.20/Dockerfile @@ -73,7 +73,7 @@ RUN set -eux; \ ./configure \ --build="$gnuArch" \ --enable-loadable-sqlite-extensions \ - --enable-optimizations \ + $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--enable-optimizations') \ --enable-option-checking=fatal \ --enable-shared \ --with-lto \ diff --git a/3.11/alpine3.19/Dockerfile b/3.11/alpine3.19/Dockerfile index 56c48115a..38eea9f34 100644 --- a/3.11/alpine3.19/Dockerfile +++ b/3.11/alpine3.19/Dockerfile @@ -73,7 +73,7 @@ RUN set -eux; \ ./configure \ --build="$gnuArch" \ --enable-loadable-sqlite-extensions \ - --enable-optimizations \ + $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--enable-optimizations') \ --enable-option-checking=fatal \ --enable-shared \ --with-lto \ diff --git a/3.11/alpine3.20/Dockerfile b/3.11/alpine3.20/Dockerfile index 287a21d3e..fc7db0feb 100644 --- a/3.11/alpine3.20/Dockerfile +++ b/3.11/alpine3.20/Dockerfile @@ -73,7 +73,7 @@ RUN set -eux; \ ./configure \ --build="$gnuArch" \ --enable-loadable-sqlite-extensions \ - --enable-optimizations \ + $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--enable-optimizations') \ --enable-option-checking=fatal \ --enable-shared \ --with-lto \ diff --git a/3.12/alpine3.19/Dockerfile b/3.12/alpine3.19/Dockerfile index bf46329ed..0d81e75df 100644 --- a/3.12/alpine3.19/Dockerfile +++ b/3.12/alpine3.19/Dockerfile @@ -73,7 +73,7 @@ RUN set -eux; \ ./configure \ --build="$gnuArch" \ --enable-loadable-sqlite-extensions \ - --enable-optimizations \ + $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--enable-optimizations') \ --enable-option-checking=fatal \ --enable-shared \ --with-lto \ diff --git a/3.12/alpine3.20/Dockerfile b/3.12/alpine3.20/Dockerfile index 0abbbec63..a9d082fef 100644 --- a/3.12/alpine3.20/Dockerfile +++ b/3.12/alpine3.20/Dockerfile @@ -73,7 +73,7 @@ RUN set -eux; \ ./configure \ --build="$gnuArch" \ --enable-loadable-sqlite-extensions \ - --enable-optimizations \ + $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--enable-optimizations') \ --enable-option-checking=fatal \ --enable-shared \ --with-lto \ diff --git a/3.13-rc/alpine3.19/Dockerfile b/3.13-rc/alpine3.19/Dockerfile index b1237425f..183b02bbb 100644 --- a/3.13-rc/alpine3.19/Dockerfile +++ b/3.13-rc/alpine3.19/Dockerfile @@ -68,7 +68,7 @@ RUN set -eux; \ ./configure \ --build="$gnuArch" \ --enable-loadable-sqlite-extensions \ - --enable-optimizations \ + $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--enable-optimizations') \ --enable-option-checking=fatal \ --enable-shared \ --with-lto \ diff --git a/3.13-rc/alpine3.20/Dockerfile b/3.13-rc/alpine3.20/Dockerfile index 8a6dfd441..dcb7d8b7b 100644 --- a/3.13-rc/alpine3.20/Dockerfile +++ b/3.13-rc/alpine3.20/Dockerfile @@ -68,7 +68,7 @@ RUN set -eux; \ ./configure \ --build="$gnuArch" \ --enable-loadable-sqlite-extensions \ - --enable-optimizations \ + $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--enable-optimizations') \ --enable-option-checking=fatal \ --enable-shared \ --with-lto \ diff --git a/Dockerfile-linux.template b/Dockerfile-linux.template index 6ace1d918..456a31de3 100644 --- a/Dockerfile-linux.template +++ b/Dockerfile-linux.template @@ -158,7 +158,15 @@ RUN set -eux; \ ./configure \ --build="$gnuArch" \ --enable-loadable-sqlite-extensions \ +{{ + # skip optimizations on alpine on riscv64 (except python 3.8 and 3.9) + # only 3.8 and 3.9 complete building on riscv64 with optimizations, 3.10-3.13rc all hit the 3 hour limit + if (is_alpine | not) or ( [ "3.8", "3.9" ] | index(rcVersion) ) then ( +-}} --enable-optimizations \ +{{ ) else ( -}} + $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--enable-optimizations') \ +{{ ) end -}} --enable-option-checking=fatal \ --enable-shared \ {{