From 94b4c6c47c51becb7faa865a2089ad435be0e056 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Mon, 27 Apr 2026 20:14:36 +0200 Subject: [PATCH 1/7] Add cross-compilation to x86_64 based on the Cirrus CI job --- .github/workflows/apple_m.yml | 64 +++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/.github/workflows/apple_m.yml b/.github/workflows/apple_m.yml index f64fe10216..09e7e4ae8e 100644 --- a/.github/workflows/apple_m.yml +++ b/.github/workflows/apple_m.yml @@ -155,3 +155,67 @@ jobs: exit 1 ;; esac +name: xbuild-x86_64 +on: [push, pull_request] + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +permissions: + contents: read # to fetch code (actions/checkout) + +jobs: + build: + if: "github.repository == 'OpenMathLib/OpenBLAS'" + runs-on: macos-14 + + strategy: + fail-fast: false + + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Print system information + run: | + if [ "$RUNNER_OS" == "macOS" ]; then + sysctl -a | grep machdep.cpu + else + echo "::error::$RUNNER_OS not supported" + exit 1 + fi + + - name: Install Dependencies + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + sudo apt-get install -y gfortran cmake ccache libtinfo5 + elif [ "$RUNNER_OS" == "macOS" ]; then + # It looks like "gfortran" isn't working correctly unless "gcc" is re-installed. + brew reinstall gcc + brew install coreutils ccache + brew install llvm + else + echo "::error::$RUNNER_OS not supported" + exit 1 + fi + + - name: Crossbuild OpenBLAS + run: | + #export PATH=/opt/homebrew/opt/llvm/bin:$PATH + #export LDFLAGS="-L/opt/homebrew/opt/llvm/lib" + #export CPPFLAGS="-I/opt/homebrew/opt/llvm/include" + export ARCHS="i386 x86_64" + export ARCHS_STANDARD="i386 x86_64" + export ARCHS_STANDARD_32_64_BIT="i386 x86_64" + export ARCHS_STANDARD_64_BIT=x86_64 + export ARCHS_STANDARD_INCLUDING_64_BIT="i386 x86_64" + export ARCHS_UNIVERSAL_IPHONE_OS="i386 x86_64" + export VALID_ARCHS="i386 x86_64" + xcrun --sdk macosx --show-sdk-path + xcodebuild -version + export CC=/Applications/Xcode_26.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang + export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode_26.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.0.sdk -arch x86_64" + make TARGET=CORE2 DYNAMIC_ARCH=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 RANLIB="ls -l" + + From 5fa0aec3cfe7720e3a975da14067fccb0a595fd5 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Mon, 27 Apr 2026 22:44:13 +0200 Subject: [PATCH 2/7] Update apple_m.yml --- .github/workflows/apple_m.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/apple_m.yml b/.github/workflows/apple_m.yml index 09e7e4ae8e..dea19db6b7 100644 --- a/.github/workflows/apple_m.yml +++ b/.github/workflows/apple_m.yml @@ -155,7 +155,10 @@ jobs: exit 1 ;; esac + + name: xbuild-x86_64 + on: [push, pull_request] concurrency: From f2c5129b40dafdb3691ccedfa905de402ff500eb Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Mon, 27 Apr 2026 22:56:01 +0200 Subject: [PATCH 3/7] Update apple_m.yml --- .github/workflows/apple_m.yml | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/.github/workflows/apple_m.yml b/.github/workflows/apple_m.yml index dea19db6b7..4872ce2a14 100644 --- a/.github/workflows/apple_m.yml +++ b/.github/workflows/apple_m.yml @@ -157,20 +157,7 @@ jobs: esac -name: xbuild-x86_64 - -on: [push, pull_request] - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -permissions: - contents: read # to fetch code (actions/checkout) - -jobs: - build: - if: "github.repository == 'OpenMathLib/OpenBLAS'" + xbuild: runs-on: macos-14 strategy: From beb4ab7bf656fc8863cbf5b5f68c96b4ab73223f Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Mon, 27 Apr 2026 23:16:15 +0200 Subject: [PATCH 4/7] Update MacOS image for xbuild to Tahoe --- .github/workflows/apple_m.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/apple_m.yml b/.github/workflows/apple_m.yml index 4872ce2a14..4b975accf9 100644 --- a/.github/workflows/apple_m.yml +++ b/.github/workflows/apple_m.yml @@ -158,7 +158,7 @@ jobs: xbuild: - runs-on: macos-14 + runs-on: macos-26 strategy: fail-fast: false From 65ae31125fee158e9e1a3c7874baa7f309813a7a Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Tue, 28 Apr 2026 11:12:56 +0200 Subject: [PATCH 5/7] Update apple_m.yml --- .github/workflows/apple_m.yml | 52 ++++++++++++++++++++++++++++++++--- 1 file changed, 48 insertions(+), 4 deletions(-) diff --git a/.github/workflows/apple_m.yml b/.github/workflows/apple_m.yml index 4b975accf9..9b66593e78 100644 --- a/.github/workflows/apple_m.yml +++ b/.github/workflows/apple_m.yml @@ -156,8 +156,7 @@ jobs: ;; esac - - xbuild: + xbuild-x86_64: runs-on: macos-26 strategy: @@ -190,7 +189,7 @@ jobs: exit 1 fi - - name: Crossbuild OpenBLAS + - name: Crossbuild OpenBLAS to x86_64 run: | #export PATH=/opt/homebrew/opt/llvm/bin:$PATH #export LDFLAGS="-L/opt/homebrew/opt/llvm/lib" @@ -208,4 +207,49 @@ jobs: export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode_26.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.0.sdk -arch x86_64" make TARGET=CORE2 DYNAMIC_ARCH=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 RANLIB="ls -l" - + xbuild-ios: + runs-on: macos-26 + + strategy: + fail-fast: false + + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Print system information + run: | + if [ "$RUNNER_OS" == "macOS" ]; then + sysctl -a | grep machdep.cpu + else + echo "::error::$RUNNER_OS not supported" + exit 1 + fi + + - name: Install Dependencies + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + sudo apt-get install -y gfortran cmake ccache libtinfo5 + elif [ "$RUNNER_OS" == "macOS" ]; then + # It looks like "gfortran" isn't working correctly unless "gcc" is re-installed. + brew reinstall gcc + brew install coreutils ccache + brew install llvm + else + echo "::error::$RUNNER_OS not supported" + exit 1 + fi + + - name: Crossbuild to iOS + run: | + #brew install llvm + #export #PATH=/opt/homebrew/opt/llvm/bin:$PATH + # export #LDFLAGS="-L/opt/homebrew/opt/llvm/lib" + export #CPPFLAGS="-I/opt/homebrew/opt/llvm/include" + export CC=/Applications/Xcode_26.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang + export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode_26.0.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.0.sdk -arch arm64 -miphoneos-version-min=10.0" + xcrun --sdk iphoneos --show-sdk-path + ls -l /Applications + make TARGET=ARMV8 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 CROSS=1 + + From a3cd2eeaa72cb12a538125c4b417f22410e7efe1 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Wed, 29 Apr 2026 14:55:22 +0200 Subject: [PATCH 6/7] Update apple_m.yml --- .github/workflows/apple_m.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/apple_m.yml b/.github/workflows/apple_m.yml index 9b66593e78..5a26769e69 100644 --- a/.github/workflows/apple_m.yml +++ b/.github/workflows/apple_m.yml @@ -10,7 +10,7 @@ permissions: contents: read # to fetch code (actions/checkout) jobs: - build: + build-windows: if: "github.repository == 'OpenMathLib/OpenBLAS'" runs-on: macos-14 @@ -157,6 +157,7 @@ jobs: esac xbuild-x86_64: + if: "github.repository == 'OpenMathLib/OpenBLAS'" runs-on: macos-26 strategy: @@ -208,7 +209,8 @@ jobs: make TARGET=CORE2 DYNAMIC_ARCH=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 RANLIB="ls -l" xbuild-ios: - runs-on: macos-26 + if: "github.repository == 'OpenMathLib/OpenBLAS'" + runs-on: macos-26 strategy: fail-fast: false From a8974e0f7a1dc903b563876664e1f4734453fbdd Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Wed, 29 Apr 2026 21:16:29 +0200 Subject: [PATCH 7/7] Add Android NDK-ARMV7 crossbuild --- .github/workflows/apple_m.yml | 44 ++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/.github/workflows/apple_m.yml b/.github/workflows/apple_m.yml index 5a26769e69..54cdfb4e20 100644 --- a/.github/workflows/apple_m.yml +++ b/.github/workflows/apple_m.yml @@ -254,4 +254,46 @@ jobs: ls -l /Applications make TARGET=ARMV8 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 CROSS=1 - + xbuild-ios32: + if: "github.repository == 'OpenMathLib/OpenBLAS'" + runs-on: macos-26 + + strategy: + fail-fast: false + + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Print system information + run: | + if [ "$RUNNER_OS" == "macOS" ]; then + sysctl -a | grep machdep.cpu + else + echo "::error::$RUNNER_OS not supported" + exit 1 + fi + + - name: Install Dependencies + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + sudo apt-get install -y gfortran cmake ccache libtinfo5 + elif [ "$RUNNER_OS" == "macOS" ]; then + # It looks like "gfortran" isn't working correctly unless "gcc" is re-installed. + brew reinstall gcc + brew install coreutils ccache + brew install llvm + brew install --cask android-ndk + else + echo "::error::$RUNNER_OS not supported" + exit 1 + fi + + - name: AppleM1/LLVM armv7-androidndk xbuild + run: | + export ANDROID_NDK_HOME="/opt/homebrew/share/android-ndk" + export CC=/opt/homebrew/share/android-ndk/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi23-clang + export AR=/opt/homebrew/share/android-ndk/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-ar + export RANLIB=/opt/homebrew/share/android-ndk/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-ranlib + make TARGET=ARMV7 ARM_SOFTFP_ABI=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 +