Skip to content

Commit

Permalink
Merge pull request #190 from daducci/release/v2.0.2
Browse files Browse the repository at this point in the history
[RELEASE] v2.0.2
  • Loading branch information
nightwnvol authored Jul 4, 2024
2 parents 9011225 + c7349f5 commit 268efd5
Show file tree
Hide file tree
Showing 19 changed files with 355 additions and 427 deletions.
75 changes: 0 additions & 75 deletions .cirrus.yml

This file was deleted.

156 changes: 104 additions & 52 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@ jobs:
build_windows_wheels:
strategy:
matrix:
py: [cp36, cp37, cp38, cp39, cp310, cp311]
py: [cp36, cp37, cp38, cp39, cp310, cp311, cp312]
arch:
- [AMD64, win_amd64, x64]
- [x86, win32, x86]
name: ${{ matrix.py }}-${{ matrix.arch[1] }}
runs-on: windows-2019
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4.0.0
uses: actions/checkout@v4

- name: Download compiled OpenBLAS
run: |
curl -L -o OpenBLAS-0.3.21.zip https://github.com/xianyi/OpenBLAS/releases/download/v0.3.21/OpenBLAS-0.3.21-${{ matrix.arch[2] }}.zip
7z x OpenBLAS-0.3.21.zip -o"OpenBLAS"
curl -L -o OpenBLAS-0.3.27.zip https://github.com/OpenMathLib/OpenBLAS/releases/download/v0.3.27/OpenBLAS-0.3.27-${{ matrix.arch[2] }}.zip
7z x OpenBLAS-0.3.27.zip -o"OpenBLAS"
- name: Set up the configuration file
run: |
python setup_site.py openblas libopenblas ${{ github.workspace }}\OpenBLAS\lib ${{ github.workspace }}\OpenBLAS\include
- name: Build wheel ${{ matrix.py }}-${{ matrix.arch[1] }}
uses: pypa/cibuildwheel@v2.15.0
uses: pypa/cibuildwheel@v2.19.1
env:
CIBW_PLATFORM: windows
CIBW_BUILD: ${{ matrix.py }}-${{ matrix.arch[1] }}
Expand All @@ -40,87 +40,128 @@ jobs:
delvewheel repair --add-path ${{ github.workspace }}\OpenBLAS\bin -w {dest_dir} -v {wheel}
- name: Upload artifacts
uses: actions/upload-artifact@v3.1.3
uses: actions/upload-artifact@v4
with:
name: wheels_windows_${{ matrix.arch[0] }}
name: wheels_${{ matrix.py }}_${{ matrix.arch[1] }}
path: ./wheelhouse/*.whl
if-no-files-found: error

build_macos_x86_64_wheels:
build_macos_wheels:
strategy:
matrix:
py: [cp36, cp37, cp38, cp39, cp310, cp311]
arch:
- [x86_64, macosx_x86_64]
name: ${{ matrix.py }}-${{ matrix.arch[1] }}
runs-on: macos-11
config:
[
{
py: cp36,
arch: [x86_64, macosx_x86_64, 12.0, macos-12]
},
{
py: cp37,
arch: [x86_64, macosx_x86_64, 12.0, macos-12]
},
{
py: cp38,
arch: [x86_64, macosx_x86_64, 12.0, macos-12]
},
{
py: cp39,
arch: [x86_64, macosx_x86_64, 12.0, macos-12]
},
{
py: cp310,
arch: [x86_64, macosx_x86_64, 12.0, macos-12]
},
{
py: cp311,
arch: [x86_64, macosx_x86_64, 12.0, macos-12]
},
{
py: cp312,
arch: [x86_64, macosx_x86_64, 12.0, macos-12]
},
{
py: cp38,
arch: [arm64, macosx_arm64, 12.0, macos-14]
},
{
py: cp39,
arch: [arm64, macosx_arm64, 12.0, macos-14]
},
{
py: cp310,
arch: [arm64, macosx_arm64, 12.0, macos-14]
},
{
py: cp311,
arch: [arm64, macosx_arm64, 12.0, macos-14]
},
{
py: cp312,
arch: [arm64, macosx_arm64, 12.0, macos-14]
}
]
name: ${{ matrix.config.py }}-${{ matrix.config.arch[1] }}
runs-on: ${{ matrix.config.arch[3] }}
if:
steps:
- name: Checkout
uses: actions/checkout@v4.0.0
uses: actions/checkout@v4

- name: Download compiled OpenBLAS
uses: dawidd6/action-download-artifact@v2.27.0
uses: actions/download-artifact@v4
with:
workflow: compile_openblas_macos_x86_64.yml
workflow_conclusion: success
commit: ${{github.event.pull_request.head.sha}}
name: OpenBLAS_macos_${{ matrix.arch[0] }}
github-token: ${{ secrets.GH_PAT }}
run-id: ${{ secrets.OPENBLAS_MACOS_ARTIFACTS_RUN_ID }}
name: OpenBLAS_macos_${{ matrix.config.arch[0] }}
path: OpenBLAS
search_artifacts: true

- name: Install pipx # NOTE: required only for arm64
if: startsWith(matrix.config.arch[0], 'arm64')
run: |
brew install pipx
- name: Set up the configuration file
run: |
python3 setup_site.py openblas openblas ${{ github.workspace }}/OpenBLAS/lib ${{ github.workspace }}/OpenBLAS/include
- name: Build wheel ${{ matrix.py }}-${{ matrix.arch[1] }}
uses: pypa/cibuildwheel@v2.15.0
- name: Build wheel ${{ matrix.config.py }}-${{ matrix.config.arch[1] }}
uses: pypa/cibuildwheel@v2.19.1
env:
MACOSX_DEPLOYMENT_TARGET: 10.9
CIBW_ENVIRONMENT_MACOS: >
MACOSX_DEPLOYMENT_TARGET=${{ matrix.config.arch[2] }}
CIBW_PLATFORM: macos
CIBW_BUILD: ${{ matrix.py }}-${{ matrix.arch[1] }}
CIBW_ARCHS_MACOS: ${{ matrix.arch[0] }}
CIBW_BUILD: ${{ matrix.config.py }}-${{ matrix.config.arch[1] }}
CIBW_ARCHS_MACOS: ${{ matrix.config.arch[0] }}
CIBW_REPAIR_WHEEL_COMMAND_MACOS: >
DYLD_LIBRARY_PATH=${{ github.workspace }}/OpenBLAS/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}
- name: Upload artifacts
uses: actions/upload-artifact@v3.1.3
uses: actions/upload-artifact@v4
with:
name: wheels_macos_${{ matrix.arch[0] }}
name: wheels_${{ matrix.config.py }}_${{ matrix.config.arch[1] }}
path: ./wheelhouse/*.whl
if-no-files-found: error

create_macos_arm64_check:
name: Create MacOS arm64 check
runs-on: ubuntu-20.04
steps:
- name: Create check
run: |
curl -X DELETE -H "Accept:application/vnd.github+json" -H "Authorization:Bearer ${{ secrets.REPO_TOKEN }}" -H "X-GitHub-Api-Version:2022-11-28" https://api.github.com/repos/daducci/AMICO/actions/variables/CHECK_ID_MACOS_ARM64
CHECK_ID_MACOS_ARM64=$(curl -X POST -H "Accept:application/vnd.github+json" -H "Authorization:Bearer ${{ github.token }}" -H "X-GitHub-Api-Version:2022-11-28" https://api.github.com/repos/daducci/AMICO/check-runs -d '{"name":"cp*-macosx_arm64","status":"in_progress","head_sha":"'"${{ github.sha }}"'"}' | jq -r .id)
curl -X POST -H "Accept:application/vnd.github+json" -H "Authorization:Bearer ${{ secrets.REPO_TOKEN }}" -H "X-GitHub-Api-Version:2022-11-28" https://api.github.com/repos/daducci/AMICO/actions/variables -d '{"name":"CHECK_ID_MACOS_ARM64","value":"'"$CHECK_ID_MACOS_ARM64"'"}'
build_linux_wheels:
strategy:
matrix:
py: [cp36, cp37, cp38, cp39, cp310, cp311]
py: [cp36, cp37, cp38, cp39, cp310, cp311, cp312]
arch:
- [x86_64, manylinux_x86_64, amd64]
- [aarch64, manylinux_aarch64, arm64]
name: ${{ matrix.py }}-${{ matrix.arch[1] }}
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.0.0
uses: actions/checkout@v4

- name: Download compiled OpenBLAS
uses: dawidd6/action-download-artifact@v2.27.0
uses: actions/download-artifact@v4
with:
workflow: compile_openblas_linux.yml
workflow_conclusion: success
commit: ${{github.event.pull_request.head.sha}}
github-token: ${{ secrets.GH_PAT }}
run-id: ${{ secrets.OPENBLAS_LINUX_ARTIFACTS_RUN_ID }}
name: OpenBLAS_linux_${{ matrix.arch[0] }}
path: OpenBLAS
search_artifacts: true

- name: Set up the configuration file
run: | # NOTE: need to add '/host' because compilation is done in a Docker container
Expand All @@ -132,7 +173,7 @@ jobs:
platforms: ${{ matrix.arch[2] }}

- name: Build wheel ${{ matrix.py }}-${{ matrix.arch[1] }}
uses: pypa/cibuildwheel@v2.15.0
uses: pypa/cibuildwheel@v2.19.1
env:
CIBW_PLATFORM: linux
CIBW_BUILD: ${{ matrix.py }}-${{ matrix.arch[1] }}
Expand All @@ -141,18 +182,18 @@ jobs:
LD_LIBRARY_PATH=/host${{ github.workspace }}/OpenBLAS/lib auditwheel repair -w {dest_dir} {wheel}
- name: Upload artifacts
uses: actions/upload-artifact@v3.1.3
uses: actions/upload-artifact@v4
with:
name: wheels_linux_${{ matrix.arch[0] }}
name: wheels_${{ matrix.py }}_${{ matrix.arch[1] }}
path: ./wheelhouse/*.whl
if-no-files-found: error

build_source_distribution:
name: sdist
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.0.0
uses: actions/checkout@v4

- name: Set up the configuration file
run: |
Expand All @@ -165,8 +206,19 @@ jobs:
python -m build --sdist
- name: Upload artifacts
uses: actions/upload-artifact@v3.1.3
uses: actions/upload-artifact@v4
with:
name: sdist
path: ./dist/*.tar.gz
if-no-files-found: error

run_id:
name: Create/Update WHEELS_ARTIFACTS_RUN_ID secret
runs-on: ubuntu-latest
needs: [build_windows_wheels, build_macos_wheels, build_linux_wheels, build_source_distribution]
steps:
- uses: actions/checkout@v4
- run: |
gh secret set WHEELS_ARTIFACTS_RUN_ID --body ${{ github.run_id }}
env:
GH_TOKEN: ${{ secrets.GH_PAT }}
23 changes: 17 additions & 6 deletions .github/workflows/compile_openblas_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- [x86_64, manylinux2014_x86_64, HASWELL, amd64]
- [aarch64, manylinux2014_aarch64, ARMV8, arm64]
name: ${{ matrix.arch[0] }}
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
timeout-minutes: 600 # NOTE: need this to compile the arm64 version
steps:
- name: Set up QEMU
Expand All @@ -19,16 +19,27 @@ jobs:

- name: Compile OpenBLAS
run: |
curl -L -o OpenBLAS-0.3.21.tar.gz https://github.com/xianyi/OpenBLAS/releases/download/v0.3.21/OpenBLAS-0.3.21.tar.gz
tar -xzf OpenBLAS-0.3.21.tar.gz
curl -L -o OpenBLAS-0.3.27.tar.gz https://github.com/OpenMathLib/OpenBLAS/releases/download/v0.3.27/OpenBLAS-0.3.27.tar.gz
tar -xzf OpenBLAS-0.3.27.tar.gz
docker create --name=openblas_${{ matrix.arch[0] }} -i --volume=${GITHUB_WORKSPACE}:/host quay.io/pypa/${{ matrix.arch[1] }}:latest /bin/bash
docker start openblas_${{ matrix.arch[0] }}
docker exec -i openblas_${{ matrix.arch[0] }} sh -c "make -C /host/OpenBLAS-0.3.21 TARGET=${{ matrix.arch[2] }} DYNAMIC_ARCH=1"
docker exec -i openblas_${{ matrix.arch[0] }} sh -c "make install -C /host/OpenBLAS-0.3.21 PREFIX=/host/OpenBLAS"
docker exec -i openblas_${{ matrix.arch[0] }} sh -c "make -C /host/OpenBLAS-0.3.27 TARGET=${{ matrix.arch[2] }} DYNAMIC_ARCH=1"
docker exec -i openblas_${{ matrix.arch[0] }} sh -c "make install -C /host/OpenBLAS-0.3.27 PREFIX=/host/OpenBLAS"
- name: Upload artifacts
uses: actions/upload-artifact@v3.1.3
uses: actions/upload-artifact@v4
with:
name: OpenBLAS_linux_${{ matrix.arch[0] }}
path: ./OpenBLAS
if-no-files-found: error

run_id:
name: Create/Update OPENBLAS_LINUX_ARTIFACTS_RUN_ID secret
runs-on: ubuntu-latest
needs: [compile_openblas]
steps:
- uses: actions/checkout@v4
- run: |
gh secret set OPENBLAS_LINUX_ARTIFACTS_RUN_ID --body ${{ github.run_id }}
env:
GH_TOKEN: ${{ secrets.GH_PAT }}
Loading

0 comments on commit 268efd5

Please sign in to comment.