diff --git a/.github/workflows/apple_m.yml b/.github/workflows/apple_m.yml index f64fe10216..54cdfb4e20 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 @@ -155,3 +155,145 @@ jobs: exit 1 ;; esac + + xbuild-x86_64: + 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 + else + echo "::error::$RUNNER_OS not supported" + exit 1 + fi + + - name: Crossbuild OpenBLAS to x86_64 + 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" + + xbuild-ios: + 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 + 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 + + 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 +