From 327c4b90c5db7df6b6550ec31b42af64caefe94e Mon Sep 17 00:00:00 2001 From: Matti Picus Date: Thu, 23 Oct 2025 17:26:55 +0300 Subject: [PATCH 1/7] rebase on main --- .github/workflows/posix.yml | 121 ------------- .github/workflows/wheel.yml | 258 +++++++++++++++++++++++++++ .github/workflows/windows-arm.yml | 111 ------------ .github/workflows/windows.yml | 182 ------------------- .travis.yml | 16 +- OpenBLAS | 2 +- build-openblas.sh | 6 +- ci-before-build.sh | 10 -- pyproject.toml | 20 ++- tools/build_steps.sh | 47 ----- tools/build_steps_win_arm64.bat | 34 +--- tools/build_wheel.sh | 54 ------ tools/build_wheel_prepare_for_win.sh | 36 ++++ tools/repair_for_win.sh | 14 ++ tools/repair_wheel_for_win_arm64.bat | 14 ++ tools/test_for_win.sh | 9 + 16 files changed, 356 insertions(+), 578 deletions(-) delete mode 100644 .github/workflows/posix.yml create mode 100644 .github/workflows/wheel.yml delete mode 100644 .github/workflows/windows-arm.yml delete mode 100644 .github/workflows/windows.yml delete mode 100644 tools/build_wheel.sh create mode 100644 tools/build_wheel_prepare_for_win.sh create mode 100644 tools/repair_for_win.sh create mode 100644 tools/repair_wheel_for_win_arm64.bat create mode 100644 tools/test_for_win.sh diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml deleted file mode 100644 index a6a1cf1..0000000 --- a/.github/workflows/posix.yml +++ /dev/null @@ -1,121 +0,0 @@ -name: posix - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - workflow_dispatch: null - schedule: - - cron: '0 0 * * 0' - -env: - OPENBLAS_COMMIT: "v0.3.30" - MACOSX_DEPLOYMENT_TARGET: 10.9 - -jobs: - build: - runs-on: ${{ matrix.os }} - defaults: - run: - shell: bash - strategy: - fail-fast: false - matrix: - include: - - { os: ubuntu-latest, PLAT: i686, INTERFACE64: '0', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} - - - { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '0', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} - - { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '1', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} - - - { os: macos-latest, PLAT: x86_64, INTERFACE64: '0', MB_ML_LIBC: macosx} - - { os: macos-latest, PLAT: x86_64, INTERFACE64: '1', MB_ML_LIBC: macosx} - - - { os: macos-latest, PLAT: arm64, INTERFACE64: '0', MB_ML_LIBC: macosx} - - { os: macos-latest, PLAT: arm64, INTERFACE64: '1', MB_ML_LIBC: macosx} - - - { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '0', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux} - - { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '1', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux} - - - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '0', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} - - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '1', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} - - - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '0', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux} - - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '1', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux} - - env: - NIGHTLY: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} - MB_ML_LIBC: ${{ matrix.MB_ML_LIBC }} - MB_ML_VER: ${{ matrix.MB_ML_VER }} - INTERFACE64: ${{ matrix.INTERFACE64 }} - BUILD_DIR: ${{ github.workspace }} - PLAT: ${{ matrix.PLAT }} - OS-NAME: ${{ matrix.os }} - - steps: - - uses: actions/checkout@v4.1.1 - with: - submodules: recursive - fetch-depth: 0 - - - uses: maxim-lobanov/setup-xcode@v1.6.0 - if: ${{ contains(matrix.os, 'macos') }} - with: - xcode-version: '16.0' - - - name: Print some Environment variable - run: | - echo "PLAT: ${PLAT}" - - # - name: Setup tmate session - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - # with: - # limit-access-to-actor: true - - - name: Build and Test wheels - uses: pypa/cibuildwheel@v3.1.4 - with: - output-dir: dist - env: - CIBW_ARCHS: ${{matrix.PLAT}} - CIBW_BUILD_VERBOSITY: 1 - CIBW_BUILD: "cp39-${{ matrix.MB_ML_LIBC }}_${{matrix.PLAT}}" - - CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.MB_ML_LIBC }}${{matrix.MB_ML_VER}} - CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.MB_ML_LIBC }}${{matrix.MB_ML_VER}} - CIBW_MUSLLINUX_X86_64_IMAGE: ${{ matrix.MB_ML_LIBC }}${{matrix.MB_ML_VER}} - CIBW_MANYLINUX_AARCH64_IMAGE: ${{ matrix.MB_ML_LIBC }}${{matrix.MB_ML_VER}} - CIBW_MUSLLINUX_AARCH64_IMAGE: ${{ matrix.MB_ML_LIBC }}${{matrix.MB_ML_VER}} - - - name: Upload wheels to artifacts - uses: actions/upload-artifact@v4.3.0 - with: - name: wheels-${{ matrix.os }}-${{ matrix.PLAT }}-${{ matrix.INTERFACE64 }}-${{ matrix.MB_ML_LIBC }}-${{ matrix.MB_ML_VER }} - path: dist/scipy_openblas*.whl - - - - name: Upload openblas to artifacts - uses: actions/upload-artifact@v4.3.0 - with: - name: openblas-${{ matrix.os }}-${{ matrix.PLAT }}-${{ matrix.INTERFACE64 }}-${{ matrix.MB_ML_LIBC }}-${{ matrix.MB_ML_VER }} - path: dist/openblas*.tar.gz - - - uses: conda-incubator/setup-miniconda@v3.2.0 - with: - channels: conda-forge - channel-priority: true - activate-environment: upload - miniforge-version: latest - conda-remove-defaults: "true" - - - name: Upload - # see https://github.com/marketplace/actions/setup-miniconda for why - # `-el {0}` is required. - shell: bash -el {0} - env: - ANACONDA_SCIENTIFIC_PYTHON_UPLOAD: ${{ secrets.ANACONDA_SCIENTIFIC_PYTHON_UPLOAD }} - run: | - conda install -y anaconda-client - source tools/upload_to_anaconda_staging.sh - upload_wheels diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml new file mode 100644 index 0000000..563cb36 --- /dev/null +++ b/.github/workflows/wheel.yml @@ -0,0 +1,258 @@ +name: build-wheel + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + workflow_dispatch: null + schedule: + - cron: '0 0 * * 0' + +env: + OPENBLAS_COMMIT: "v0.3.30" + MACOSX_DEPLOYMENT_TARGET: 10.9 + OPENBLAS_ROOT: "c:\\opt" + # Preserve working directory for calls into bash + # Without this, invoking bash will cd to the home directory + CHERE_INVOKING: "yes" + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - { os: ubuntu-latest, PLAT: i686, INTERFACE64: '0', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} + + - { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '0', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} + - { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '1', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} + + - { os: macos-latest, PLAT: x86_64, INTERFACE64: '0', MB_ML_LIBC: macosx} + - { os: macos-latest, PLAT: x86_64, INTERFACE64: '1', MB_ML_LIBC: macosx} + + - { os: macos-latest, PLAT: arm64, INTERFACE64: '0', MB_ML_LIBC: macosx} + - { os: macos-latest, PLAT: arm64, INTERFACE64: '1', MB_ML_LIBC: macosx} + + - { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '0', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux} + - { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '1', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux} + + - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '0', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} + - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '1', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} + + - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '0', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux} + - { os: ubuntu-24.04-arm, PLAT: aarch64, INTERFACE64: '1', MB_ML_VER: '_1_2', MB_ML_LIBC: musllinux} + + + - { os: windows-latest, PLAT: amd64, INTERFACE64: '1', MB_ML_LIBC: win} + - { os: windows-latest, PLAT: amd64, INTERFACE64: '0', MB_ML_LIBC: win} + - { os: windows-latest, PLAT: x86, INTERFACE64: '0', MB_ML_LIBC: win} + + - { os: windows-11-arm, PLAT: arm64, INTERFACE64: '1', MB_ML_LIBC: win} + - { os: windows-11-arm, PLAT: arm64, INTERFACE64: '0', MB_ML_LIBC: win} + + env: + NIGHTLY: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} + MB_ML_LIBC: ${{ matrix.MB_ML_LIBC }} + MB_ML_VER: ${{ matrix.MB_ML_VER }} + INTERFACE64: ${{ matrix.INTERFACE64 }} + BUILD_DIR: ${{ github.workspace }} + PLAT: ${{ matrix.PLAT }} + OS-NAME: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4.1.1 + with: + submodules: recursive + fetch-depth: 0 + + - uses: maxim-lobanov/setup-xcode@v1.6.0 + if: ${{ contains(matrix.os, 'macos') }} + with: + xcode-version: '16.0' + + - name: Print some Environment variable + run: | + echo "PLAT: ${PLAT}" + - name: install-rtools + if: ${{ matrix.os == 'windows-latest' }} + run: | + # rtools 42+ does not support 32 bits builds. + choco install -y rtools --no-progress --force --version=4.0.0.20220206 + + - name: Set env variables + if: ${{ matrix.os == 'windows-latest' }} + run: | + echo "START_DIR=$PWD" >> $env:GITHUB_ENV + # For interpretation of MSYSTEM, see: + # https://sourceforge.net/p/msys2/discussion/general/thread/b7dfdac8/#3939 + if ( "${{ matrix.plat }}" -eq "x86") { + echo "PLAT=i686" >> $env:GITHUB_ENV + echo "WHEEL_PLAT=win32" >> $env:GITHUB_ENV + echo "MSYSTEM=MINGW32" >> $env:GITHUB_ENV + # No ucrt on 32-bits, so use _snprintf_c instead + echo "LDFLAGS=-static -static-libgcc -Wl,--defsym,_quadmath_snprintf=__snprintf_c" >> $env:GITHUB_ENV + echo "BUILD_BITS=32" >> $env:GITHUB_ENV + } else { + echo "PLAT=x86_64" >> $env:GITHUB_ENV + echo "WHEEL_PLAT=win_amd64" >> $env:GITHUB_ENV + echo "MSYSTEM=UCRT64" >> $env:GITHUB_ENV + echo "LDFLAGS=-lucrt -static -static-libgcc -Wl,--defsym,quadmath_snprintf=snprintf" >> $env:GITHUB_ENV + echo "BUILD_BITS=64" >> $env:GITHUB_ENV + } + if ( ${{ matrix.INTERFACE64 }} -eq "1" ) { + echo "INTERFACE64=1" >> $env:GITHUB_ENV + } + $CIBW = "${{ github.workspace }}/.openblas" + $CIBW = $CIBW.replace("\","/") + echo "CIBW_ENVIRONMENT_WINDOWS=PKG_CONFIG_PATH=$CIBW" >> $env:GITHUB_ENV + + - name: Debug + if: ${{ matrix.os == 'windows-latest' }} + run: | + echo CIBW_ENVIRONMENT_WINDOWS=$env:CIBW_ENVIRONMENT_WINDOWS + + - name: Setup visual studio + if: ${{ matrix.os == 'windows-11-arm' }} + uses: microsoft/setup-msbuild@v2 + + - name: Download, install 7zip. + if: ${{ matrix.os == 'windows-11-arm' }} + run: | + Invoke-WebRequest https://www.7-zip.org/a/7z2409-arm64.exe -UseBasicParsing -OutFile 7z_arm.exe + Start-Process -FilePath ".\7z_arm.exe" -ArgumentList "/S" -Wait + echo "C:\Program Files\7-Zip" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + + - name: Download and install LLVM installer + if: ${{ matrix.os == 'windows-11-arm' }} + run: | + Invoke-WebRequest https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.5/LLVM-19.1.5-woa64.exe -UseBasicParsing -OutFile LLVM-woa64.exe + Start-Process -FilePath ".\LLVM-woa64.exe" -ArgumentList "/S" -Wait + echo "C:\Program Files\LLVM\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + + - name: Update CMake for WoA + if: ${{ matrix.os == 'windows-11-arm' }} + run: | + pip install cmake + get-command cmake + - name: Set env variables + if: ${{ matrix.os == 'windows-11-arm' }} + run: | + if ( ${{ matrix.INTERFACE64 }} -eq "1" ) { + echo "INTERFACE_BITS=64" >> $env:GITHUB_ENV + } else { + echo "INTERFACE_BITS=32" >> $env:GITHUB_ENV + } + + + # - name: Setup tmate session + # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # with: + # limit-access-to-actor: true + + - name: Build OpenBLAS for Windows + if: ${{ matrix.os == 'windows-latest' }} + run: | + Set-Item -Path env:BASH_PATH -Value "c:\\rtools40\\usr\\bin\\bash.exe" + # Build + & $env:BASH_PATH -lc tools/build_openblas.sh + + # Test + & $env:BASH_PATH -lc tools/build_gfortran.sh + echo "Static test" + .\for_test\test.exe + echo "Dynamic test" + .\for_test\test_dyn.exe + + # Copy + cp for_test\test*.exe builds + + bash tools/build_wheel_prepare_for_win.sh + - name: Build OpenBLAS for Windows On ARM + if: ${{ matrix.os == 'windows-11-arm' }} + run: | + Set-Item -Path env:BASH_PATH -Value "C:\\Program Files\\Git\\bin\\bash.exe" + .\tools\build_steps_win_arm64.bat 64 ${env:INTERFACE_BITS} + + - name: Set CIBW_BUILD + shell: bash + run: | + if [[ "${{ matrix.os }}" == "windows-latest" && "${{matrix.PLAT}}" == "x86" ]]; then + echo "CIBW_BUILD=cp39-${{ matrix.MB_ML_LIBC }}32" >> $GITHUB_ENV + else + echo "CIBW_BUILD=cp39-${{ matrix.MB_ML_LIBC }}_${{ matrix.PLAT }}" >> $GITHUB_ENV + fi + + - name: Build and Test wheels + uses: pypa/cibuildwheel@v3.1.4 + with: + output-dir: dist + env: + CIBW_BUILD_VERBOSITY: 1 + + CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.MB_ML_LIBC }}${{matrix.MB_ML_VER}} + CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.MB_ML_LIBC }}${{matrix.MB_ML_VER}} + CIBW_MUSLLINUX_X86_64_IMAGE: ${{ matrix.MB_ML_LIBC }}${{matrix.MB_ML_VER}} + CIBW_MANYLINUX_AARCH64_IMAGE: ${{ matrix.MB_ML_LIBC }}${{matrix.MB_ML_VER}} + CIBW_MUSLLINUX_AARCH64_IMAGE: ${{ matrix.MB_ML_LIBC }}${{matrix.MB_ML_VER}} + + - name: Upload wheels to artifacts + if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm' || matrix.os == 'macos-latest' }} + uses: actions/upload-artifact@v4.3.0 + with: + name: wheels-${{ matrix.os }}-${{ matrix.PLAT }}-${{ matrix.INTERFACE64 }}-${{ matrix.MB_ML_LIBC }}-${{ matrix.MB_ML_VER }} + path: dist/scipy_openblas*.whl + + + - name: Upload openblas to artifacts + if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm' || matrix.os == 'macos-latest' }} + uses: actions/upload-artifact@v4.3.0 + with: + name: openblas-${{ matrix.os }}-${{ matrix.PLAT }}-${{ matrix.INTERFACE64 }}-${{ matrix.MB_ML_LIBC }}-${{ matrix.MB_ML_VER }} + path: dist/openblas*.tar.gz + - name: Pack + if: ${{ matrix.os == 'windows-11-arm' }} + run: | + cd local + cp -r "scipy_openblas${env:INTERFACE_BITS}" $env:INTERFACE_BITS + 7z a ../builds/openblas-${env:PLAT}-${env:INTERFACE64}.zip -tzip $env:INTERFACE_BITS + + - uses: actions/upload-artifact@v4.3.0 + if: ${{ matrix.os == 'windows-latest' || matrix.os == 'windows-11-arm' }} + with: + name: wheels-${{matrix.plat }}-${{ matrix.INTERFACE64 }} + path: dist/scipy_openblas*.whl + + - uses: actions/upload-artifact@v4.3.0 + if: ${{ matrix.os == 'windows-latest' || matrix.os == 'windows-11-arm' }} + with: + name: openblas-${{matrix.plat }}-${{ matrix.INTERFACE64 }} + path: builds/openblas*.zip + - name: Install Anaconda client + if: ${{ matrix.os == 'windows-11-arm' }} + run: | + pip install anaconda-client + + - uses: conda-incubator/setup-miniconda@v3.2.0 + if: ${{ matrix.os != 'windows-11-arm' }} + with: + channels: conda-forge + channel-priority: true + activate-environment: upload + miniforge-version: latest + conda-remove-defaults: "true" + - name: install anaconda client + if: ${{ matrix.os != 'windows-11-arm' }} + run: | + conda install anaconda-client + - name: Upload + # see https://github.com/marketplace/actions/setup-miniconda for why + # `-el {0}` is required. + shell: bash -el {0} + env: + ANACONDA_SCIENTIFIC_PYTHON_UPLOAD: ${{ secrets.ANACONDA_SCIENTIFIC_PYTHON_UPLOAD }} + run: | + source tools/upload_to_anaconda_staging.sh + upload_wheels diff --git a/.github/workflows/windows-arm.yml b/.github/workflows/windows-arm.yml deleted file mode 100644 index e0e5181..0000000 --- a/.github/workflows/windows-arm.yml +++ /dev/null @@ -1,111 +0,0 @@ -name: Windows-on-ARM - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -env: - OPENBLAS_COMMIT: "v0.3.30" - OPENBLAS_ROOT: "c:\\opt" - # Preserve working directory for calls into bash - # Without this, invoking bash will cd to the home directory - CHERE_INVOKING: "yes" - BASH_PATH: "C:\\Program Files\\Git\\bin\\bash.exe" - PLAT: arm64 - -jobs: - build: - runs-on: windows-11-arm - timeout-minutes: 90 - - strategy: - matrix: - INTERFACE64: ['1', '0'] - - env: - INTERFACE64: ${{ matrix.INTERFACE64 }} - - steps: - - - uses: actions/checkout@v4.1.1 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.12 - architecture: arm64 - - - name: Setup visual studio - uses: microsoft/setup-msbuild@v2 - - - name: Download, install 7zip. - run: | - Invoke-WebRequest https://www.7-zip.org/a/7z2409-arm64.exe -UseBasicParsing -OutFile 7z_arm.exe - Start-Process -FilePath ".\7z_arm.exe" -ArgumentList "/S" -Wait - echo "C:\Program Files\7-Zip" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - - - name: Download and install LLVM installer - run: | - Invoke-WebRequest https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.5/LLVM-19.1.5-woa64.exe -UseBasicParsing -OutFile LLVM-woa64.exe - Start-Process -FilePath ".\LLVM-woa64.exe" -ArgumentList "/S" -Wait - echo "C:\Program Files\LLVM\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - - - name: Update CMake for WoA - run: | - pip install cmake - get-command cmake - - - name: Set env variables - run: | - if ( ${{ matrix.INTERFACE64 }} -eq "1" ) { - echo "INTERFACE_BITS=64" >> $env:GITHUB_ENV - } else { - echo "INTERFACE_BITS=32" >> $env:GITHUB_ENV - } - - - name: Build - run: | - git submodule update --init --recursive - .\tools\build_steps_win_arm64.bat 64 ${env:INTERFACE_BITS} - - - name: Pack - run: | - cd local - cp -r "scipy_openblas${env:INTERFACE_BITS}" $env:INTERFACE_BITS - 7z a ../builds/openblas-${env:PLAT}-${env:INTERFACE64}.zip -tzip $env:INTERFACE_BITS - - - name: Test ${{ matrix.INTERFACE_BITS }}-bit interface wheel - run: | - python -m pip install --no-index --find-links dist scipy_openblas${env:INTERFACE_BITS} - python -m scipy_openblas${env:INTERFACE_BITS} - python -c "import scipy_openblas${env:INTERFACE_BITS}; print(scipy_openblas${env:INTERFACE_BITS}.get_pkg_config())" - - - uses: actions/upload-artifact@v4.3.0 - with: - name: wheels-${{ env.PLAT }}-${{ env.INTERFACE64 }} - path: dist/scipy_openblas*.whl - - - uses: actions/upload-artifact@v4.3.0 - with: - name: openblas-${{ env.PLAT }}-${{ env.INTERFACE64 }} - path: builds/openblas*.zip - - - name: Install Anaconda client - run: | - # Rust installation needed for rpds-py. - Invoke-WebRequest https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe -UseBasicParsing -Outfile rustup-init.exe - .\rustup-init.exe -y - $env:PATH="$env:PATH;$env:USERPROFILE\.cargo\bin" - pip install anaconda-client - - - name: Upload - # see https://github.com/marketplace/actions/setup-miniconda for why - # `-el {0}` is required. - shell: bash -el {0} - env: - ANACONDA_SCIENTIFIC_PYTHON_UPLOAD: ${{ secrets.ANACONDA_SCIENTIFIC_PYTHON_UPLOAD }} - run: | - source tools/upload_to_anaconda_staging.sh - upload_wheels diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml deleted file mode 100644 index 69f70ae..0000000 --- a/.github/workflows/windows.yml +++ /dev/null @@ -1,182 +0,0 @@ -name: Win - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - workflow_dispatch: null - -env: - OPENBLAS_COMMIT: "v0.3.30" - OPENBLAS_ROOT: "c:\\opt" - # Preserve working directory for calls into bash - # Without this, invoking bash will cd to the home directory - CHERE_INVOKING: "yes" - BASH_PATH: "c:\\rtools40\\usr\\bin\\bash.exe" - -jobs: - build: - strategy: - matrix: - plat: ['x64', 'x86'] - INTERFACE64: ['1', '0'] - os: [windows-latest] - exclude: - - plat: x86 - INTERFACE64: '1' - fail-fast: false - runs-on: ${{ matrix.os }} - - timeout-minutes: 90 - steps: - - uses: actions/checkout@v4.1.1 - - name: install-rtools - run: | - # rtools 42+ does not support 32 bits builds. - choco install -y rtools --no-progress --force --version=4.0.0.20220206 - - - name: Set env variables - run: | - echo "START_DIR=$PWD" >> $env:GITHUB_ENV - # For interpretation of MSYSTEM, see: - # https://sourceforge.net/p/msys2/discussion/general/thread/b7dfdac8/#3939 - if ( "${{ matrix.plat }}" -eq "x86") { - echo "PLAT=i686" >> $env:GITHUB_ENV - echo "WHEEL_PLAT=win32" >> $env:GITHUB_ENV - echo "MSYSTEM=MINGW32" >> $env:GITHUB_ENV - # No ucrt on 32-bits, so use _snprintf_c instead - echo "LDFLAGS=-static -static-libgcc -Wl,--defsym,_quadmath_snprintf=__snprintf_c" >> $env:GITHUB_ENV - echo "BUILD_BITS=32" >> $env:GITHUB_ENV - } else { - echo "PLAT=x86_64" >> $env:GITHUB_ENV - echo "WHEEL_PLAT=win_amd64" >> $env:GITHUB_ENV - echo "MSYSTEM=UCRT64" >> $env:GITHUB_ENV - echo "LDFLAGS=-lucrt -static -static-libgcc -Wl,--defsym,quadmath_snprintf=snprintf" >> $env:GITHUB_ENV - echo "BUILD_BITS=64" >> $env:GITHUB_ENV - } - if ( ${{ matrix.INTERFACE64 }} -eq "1" ) { - echo "INTERFACE64=1" >> $env:GITHUB_ENV - } - $CIBW = "${{ github.workspace }}/.openblas" - $CIBW = $CIBW.replace("\","/") - echo "CIBW_ENVIRONMENT_WINDOWS=PKG_CONFIG_PATH=$CIBW" >> $env:GITHUB_ENV - - - name: Debug - run: | - echo CIBW_ENVIRONMENT_WINDOWS=$env:CIBW_ENVIRONMENT_WINDOWS - - - name: Build - run: | - git submodule update --init --recursive - & $env:BASH_PATH -lc tools/build_openblas.sh - - - name: Test - run: | - & $env:BASH_PATH -lc tools/build_gfortran.sh - echo "Static test" - .\for_test\test.exe - echo "Dynamic test" - .\for_test\test_dyn.exe - - - name: Copy - run: | - cp for_test\test*.exe builds - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.9 - architecture: ${{ matrix.plat }} - - - - name: Build wheel - shell: bash - run: | - set -xeo pipefail - python -m pip install wheel - # This will fail if there is more than one file in libs - unzip -d local/scipy_openblas64 builds/openblas*.zip - if [[ -d local/scipy_openblas64/64 ]]; then - mv local/scipy_openblas64/64/* local/scipy_openblas64 - else - mv local/scipy_openblas64/32/* local/scipy_openblas64 - fi - mv local/scipy_openblas64/bin/*.dll local/scipy_openblas64/lib - rm local/scipy_openblas64/lib/*.a - rm -f local/scipy_openblas64/lib/*.exp # may not exist? - rm local/scipy_openblas64/lib/*.def - rm -rf local/scipy_openblas64/lib/pkgconfig - if [[ -d local/scipy_openblas64/64 ]]; then - rm -rf local/scipy_openblas64/64 - else - rm -rf local/scipy_openblas64/32 - fi - sed -e "s/bin/lib/" -i local/scipy_openblas64/lib/cmake/openblas/OpenBLASConfig.cmake - sed -e "s/dll/lib/" -i local/scipy_openblas64/lib/cmake/openblas/OpenBLASConfig.cmake - if [[ "${INTERFACE64}" != "1" ]]; then - mv local/scipy_openblas64 local/scipy_openblas32 - # rewrite the name of the project to scipy-openblas32 - # this is a hack, but apparently there is no other way to change the name - # of a pyproject.toml project - sed -e "s/openblas64/openblas32/" -i pyproject.toml - sed -e "s/openblas_get_config64_/openblas_get_config/" -i local/scipy_openblas32/__init__.py - sed -e "s/cflags =.*/cflags = '-DBLAS_SYMBOL_PREFIX=scipy_'/" -i local/scipy_openblas32/__init__.py - sed -e "s/openblas64/openblas32/" -i local/scipy_openblas32/__init__.py - sed -e "s/openblas64/openblas32/" -i local/scipy_openblas32/__main__.py - fi - echo "" >> LICENSE.txt - echo "----" >> LICENSE.txt - echo "" >> LICENSE.txt - cat tools/LICENSE_win32.txt >> LICENSE.txt - python -m pip wheel -w dist -vv . - # move the mis-named scipy_openblas64-none-any.whl to a platform-specific name - for f in dist/*.whl; do mv $f "${f/%any.whl/$WHEEL_PLAT.whl}"; done - - - name: Set up different Python - uses: actions/setup-python@v5 - with: - python-version: 3.11 - architecture: ${{ matrix.plat }} - - - uses: actions/upload-artifact@v4.3.0 - with: - name: wheels-${{matrix.plat }}-${{ matrix.INTERFACE64 }} - path: dist/scipy_openblas*.whl - - - uses: actions/upload-artifact@v4.3.0 - with: - name: openblas-${{matrix.plat }}-${{ matrix.INTERFACE64 }} - path: builds/openblas*.zip - - - name: Test 64-bit interface wheel - if: matrix.INTERFACE64 == '1' - run: | - python -m pip install --no-index --find-links dist scipy_openblas64 - python -m scipy_openblas64 - python -c "import scipy_openblas64; print(scipy_openblas64.get_pkg_config())" - - - name: Test 32-bit interface wheel - if: matrix.INTERFACE64 != '1' - run: | - python -m pip install --no-index --find-links dist scipy_openblas32 - python -m scipy_openblas32 - python -c "import scipy_openblas32; print(scipy_openblas32.get_pkg_config())" - - - uses: conda-incubator/setup-miniconda@v3.1.1 - with: - channels: conda-forge - channel-priority: true - activate-environment: upload - miniforge-version: latest - - - name: Upload - # see https://github.com/marketplace/actions/setup-miniconda for why - # `-el {0}` is required. - shell: bash -el {0} - env: - ANACONDA_SCIENTIFIC_PYTHON_UPLOAD: ${{ secrets.ANACONDA_SCIENTIFIC_PYTHON_UPLOAD }} - run: | - conda install -y anaconda-client - source tools/upload_to_anaconda_staging.sh - upload_wheels diff --git a/.travis.yml b/.travis.yml index 327d9eb..75029a3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,26 +34,14 @@ jobs: - INTERFACE64=1 - MB_ML_VER=2014 -before_install: - - source tools/build_steps.sh - - before_build - install: # Maybe get and clean and patch source - | - if [ ${TRAVIS_EVENT_TYPE} == "cron" ]; then - clean_code develop - else - clean_code $OPENBLAS_COMMIT - fi + python3 -m pip install cibuildwheel==3.2.1 echo done install step script: - # Build library and collect into libs subdirectory - - travis_wait 30 build_on_travis - - libc=${MB_ML_LIBC:-manylinux} - - docker_image=quay.io/pypa/${libc}${MB_ML_VER}_${PLAT} - - docker run --rm -e INTERFACE64="${INTERFACE64}" -e MB_ML_LIBC="${MB_ML_LIBC}" -v $(pwd):/openblas "${docker_image}" /bin/bash -xe /openblas/tools/build_wheel.sh + - python3 -m cibuildwheel --output-dir dist after_success: - set +ex diff --git a/OpenBLAS b/OpenBLAS index b5456c1..43d0803 160000 --- a/OpenBLAS +++ b/OpenBLAS @@ -1 +1 @@ -Subproject commit b5456c1b41ea88d4e0041778aa8ec09ee2a111a0 +Subproject commit 43d0803949cc335fd8a5b1bc3d3058b26381c29e diff --git a/build-openblas.sh b/build-openblas.sh index f50b00e..9de5fcf 100755 --- a/build-openblas.sh +++ b/build-openblas.sh @@ -47,11 +47,13 @@ source tools/build_steps.sh echo "------ BEFORE BUILD ---------" before_build -if [[ "$NIGHTLY" = "true" ]]; then +if [[ "$NIGHTLY" = "true" || ${TRAVIS_EVENT_TYPE} == "cron" ]] ; then echo "------ CLEAN CODE --------" clean_code develop echo "------ BUILD LIB --------" - build_lib "$PLAT" "$INTERFACE64" "1" + build_lib "$PLAT" "$INTERFACE64" 1 + version=$(cd OpenBLAS && git describe --tags --abbrev=8 | sed -e "s/^v\(.*\)-g.*/\1/" | sed -e "s/-/./g") + sed -e "s/^version = .*/version = \"${version}\"/" -i.bak pyproject.toml else echo "------ CLEAN CODE --------" clean_code $OPENBLAS_COMMIT diff --git a/ci-before-build.sh b/ci-before-build.sh index f2dc8a3..876d97a 100755 --- a/ci-before-build.sh +++ b/ci-before-build.sh @@ -46,16 +46,6 @@ #! /bin/bash set -xe -if [[ "$NIGHTLY" = "true" ]]; then - pushd OpenBLAS - git checkout develop - # Set the pyproject.toml version: convert v0.3.24-30-g138ed79f to 0.3.34.30 - version=$(git describe --tags --abbrev=8 | sed -e "s/^v\(.*\)-g.*/\1/" | sed -e "s/-/./g") - popd - sed -e "s/^version = .*/version = \"${version}\"/" -i.bak pyproject.toml -fi - - #!/bin/bash # Utilities for both OSX and Docker Linux # python or python3 should be on the PATH diff --git a/pyproject.toml b/pyproject.toml index a2a3b4d..c42cf75 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,9 +41,6 @@ install_requires = "importlib-metadata ~= 1.0 ; python_version < '3.8'" scipy_openblas64 = ["lib/*", "include/*", "lib/pkgconfig/*", "lib/cmake/openblas/*"] [tool.cibuildwheel] -before-build = "bash ci-before-build.sh" -repair-wheel-command = "bash ci-repair-wheel.sh {dest_dir} {wheel}" -test-command = "cd {package} && bash ci-test.sh " environment-pass = [ "OPENBLAS_COMMIT", "MACOSX_DEPLOYMENT_TARGET", @@ -55,3 +52,20 @@ environment-pass = [ "PLAT", "OS-NAME", ] + +[tool.cibuildwheel.linux] +before-build = "bash ci-before-build.sh" +repair-wheel-command = "bash ci-repair-wheel.sh {dest_dir} {wheel}" +test-command = "cd {package} && bash ci-test.sh " +archs = ["x86_64", "aarch64", "i686"] + +[tool.cibuildwheel.macos] +before-build = "bash ci-before-build.sh" +repair-wheel-command = "bash ci-repair-wheel.sh {dest_dir} {wheel}" +test-command = "cd {package} && bash ci-test.sh" +archs = ["x86_64", "universal2", "arm64"] + +[tool.cibuildwheel.windows] +repair-wheel-command = "bash tools/repair_for_win.sh {dest_dir} {wheel}" +test-command = "bash {project}/tools/test_for_win.sh" +archs = ["AMD64", "x86", "ARM64"] \ No newline at end of file diff --git a/tools/build_steps.sh b/tools/build_steps.sh index b651c82..7181aa6 100644 --- a/tools/build_steps.sh +++ b/tools/build_steps.sh @@ -255,50 +255,3 @@ function do_build_lib { $BUILD_PREFIX/lib/pkgconfig/scipy-openblas* \ $BUILD_PREFIX/lib/cmake/openblas } - - -function build_lib_on_travis { - # OSX or manylinux build - # - # Input arg - # plat - one of i686, x86_64, arm64 - # interface64 - 1 if build with INTERFACE64 and SYMBOLSUFFIX - # nightly - 1 if building for nightlies - # - # Depends on globals - # BUILD_PREFIX - install suffix e.g. "/usr/local" - # MB_ML_VER - set -x - local plat=${1:-$PLAT} - local interface64=${2:-$INTERFACE64} - local nightly=${3:0} - local manylinux=${MB_ML_VER:-1} - - # Manylinux wrapper - local libc=${MB_ML_LIBC:-manylinux} - local docker_image=quay.io/pypa/${libc}${manylinux}_${plat} - docker pull $docker_image - # run `do_build_lib` in the docker image - docker run --rm \ - -e BUILD_PREFIX="$BUILD_PREFIX" \ - -e PLAT="${plat}" \ - -e INTERFACE64="${interface64}" \ - -e NIGHTLY="${nightly}" \ - -e PYTHON_VERSION="$MB_PYTHON_VERSION" \ - -e MB_ML_VER=${manylinux} \ - -e MB_ML_LIBC=${libc} \ - -v $PWD:/io \ - $docker_image /io/tools/docker_build_wrap.sh -} - - - -function build_on_travis { - if [ ${TRAVIS_EVENT_TYPE} == "cron" ]; then - build_lib_on_travis "$PLAT" "$INTERFACE64" 1 - version=$(cd OpenBLAS && git describe --tags --abbrev=8 | sed -e "s/^v\(.*\)-g.*/\1/" | sed -e "s/-/./g") - sed -e "s/^version = .*/version = \"${version}\"/" -i.bak pyproject.toml - else - build_lib_on_travis "$PLAT" "$INTERFACE64" 0 - fi -} diff --git a/tools/build_steps_win_arm64.bat b/tools/build_steps_win_arm64.bat index 5da4153..bc368e9 100755 --- a/tools/build_steps_win_arm64.bat +++ b/tools/build_steps_win_arm64.bat @@ -163,39 +163,7 @@ cd ../.. :: Build the Wheel & Install It echo Running 'python -m build' to build the wheel... python -c "import build" 2>NUL || pip install build -if "%if_bits%"=="64" ( - python -m build - if errorlevel 1 exit /b 1 -) else ( +if "%if_bits%"=="32" ( move /Y pyproject.toml pyproject.toml.bak move /Y %out_pyproject% pyproject.toml - python -m build - if errorlevel 1 exit /b 1 - move /Y pyproject.toml.bak pyproject.toml -) -if "%if_bits%"=="32" ( - move /Y "%CD%\ob64_backup" "%ob_64%" -) - -:: Rename the wheel -for %%f in (dist\*any.whl) do ( - set WHEEL_FILE=dist\%%f - set "filename=%%~nxf" - set "newname=!filename:any.whl=win_arm64.whl!" - ren "dist\!filename!" "!newname!" -) - -:: Locate the built wheel -for /f %%f in ('dir /b dist\scipy_openblas*.whl 2^>nul') do set WHEEL_FILE=dist\%%f - -if not defined WHEEL_FILE ( - echo Error: No wheel file found in dist folder. - exit /b 1 ) - -echo Installing wheel: %WHEEL_FILE% -pip install "%WHEEL_FILE%" -if errorlevel 1 exit /b 1 - -echo Done. -exit /b 0 diff --git a/tools/build_wheel.sh b/tools/build_wheel.sh deleted file mode 100644 index 394dcb6..0000000 --- a/tools/build_wheel.sh +++ /dev/null @@ -1,54 +0,0 @@ -#! /bin/bash -# Needs: -# $INTERFACE64 ("1" or "0") -# $PLAT (x86_64, i686, arm64, aarch64, s390x, ppc64le) - -# The code below is for Travis use only. - -set -xe - -if [[ ! -e tools/build_prepare.sh ]];then - cd /openblas -fi - -source tools/build_prepare.sh - -$PYTHON -m pip wheel -w dist -v . - -echo "Repairing wheel with auditwheel" -auditwheel repair -w dist --lib-sdir /lib dist/*.whl -echo "Wheel repaired." - -rm dist/*none-linux*.whl - -ls -l dist/ - -# Add an RPATH to libgfortran: -# https://github.com/pypa/auditwheel/issues/451 -if [ "$MB_ML_LIBC" == "musllinux" ]; then - apk add zip -else - yum install -y zip -fi -unzip dist/*.whl "*libgfortran*" -patchelf --force-rpath --set-rpath '$ORIGIN' */lib/libgfortran* -zip dist/*.whl */lib/libgfortran* - -echo "Final wheel contents:" - -ls -l dist/ - -echo "Testing the wheel" - -# Test that the wheel works with a different python -PYTHON=python3.11 - -if [ "${INTERFACE64}" != "1" ]; then - $PYTHON -m pip install --no-index --find-links dist scipy_openblas32 - $PYTHON -m scipy_openblas32 -else - $PYTHON -m pip install --no-index --find-links dist scipy_openblas64 - $PYTHON -m scipy_openblas64 -fi - -echo "Wheel test successful." \ No newline at end of file diff --git a/tools/build_wheel_prepare_for_win.sh b/tools/build_wheel_prepare_for_win.sh new file mode 100644 index 0000000..b6a2938 --- /dev/null +++ b/tools/build_wheel_prepare_for_win.sh @@ -0,0 +1,36 @@ +set -xeo pipefail +python -m pip install wheel +# This will fail if there is more than one file in libs +unzip -d local/scipy_openblas64 builds/openblas*.zip +if [[ -d local/scipy_openblas64/64 ]]; then + mv local/scipy_openblas64/64/* local/scipy_openblas64 +else + mv local/scipy_openblas64/32/* local/scipy_openblas64 +fi +mv local/scipy_openblas64/bin/*.dll local/scipy_openblas64/lib +rm local/scipy_openblas64/lib/*.a +rm -f local/scipy_openblas64/lib/*.exp # may not exist? +rm local/scipy_openblas64/lib/*.def +rm -rf local/scipy_openblas64/lib/pkgconfig +if [[ -d local/scipy_openblas64/64 ]]; then + rm -rf local/scipy_openblas64/64 +else + rm -rf local/scipy_openblas64/32 +fi +sed -e "s/bin/lib/" -i local/scipy_openblas64/lib/cmake/openblas/OpenBLASConfig.cmake +sed -e "s/dll/lib/" -i local/scipy_openblas64/lib/cmake/openblas/OpenBLASConfig.cmake +if [[ "${INTERFACE64}" != "1" ]]; then + mv local/scipy_openblas64 local/scipy_openblas32 + # rewrite the name of the project to scipy-openblas32 + # this is a hack, but apparently there is no other way to change the name + # of a pyproject.toml project + sed -e "s/openblas64/openblas32/" -i pyproject.toml + sed -e "s/openblas_get_config64_/openblas_get_config/" -i local/scipy_openblas32/__init__.py + sed -e "s/cflags =.*/cflags = '-DBLAS_SYMBOL_PREFIX=scipy_'/" -i local/scipy_openblas32/__init__.py + sed -e "s/openblas64/openblas32/" -i local/scipy_openblas32/__init__.py + sed -e "s/openblas64/openblas32/" -i local/scipy_openblas32/__main__.py +fi +echo "" >> LICENSE.txt +echo "----" >> LICENSE.txt +echo "" >> LICENSE.txt +cat tools/LICENSE_win32.txt >> LICENSE.txt \ No newline at end of file diff --git a/tools/repair_for_win.sh b/tools/repair_for_win.sh new file mode 100644 index 0000000..c8950ee --- /dev/null +++ b/tools/repair_for_win.sh @@ -0,0 +1,14 @@ +set -xe +pip install delvewheel + +if [[ ${OS-NAME} -eq "windows-latest" ]]; then + # Since it has the correct platform tag, we don't need to rename the wheel for windows-latest + # for f in dist/*.whl; + # do mv $f "${f/%any.whl/$WHEEL_PLAT.whl}"; + # done + delvewheel repair -w $1 $2 + exit 0 +fi + +# repair for windows arm64 +./tools/repair_wheel_for_win_arm64.bat $1 $2 \ No newline at end of file diff --git a/tools/repair_wheel_for_win_arm64.bat b/tools/repair_wheel_for_win_arm64.bat new file mode 100644 index 0000000..5a9f3e6 --- /dev/null +++ b/tools/repair_wheel_for_win_arm64.bat @@ -0,0 +1,14 @@ +if "%if_bits%"=="32" ( + move /Y pyproject.toml.bak pyproject.toml + move /Y "%CD%\ob64_backup" "%ob_64%" +) + +delvewheel repair -w %1 %2 + +:: Rename the wheel +@REM for %%f in (dist\*any.whl) do ( +@REM set WHEEL_FILE=dist\%%f +@REM set "filename=%%~nxf" +@REM set "newname=!filename:any.whl=win_arm64.whl!" +@REM ren "dist\!filename!" "!newname!" +@REM ) \ No newline at end of file diff --git a/tools/test_for_win.sh b/tools/test_for_win.sh new file mode 100644 index 0000000..321fe7c --- /dev/null +++ b/tools/test_for_win.sh @@ -0,0 +1,9 @@ +if [[ "${INTERFACE64}" == "1" ]]; then + # python -m pip install --no-index --find-links dist scipy_openblas64 + python -m scipy_openblas64 + python -c "import scipy_openblas64; print(scipy_openblas64.get_pkg_config())" +else + # python -m pip install --no-index --find-links dist scipy_openblas32 + python -m scipy_openblas32 + python -c "import scipy_openblas32; print(scipy_openblas32.get_pkg_config())" +fi From e18389145941b894cdeced047c47c40bbbd50157 Mon Sep 17 00:00:00 2001 From: ffgan Date: Thu, 23 Oct 2025 23:02:09 +0800 Subject: [PATCH 2/7] Add support for additional architectures in cibuildwheel configuration Co-authored by: nijincheng@iscas.ac.cn; --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c42cf75..4c04094 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ environment-pass = [ before-build = "bash ci-before-build.sh" repair-wheel-command = "bash ci-repair-wheel.sh {dest_dir} {wheel}" test-command = "cd {package} && bash ci-test.sh " -archs = ["x86_64", "aarch64", "i686"] +archs = ["x86_64", "aarch64", "i686", "ppc64le", "s390x"] [tool.cibuildwheel.macos] before-build = "bash ci-before-build.sh" From 922da5c9729c2ea75128e85c470de6ab89b6aff2 Mon Sep 17 00:00:00 2001 From: ffgan Date: Fri, 24 Oct 2025 10:15:58 +0800 Subject: [PATCH 3/7] Add required variables for cibuildwheel on Travis Co-authored by: nijincheng@iscas.ac.cn; --- .travis.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 75029a3..c886fd8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,10 +38,18 @@ install: # Maybe get and clean and patch source - | python3 -m pip install cibuildwheel==3.2.1 + python3 -m cibuildwheel --help # make sure it is installed correctly echo done install step script: - - python3 -m cibuildwheel --output-dir dist + - | + export CIBW_BUILD="cp39-manylinux_${PLAT}" + export CIBW_MANYLINUX_S390X_IMAGE="manylinux${MB_ML_VER}" + export CIBW_MANYLINUX_PPC64LE_IMAGE="manylinux${MB_ML_VER}" + + python3 -m cibuildwheel --print-build-identifiers + + python3 -m cibuildwheel --output-dir dist after_success: - set +ex From 7526bc13e39d673f6068d9a323d381cf3291fa87 Mon Sep 17 00:00:00 2001 From: ffgan Date: Fri, 24 Oct 2025 10:27:53 +0800 Subject: [PATCH 4/7] Add more debugging information for Travis Co-authored by: nijincheng@iscas.ac.cn; --- .travis.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index c886fd8..73037e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,20 +36,21 @@ jobs: install: # Maybe get and clean and patch source - - | - python3 -m pip install cibuildwheel==3.2.1 - python3 -m cibuildwheel --help # make sure it is installed correctly - echo done install step + - pip install cibuildwheel==3.2.1 -v + - which cibuildwheel + - cibuildwheel --help # make sure it is installed correctly + - echo done install step script: - - | - export CIBW_BUILD="cp39-manylinux_${PLAT}" - export CIBW_MANYLINUX_S390X_IMAGE="manylinux${MB_ML_VER}" - export CIBW_MANYLINUX_PPC64LE_IMAGE="manylinux${MB_ML_VER}" + - CIBW_BUILD="cp39-manylinux_${PLAT}" + - CIBW_MANYLINUX_S390X_IMAGE="manylinux${MB_ML_VER}" + - CIBW_MANYLINUX_PPC64LE_IMAGE="manylinux${MB_ML_VER}" + + - echo "Building for PLAT=${PLAT}, INTERFACE64=${INTERFACE64}, MB_ML_VER=${MB_ML_VER}, CIBW_BUILD=${CIBW_BUILD}, CIBW_MANYLINUX_S390X_IMAGE=${CIBW_MANYLINUX_S390X_IMAGE}, CIBW_MANYLINUX_PPC64LE_IMAGE=${CIBW_MANYLINUX_PPC64LE_IMAGE}" - python3 -m cibuildwheel --print-build-identifiers + - cibuildwheel --print-build-identifiers - python3 -m cibuildwheel --output-dir dist + - cibuildwheel --output-dir dist after_success: - set +ex From 1c4a121e803d6d26fb0345759f4395567b6a918c Mon Sep 17 00:00:00 2001 From: ffgan Date: Fri, 24 Oct 2025 10:37:22 +0800 Subject: [PATCH 5/7] Attempt to fix cibuildwheel installation issue by removing version specification in Travis CI Co-authored by: nijincheng@iscas.ac.cn; --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 73037e4..113a2e8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,7 +36,7 @@ jobs: install: # Maybe get and clean and patch source - - pip install cibuildwheel==3.2.1 -v + - pip install cibuildwheel -v - which cibuildwheel - cibuildwheel --help # make sure it is installed correctly - echo done install step From 693f0c4b147b3a014c4996779dc55e83483e4749 Mon Sep 17 00:00:00 2001 From: ffgan Date: Fri, 24 Oct 2025 10:56:07 +0800 Subject: [PATCH 6/7] Export environment variables Co-authored by: nijincheng@iscas.ac.cn; --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 113a2e8..7ea33bf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,15 +42,15 @@ install: - echo done install step script: - - CIBW_BUILD="cp39-manylinux_${PLAT}" - - CIBW_MANYLINUX_S390X_IMAGE="manylinux${MB_ML_VER}" - - CIBW_MANYLINUX_PPC64LE_IMAGE="manylinux${MB_ML_VER}" + - export CIBW_BUILD="cp39-manylinux_${PLAT}" + - export CIBW_MANYLINUX_S390X_IMAGE="manylinux${MB_ML_VER}" + - export CIBW_MANYLINUX_PPC64LE_IMAGE="manylinux${MB_ML_VER}" - echo "Building for PLAT=${PLAT}, INTERFACE64=${INTERFACE64}, MB_ML_VER=${MB_ML_VER}, CIBW_BUILD=${CIBW_BUILD}, CIBW_MANYLINUX_S390X_IMAGE=${CIBW_MANYLINUX_S390X_IMAGE}, CIBW_MANYLINUX_PPC64LE_IMAGE=${CIBW_MANYLINUX_PPC64LE_IMAGE}" - cibuildwheel --print-build-identifiers - - cibuildwheel --output-dir dist + - cibuildwheel "." --output-dir "dist" 2>&1 after_success: - set +ex From 0d403d404e4030075e2057342900488ce092fada Mon Sep 17 00:00:00 2001 From: mattip Date: Fri, 24 Oct 2025 11:39:52 +0300 Subject: [PATCH 7/7] use macos-15-intel for x86_64 builds --- .github/workflows/wheel.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index 563cb36..7814d2b 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -29,8 +29,8 @@ jobs: - { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '0', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} - { os: ubuntu-latest, PLAT: x86_64, INTERFACE64: '1', MB_ML_VER: '2014', MB_ML_LIBC: manylinux} - - { os: macos-latest, PLAT: x86_64, INTERFACE64: '0', MB_ML_LIBC: macosx} - - { os: macos-latest, PLAT: x86_64, INTERFACE64: '1', MB_ML_LIBC: macosx} + - { os: macos-15-intel, PLAT: x86_64, INTERFACE64: '0', MB_ML_LIBC: macosx} + - { os: macos-15-intel, PLAT: x86_64, INTERFACE64: '1', MB_ML_LIBC: macosx} - { os: macos-latest, PLAT: arm64, INTERFACE64: '0', MB_ML_LIBC: macosx} - { os: macos-latest, PLAT: arm64, INTERFACE64: '1', MB_ML_LIBC: macosx}