Skip to content

Commit

Permalink
moved wheels build from Cirrus to GH
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Piskun <[email protected]>
  • Loading branch information
bigcat88 committed Oct 18, 2024
1 parent af4cf6f commit 912f805
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 98 deletions.
6 changes: 1 addition & 5 deletions .cirrus.star
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,5 @@ def main(ctx):
if "[skip cirrus]" in dct["message"] or "[skip ci]" in dct["message"]:
return []

# this configuration starts building wheels for release.
if "[publish]" in dct["message"]:
return fs.read("ci/cirrus_wheels.yml")

# this configuration(default) runs macosx_arm64 builds from source.
# this configuration(default) runs FreeBSD build from source.
return fs.read("ci/cirrus_general_ci.yml")
55 changes: 33 additions & 22 deletions .github/workflows/wheels-pi_heif.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,40 @@ on:
jobs:
wheels_macos_arm:
name: macosx • aarch64
runs-on: ubuntu-20.04
runs-on: macos-14

steps:
- name: Waiting for Cirrus CI
uses: lewagon/[email protected]
with:
ref: ${{ github.ref }}
check-name: 'macosx • aarch64 • Pi-Heif • Cirrus'
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 60
allowed-conclusions: success

- name: Download artifacts
run: |
curl -L https://api.cirrus-ci.com/v1/artifact/github/${{ github.repository }}/wheel_pi_heif_macos_arm/wheels.zip -o wheels.zip
unzip wheels.zip
- name: Upload built wheels
uses: actions/upload-artifact@v3
with:
name: wheels_pi_heif
path: wheelhouse/*.whl
if-no-files-found: error
- uses: actions/checkout@v4
- name: Transform to Pi-Heif
run: |
cp -r -v ./pi-heif/* .
python3 .github/transform_to-pi_heif.py
- name: Install libheif from formula
run: |
brew uninstall --force --ignore-dependencies imagemagick libheif x265 aom
brew install --formula ./libheif/macos/libheif.rb
- name: Run cibuildwheel
run: |
python3 -m pip install cibuildwheel==2.21.3
python3 -m cibuildwheel
env:
CIBW_ARCHS: "arm64"
CIBW_ENVIRONMENT_MACOS: PH_LIGHT_ACTION=1
MACOSX_DEPLOYMENT_TARGET: "14.0"

- name: Check built wheels
run: |
python3 -m pip install twine
python3 -m twine check wheelhouse/*
- name: Upload built wheels
uses: actions/upload-artifact@v3
with:
name: wheels_pi_heif
path: wheelhouse/*.whl
if-no-files-found: error

wheels_windows:
name: windows • x86_64
Expand Down Expand Up @@ -111,7 +122,7 @@ jobs:
CIBW_ENVIRONMENT_MACOS: PH_LIGHT_ACTION=1 TEST_DECODE_THREADS=0
MACOSX_DEPLOYMENT_TARGET: "12.0"

- name: Checking built wheels
- name: Check built wheels
run: |
python3 -m pip install twine
python3 -m twine check wheelhouse/*
Expand Down
49 changes: 28 additions & 21 deletions .github/workflows/wheels-pillow_heif.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,36 @@ on:
jobs:
wheels_macos_arm:
name: macosx • aarch64
runs-on: ubuntu-20.04
runs-on: macos-14

steps:
- name: Waiting for Cirrus CI
uses: lewagon/[email protected]
with:
ref: ${{ github.ref }}
check-name: 'macosx • aarch64 • Cirrus'
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 60
allowed-conclusions: success

- name: Download artifacts
run: |
curl -L https://api.cirrus-ci.com/v1/artifact/github/${{ github.repository }}/wheel_macos_arm/wheels.zip -o wheels.zip
unzip wheels.zip
- name: Upload built wheels
uses: actions/upload-artifact@v3
with:
name: wheels_pillow_heif
path: wheelhouse/*.whl
if-no-files-found: error
- uses: actions/checkout@v4

- name: Install libheif from formula
run: |
brew uninstall --force --ignore-dependencies imagemagick libheif
brew install --formula ./libheif/macos/libheif.rb
- name: Run cibuildwheel
run: |
python3 -m pip install cibuildwheel==2.21.3
python3 -m cibuildwheel
env:
CIBW_ARCHS: "arm64"
CIBW_ENVIRONMENT_MACOS: PH_FULL_ACTION=1
MACOSX_DEPLOYMENT_TARGET: "14.0"

- name: Check built wheels
run: |
python3 -m pip install twine
python3 -m twine check wheelhouse/*
- name: Upload built wheels
uses: actions/upload-artifact@v3
with:
name: wheels_pillow_heif
path: wheelhouse/*.whl
if-no-files-found: error

wheels_windows:
name: windows • x86_64
Expand Down
50 changes: 0 additions & 50 deletions ci/cirrus_wheels.yml

This file was deleted.

0 comments on commit 912f805

Please sign in to comment.