From 40ff69e9fadff5e3112ab0a48b811a9068345b83 Mon Sep 17 00:00:00 2001 From: mattip Date: Wed, 16 Mar 2022 22:26:37 +0200 Subject: [PATCH 1/6] add x86_64 musllinux builds --- .github/workflows/multibuild.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/multibuild.yml b/.github/workflows/multibuild.yml index ac69cd8..dd6e83d 100644 --- a/.github/workflows/multibuild.yml +++ b/.github/workflows/multibuild.yml @@ -29,6 +29,18 @@ jobs: PLAT: arm64 INTERFACE64: '' platform: [x64] + - os: ubuntu-latest + PLAT: x86_64 + INTERFACE64: '1' + MB_ML_LIBC: musllinux + MB_ML_VER: _1_1 + platform: [x64] + - os: ubuntu-latest + PLAT: x86_64 + INTERFACE64: '' + MB_ML_LIBC: musllinux + MB_ML_VER: _1_1 + platform: [x64] exclude: - os: macos-latest PLAT: i686 From 6f2c7191270c4b499458b8ecf7c9c74a4e36191b Mon Sep 17 00:00:00 2001 From: mattip Date: Wed, 16 Mar 2022 22:27:01 +0200 Subject: [PATCH 2/6] update multibuild to https://github.com/multi-build/multibuild --- .gitmodules | 2 +- multibuild | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index ae67f99..9a0ddc0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -3,7 +3,7 @@ url = https://github.com/xianyi/OpenBLAS.git [submodule "multibuild"] path = multibuild - url = https://github.com/matthew-brett/multibuild.git + url = https://github.com/multi-build/multibuild.git [submodule "gfortran-install"] path = gfortran-install url = https://github.com/MacPython/gfortran-install.git diff --git a/multibuild b/multibuild index 7684e52..4b6eb06 160000 --- a/multibuild +++ b/multibuild @@ -1 +1 @@ -Subproject commit 7684e52bcb023d511c4f17b638d497203f218a68 +Subproject commit 4b6eb06af94d39b04a4136bb6781bd0100816c7d From 1a7b18d7c581acf477ac3230c3abe3394b744a30 Mon Sep 17 00:00:00 2001 From: mattip Date: Wed, 16 Mar 2022 22:29:26 +0200 Subject: [PATCH 3/6] add aarch64 musllinux builds --- .travis.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.travis.yml b/.travis.yml index 6baff47..62128da 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,6 +23,21 @@ services: docker matrix: include: + - os: linux + arch: arm64 + env: + - PLAT=aarch64 + - MB_ML_VER=_1_1 + - MB_ML_LIBC=musllinux + - DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT} + - os: linux + arch: arm64 + env: + - PLAT=aarch64 + - INTERFACE64=1 + - MB_ML_VER=_1_1 + - MB_ML_LIBC=musllinux + - DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT} - os: linux arch: arm64 env: From af4efea1caf3d5747f673ef8b9bb605992947f16 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Thu, 17 Mar 2022 19:42:12 +1100 Subject: [PATCH 4/6] Correct MB_ML_LIBC use --- .github/workflows/multibuild.yml | 1 + travis-ci/build_steps.sh | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/multibuild.yml b/.github/workflows/multibuild.yml index dd6e83d..086c86f 100644 --- a/.github/workflows/multibuild.yml +++ b/.github/workflows/multibuild.yml @@ -56,6 +56,7 @@ jobs: MACOSX_DEPLOYMENT_TARGET: 10.9 MB_PYTHON_VERSION: ${{ matrix.python-version }} TRAVIS_PYTHON_VERSION: ${{ matrix.python-version }} + MB_ML_LIBC: ${{ matrix.MB_ML_LIBC }} MB_ML_VER: ${{ matrix.MB_ML_VER }} INTERFACE64: ${{ matrix.INTERFACE64 }} BUILD_DIR: ${{ github.workspace }} diff --git a/travis-ci/build_steps.sh b/travis-ci/build_steps.sh index 761370a..73c375d 100644 --- a/travis-ci/build_steps.sh +++ b/travis-ci/build_steps.sh @@ -48,7 +48,8 @@ function build_lib { return fi # Manylinux wrapper - local docker_image=quay.io/pypa/manylinux${manylinux}_${plat} + local libc=${MB_ML_LIBC:-manylinux} + local docker_image=quay.io/pypa/${libc}${manylinux}_${plat} docker pull $docker_image # Docker sources this script, and runs `do_build_lib` docker run --rm \ From 3b45e0b0341f7b1a163cd6a595bfffcc22ee59ec Mon Sep 17 00:00:00 2001 From: mattip Date: Thu, 17 Mar 2022 12:30:14 +0200 Subject: [PATCH 5/6] use MB_ML_LIBC for package name --- travis-ci/build_steps.sh | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/travis-ci/build_steps.sh b/travis-ci/build_steps.sh index 73c375d..c19fced 100644 --- a/travis-ci/build_steps.sh +++ b/travis-ci/build_steps.sh @@ -26,6 +26,33 @@ function before_build { fi } +function get_plat_tag { + # Copied from gfortran-install/gfortran_utils.sh, modified for MB_ML_LIBC + + # Modify fat architecture tags on macOS to reflect compiled architecture + # For non-darwin, report manylinux version + local plat=$1 + local mb_ml_ver=${MB_ML_VER:-1} + local mb_ml_libc=${MB_ML_LIBC:-manylinux} + case $plat in + i686|x86_64|arm64|universal2|intel|aarch64|s390x|ppc64le) ;; + *) echo Did not recognize plat $plat; return 1 ;; + esac + local uname=${2:-$(uname)} + if [ "$uname" != "Darwin" ]; then + if [ "$plat" == "intel" ]; then + echo plat=intel not allowed for Manylinux + return 1 + fi + echo "${mb_ml_libc}${mb_ml_ver}_${plat}" + return + fi + # macOS 32-bit arch is i386 + [ "$plat" == "i686" ] && plat="i386" + local target=$(echo $MACOSX_DEPLOYMENT_TARGET | tr .- _) + echo "macosx_${target}_${plat}" +} + function build_lib { # OSX or manylinux build # @@ -138,7 +165,7 @@ function do_build_lib { && make PREFIX=$BUILD_PREFIX $interface64_flags install ) stop_spinner local version=$(cd OpenBLAS && git describe --tags --abbrev=8) - local plat_tag=$(get_distutils_platform_ex $plat) + local plat_tag=$(get_plat_tag $plat) local suff="" [ -n "$suffix" ] && suff="-$suffix" if [ "$interface64" = "1" ]; then From d72a95975a183198b8f56ed115b346939f709f2a Mon Sep 17 00:00:00 2001 From: mattip Date: Thu, 17 Mar 2022 15:12:38 +0200 Subject: [PATCH 6/6] pass libc into docker image as MB_ML_LIBC --- travis-ci/build_steps.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/travis-ci/build_steps.sh b/travis-ci/build_steps.sh index c19fced..6b13ca3 100644 --- a/travis-ci/build_steps.sh +++ b/travis-ci/build_steps.sh @@ -85,6 +85,7 @@ function build_lib { -e INTERFACE64="${interface64}" \ -e PYTHON_VERSION="$MB_PYTHON_VERSION" \ -e MB_ML_VER=${manylinux} \ + -e MB_ML_LIBC=${libc} \ -v $PWD:/io \ $docker_image /io/travis-ci/docker_build_wrap.sh }