Skip to content

Commit 912f805

Browse files
committed
moved wheels build from Cirrus to GH
Signed-off-by: Alexander Piskun <[email protected]>
1 parent af4cf6f commit 912f805

File tree

4 files changed

+62
-98
lines changed

4 files changed

+62
-98
lines changed

.cirrus.star

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,5 @@ def main(ctx):
1919
if "[skip cirrus]" in dct["message"] or "[skip ci]" in dct["message"]:
2020
return []
2121

22-
# this configuration starts building wheels for release.
23-
if "[publish]" in dct["message"]:
24-
return fs.read("ci/cirrus_wheels.yml")
25-
26-
# this configuration(default) runs macosx_arm64 builds from source.
22+
# this configuration(default) runs FreeBSD build from source.
2723
return fs.read("ci/cirrus_general_ci.yml")

.github/workflows/wheels-pi_heif.yml

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,40 @@ on:
77
jobs:
88
wheels_macos_arm:
99
name: macosx • aarch64
10-
runs-on: ubuntu-20.04
10+
runs-on: macos-14
1111

1212
steps:
13-
- name: Waiting for Cirrus CI
14-
uses: lewagon/[email protected]
15-
with:
16-
ref: ${{ github.ref }}
17-
check-name: 'macosx • aarch64 • Pi-Heif • Cirrus'
18-
repo-token: ${{ secrets.GITHUB_TOKEN }}
19-
wait-interval: 60
20-
allowed-conclusions: success
21-
22-
- name: Download artifacts
23-
run: |
24-
curl -L https://api.cirrus-ci.com/v1/artifact/github/${{ github.repository }}/wheel_pi_heif_macos_arm/wheels.zip -o wheels.zip
25-
unzip wheels.zip
26-
27-
- name: Upload built wheels
28-
uses: actions/upload-artifact@v3
29-
with:
30-
name: wheels_pi_heif
31-
path: wheelhouse/*.whl
32-
if-no-files-found: error
13+
- uses: actions/checkout@v4
14+
- name: Transform to Pi-Heif
15+
run: |
16+
cp -r -v ./pi-heif/* .
17+
python3 .github/transform_to-pi_heif.py
18+
19+
- name: Install libheif from formula
20+
run: |
21+
brew uninstall --force --ignore-dependencies imagemagick libheif x265 aom
22+
brew install --formula ./libheif/macos/libheif.rb
23+
24+
- name: Run cibuildwheel
25+
run: |
26+
python3 -m pip install cibuildwheel==2.21.3
27+
python3 -m cibuildwheel
28+
env:
29+
CIBW_ARCHS: "arm64"
30+
CIBW_ENVIRONMENT_MACOS: PH_LIGHT_ACTION=1
31+
MACOSX_DEPLOYMENT_TARGET: "14.0"
32+
33+
- name: Check built wheels
34+
run: |
35+
python3 -m pip install twine
36+
python3 -m twine check wheelhouse/*
37+
38+
- name: Upload built wheels
39+
uses: actions/upload-artifact@v3
40+
with:
41+
name: wheels_pi_heif
42+
path: wheelhouse/*.whl
43+
if-no-files-found: error
3344

3445
wheels_windows:
3546
name: windows • x86_64
@@ -111,7 +122,7 @@ jobs:
111122
CIBW_ENVIRONMENT_MACOS: PH_LIGHT_ACTION=1 TEST_DECODE_THREADS=0
112123
MACOSX_DEPLOYMENT_TARGET: "12.0"
113124

114-
- name: Checking built wheels
125+
- name: Check built wheels
115126
run: |
116127
python3 -m pip install twine
117128
python3 -m twine check wheelhouse/*

.github/workflows/wheels-pillow_heif.yml

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,36 @@ on:
66
jobs:
77
wheels_macos_arm:
88
name: macosx • aarch64
9-
runs-on: ubuntu-20.04
9+
runs-on: macos-14
1010

1111
steps:
12-
- name: Waiting for Cirrus CI
13-
uses: lewagon/[email protected]
14-
with:
15-
ref: ${{ github.ref }}
16-
check-name: 'macosx • aarch64 • Cirrus'
17-
repo-token: ${{ secrets.GITHUB_TOKEN }}
18-
wait-interval: 60
19-
allowed-conclusions: success
20-
21-
- name: Download artifacts
22-
run: |
23-
curl -L https://api.cirrus-ci.com/v1/artifact/github/${{ github.repository }}/wheel_macos_arm/wheels.zip -o wheels.zip
24-
unzip wheels.zip
25-
26-
- name: Upload built wheels
27-
uses: actions/upload-artifact@v3
28-
with:
29-
name: wheels_pillow_heif
30-
path: wheelhouse/*.whl
31-
if-no-files-found: error
12+
- uses: actions/checkout@v4
13+
14+
- name: Install libheif from formula
15+
run: |
16+
brew uninstall --force --ignore-dependencies imagemagick libheif
17+
brew install --formula ./libheif/macos/libheif.rb
18+
19+
- name: Run cibuildwheel
20+
run: |
21+
python3 -m pip install cibuildwheel==2.21.3
22+
python3 -m cibuildwheel
23+
env:
24+
CIBW_ARCHS: "arm64"
25+
CIBW_ENVIRONMENT_MACOS: PH_FULL_ACTION=1
26+
MACOSX_DEPLOYMENT_TARGET: "14.0"
27+
28+
- name: Check built wheels
29+
run: |
30+
python3 -m pip install twine
31+
python3 -m twine check wheelhouse/*
32+
33+
- name: Upload built wheels
34+
uses: actions/upload-artifact@v3
35+
with:
36+
name: wheels_pillow_heif
37+
path: wheelhouse/*.whl
38+
if-no-files-found: error
3239

3340
wheels_windows:
3441
name: windows • x86_64

ci/cirrus_wheels.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)