Skip to content

Commit

Permalink
Merge pull request #169 from daducci/release/v2.0.0
Browse files Browse the repository at this point in the history
[RELEASE] v2.0.0
  • Loading branch information
nightwnvol committed Sep 15, 2023
2 parents 54f898f + e6a15ee commit bb47eab
Show file tree
Hide file tree
Showing 26 changed files with 2,330 additions and 1,421 deletions.
22 changes: 13 additions & 9 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ compile_openblas_macos_arm64_task:
alias: compile_openblas_macos_arm64
trigger_type: manual
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-xcode
image: ghcr.io/cirruslabs/macos-monterey-xcode:latest
env:
MACOSX_DEPLOYMENT_TARGET: "11.0"
clone_script:
Expand All @@ -16,23 +16,26 @@ compile_openblas_macos_arm64_task:
- make -C OpenBLAS-0.3.21 TARGET=ARMV8 DYNAMIC_ARCH=1
- make install -C OpenBLAS-0.3.21 PREFIX=${CIRRUS_WORKING_DIR}/OpenBLAS
- 7z a OpenBLAS_macos_arm64.zip ./OpenBLAS/*
- curl -X DELETE -H "Accept:application/vnd.github+json" -H "Authorization:Bearer ${REPO_TOKEN}" -H "X-GitHub-Api-Version:2022-11-28" https://api.github.com/repos/nightwnvol/amico_gh_actions/actions/variables/CIRRUS_BUILD_ID
- curl -X POST -H "Accept:application/vnd.github+json" -H "Authorization:Bearer ${REPO_TOKEN}" -H "X-GitHub-Api-Version:2022-11-28" https://api.github.com/repos/nightwnvol/amico_gh_actions/actions/variables -d '{"name":"CIRRUS_BUILD_ID","value":"'"$CIRRUS_BUILD_ID"'"}'
- curl -X DELETE -H "Accept:application/vnd.github+json" -H "Authorization:Bearer ${REPO_TOKEN}" -H "X-GitHub-Api-Version:2022-11-28" https://api.github.com/repos/daducci/AMICO/actions/variables/CIRRUS_BUILD_ID
- curl -X POST -H "Accept:application/vnd.github+json" -H "Authorization:Bearer ${REPO_TOKEN}" -H "X-GitHub-Api-Version:2022-11-28" https://api.github.com/repos/daducci/AMICO/actions/variables -d '{"name":"CIRRUS_BUILD_ID","value":"'"$CIRRUS_BUILD_ID"'"}'
compiled_openblas_artifacts:
path: 'OpenBLAS_macos_arm64.zip'

build_macos_arm64_wheels_task:
name: Build MacOS arm64 wheels
alias: build_macos_arm64_wheels
only_if: ${CIRRUS_CHANGE_IN_REPO} != ${CIRRUS_LAST_GREEN_CHANGE}
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-xcode
image: ghcr.io/cirruslabs/macos-monterey-xcode:latest
matrix:
- env:
CP: "38"
- env:
CP: "39"
- env:
CP: "310"
- env:
CP: "311"
env:
MACOSX_DEPLOYMENT_TARGET: 11.0
PATH: ${PATH}:/opt/homebrew/opt/python@3.10/bin
Expand All @@ -45,9 +48,9 @@ build_macos_arm64_wheels_task:
- brew install p7zip
- brew install jq
- brew install python@3.10
- python3.10 -m pip install cibuildwheel==2.12.0
- python3.10 -m pip install cibuildwheel==2.15.0
download_compiled_openblas_script:
- CIRRUS_BUILD_ID=$(curl -H "Accept:application/vnd.github+json" -H "Authorization:Bearer ${REPO_TOKEN}" -H "X-GitHub-Api-Version:2022-11-28" https://api.github.com/repos/nightwnvol/amico_gh_actions/actions/variables/CIRRUS_BUILD_ID | jq -r .value)
- CIRRUS_BUILD_ID=$(curl -H "Accept:application/vnd.github+json" -H "Authorization:Bearer ${REPO_TOKEN}" -H "X-GitHub-Api-Version:2022-11-28" https://api.github.com/repos/daducci/AMICO/actions/variables/CIRRUS_BUILD_ID | jq -r .value)
- curl -L -o OpenBLAS.zip https://api.cirrus-ci.com/v1/artifact/build/${CIRRUS_BUILD_ID}/compile_openblas_macos_arm64/compiled_openblas/OpenBLAS_macos_arm64.zip
- 7z x OpenBLAS.zip -o"OpenBLAS"
set_up_configuration_file_script:
Expand All @@ -59,13 +62,14 @@ build_macos_arm64_wheels_task:

trigger_github_workflow_task:
name: Trigger GitHub workflow
only_if: ${CIRRUS_CHANGE_IN_REPO} != ${CIRRUS_LAST_GREEN_CHANGE}
depends_on: build_macos_arm64_wheels
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-xcode
image: ghcr.io/cirruslabs/macos-monterey-xcode:latest
clone_script:
- echo SKIP CLONE
install_requirements_script:
- brew install jq
trigger_script:
- CHECK_ID_MACOS_ARM64=$(curl -H "Accept:application/vnd.github+json" -H "Authorization:Bearer ${REPO_TOKEN}" -H "X-GitHub-Api-Version:2022-11-28" https://api.github.com/repos/nightwnvol/amico_gh_actions/actions/variables/CHECK_ID_MACOS_ARM64 | jq -r .value)
- curl -X POST -H "Accept:application/vnd.github+json" -H "Authorization:Bearer ${REPO_TOKEN}" -H "X-GitHub-Api-Version:2022-11-28" https://api.github.com/repos/nightwnvol/amico_gh_actions/actions/workflows/macos_arm64_wheels.yml/dispatches -d '{"ref":"'"$CIRRUS_BRANCH"'","inputs":{"cirrus_build_id":"'"$CIRRUS_BUILD_ID"'","check_id_macos_arm64":"'"$CHECK_ID_MACOS_ARM64"'"}}'
- CHECK_ID_MACOS_ARM64=$(curl -H "Accept:application/vnd.github+json" -H "Authorization:Bearer ${REPO_TOKEN}" -H "X-GitHub-Api-Version:2022-11-28" https://api.github.com/repos/daducci/AMICO/actions/variables/CHECK_ID_MACOS_ARM64 | jq -r .value)
- curl -X POST -H "Accept:application/vnd.github+json" -H "Authorization:Bearer ${REPO_TOKEN}" -H "X-GitHub-Api-Version:2022-11-28" https://api.github.com/repos/daducci/AMICO/actions/workflows/macos_arm64_wheels.yml/dispatches -d '{"ref":"'"$CIRRUS_BRANCH"'","inputs":{"cirrus_build_id":"'"$CIRRUS_BUILD_ID"'","check_id_macos_arm64":"'"$CHECK_ID_MACOS_ARM64"'"}}'
46 changes: 25 additions & 21 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
name: Build wheels
run-name: Build wheels - ${{ github.sha }}
on: push
on:
push:
branches:
- 'master'
- 'release/**'
jobs:
build_windows_wheels:
strategy:
matrix:
py: [cp36, cp37, cp38, cp39, cp310]
py: [cp36, cp37, cp38, cp39, cp310, cp311]
arch:
- [AMD64, win_amd64, x64]
- [x86, win32, x86]
name: ${{ matrix.py }}-${{ matrix.arch[1] }}
runs-on: windows-2019
steps:
- name: Checkout
uses: actions/checkout@v3.3.0
uses: actions/checkout@v4.0.0

- name: Download compiled OpenBLAS
run: |
Expand All @@ -25,7 +29,7 @@ jobs:
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.12.0
uses: pypa/cibuildwheel@v2.15.0
env:
CIBW_PLATFORM: windows
CIBW_BUILD: ${{ matrix.py }}-${{ matrix.arch[1] }}
Expand All @@ -36,7 +40,7 @@ jobs:
delvewheel repair --add-path ${{ github.workspace }}\OpenBLAS\bin -w {dest_dir} -v {wheel}
- name: Upload artifacts
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v3.1.3
with:
name: wheels_windows_${{ matrix.arch[0] }}
path: ./wheelhouse/*.whl
Expand All @@ -45,17 +49,17 @@ jobs:
build_macos_x86_64_wheels:
strategy:
matrix:
py: [cp36, cp37, cp38, cp39, cp310]
py: [cp36, cp37, cp38, cp39, cp310, cp311]
arch:
- [x86_64, macosx_x86_64]
name: ${{ matrix.py }}-${{ matrix.arch[1] }}
runs-on: macos-11
steps:
- name: Checkout
uses: actions/checkout@v3.3.0
uses: actions/checkout@v4.0.0

- name: Download compiled OpenBLAS
uses: dawidd6/action-download-artifact@v2.26.0
uses: dawidd6/action-download-artifact@v2.27.0
with:
workflow: compile_openblas_macos_x86_64.yml
workflow_conclusion: success
Expand All @@ -69,7 +73,7 @@ jobs:
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.12.0
uses: pypa/cibuildwheel@v2.15.0
env:
MACOSX_DEPLOYMENT_TARGET: 10.9
CIBW_PLATFORM: macos
Expand All @@ -79,7 +83,7 @@ jobs:
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.2
uses: actions/upload-artifact@v3.1.3
with:
name: wheels_macos_${{ matrix.arch[0] }}
path: ./wheelhouse/*.whl
Expand All @@ -91,25 +95,25 @@ jobs:
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/nightwnvol/amico_gh_actions/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/nightwnvol/amico_gh_actions/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/nightwnvol/amico_gh_actions/actions/variables -d '{"name":"CHECK_ID_MACOS_ARM64","value":"'"$CHECK_ID_MACOS_ARM64"'"}'
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]
py: [cp36, cp37, cp38, cp39, cp310, cp311]
arch:
- [x86_64, manylinux_x86_64, amd64]
- [aarch64, manylinux_aarch64, arm64]
name: ${{ matrix.py }}-${{ matrix.arch[1] }}
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3.3.0
uses: actions/checkout@v4.0.0

- name: Download compiled OpenBLAS
uses: dawidd6/action-download-artifact@v2.26.0
uses: dawidd6/action-download-artifact@v2.27.0
with:
workflow: compile_openblas_linux.yml
workflow_conclusion: success
Expand All @@ -123,12 +127,12 @@ jobs:
python setup_site.py openblas openblas /host${{ github.workspace }}/OpenBLAS/lib /host${{ github.workspace }}/OpenBLAS/include
- name: Set up QEMU
uses: docker/setup-qemu-action@v2.1.0
uses: docker/setup-qemu-action@v3.0.0
with:
platforms: ${{ matrix.arch[2] }}

- name: Build wheel ${{ matrix.py }}-${{ matrix.arch[1] }}
uses: pypa/cibuildwheel@v2.12.0
uses: pypa/cibuildwheel@v2.15.0
env:
CIBW_PLATFORM: linux
CIBW_BUILD: ${{ matrix.py }}-${{ matrix.arch[1] }}
Expand All @@ -137,7 +141,7 @@ jobs:
LD_LIBRARY_PATH=/host${{ github.workspace }}/OpenBLAS/lib auditwheel repair -w {dest_dir} {wheel}
- name: Upload artifacts
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v3.1.3
with:
name: wheels_linux_${{ matrix.arch[0] }}
path: ./wheelhouse/*.whl
Expand All @@ -148,7 +152,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3.3.0
uses: actions/checkout@v4.0.0

- name: Set up the configuration file
run: |
Expand All @@ -161,7 +165,7 @@ jobs:
python -m build --sdist
- name: Upload artifacts
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v3.1.3
with:
name: sdist
path: ./dist/*.tar.gz
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/compile_openblas_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
timeout-minutes: 600 # NOTE: need this to compile the arm64 version
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2.1.0
uses: docker/setup-qemu-action@v3.0.0
with:
platforms: ${{ matrix.arch[3] }}

Expand All @@ -27,7 +27,7 @@ jobs:
docker exec -i openblas_${{ matrix.arch[0] }} sh -c "make install -C /host/OpenBLAS-0.3.21 PREFIX=/host/OpenBLAS"
- name: Upload artifacts
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v3.1.3
with:
name: OpenBLAS_linux_${{ matrix.arch[0] }}
path: ./OpenBLAS
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/compile_openblas_macos_x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
make install -C OpenBLAS-0.3.21 PREFIX=${GITHUB_WORKSPACE}/OpenBLAS
- name: Upload artifacts
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v3.1.3
with:
name: OpenBLAS_macos_${{ matrix.arch[0] }}
path: ./OpenBLAS
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/macos_arm64_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Upload artifacts
id: upload_artifacts
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v3.1.3
with:
name: wheels_macos_arm64
path: ./wheelhouse/*.whl
Expand All @@ -32,9 +32,9 @@ jobs:
- name: Complete MacOS arm64 check
if: env.DOWNLOAD_RESPONSE == 200 && steps.upload_artifacts.conclusion == 'success'
run: |
curl -X PATCH -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ github.token }}" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/nightwnvol/amico_gh_actions/check-runs/${{ inputs.check_id_macos_arm64 }} -d '{"name":"cp*-macosx_arm64","status":"completed","conclusion":"success"}'
curl -X PATCH -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/${{ inputs.check_id_macos_arm64 }} -d '{"name":"cp*-macosx_arm64","status":"completed","conclusion":"success"}'
- name: Complete MacOS arm64 check
if: (failure() && steps.upload_artifacts.conclusion != 'success') || env.DOWNLOAD_RESPONSE != 200
run: |
curl -X PATCH -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ github.token }}" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/nightwnvol/amico_gh_actions/check-runs/${{ inputs.check_id_macos_arm64 }} -d '{"name":"cp*-macosx_arm64","status":"completed","conclusion":"failure"}'
curl -X PATCH -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/${{ inputs.check_id_macos_arm64 }} -d '{"name":"cp*-macosx_arm64","status":"completed","conclusion":"failure"}'
Loading

0 comments on commit bb47eab

Please sign in to comment.