diff --git a/.cirrus.star b/.cirrus.star index 35ee4396..2a1412dd 100644 --- a/.cirrus.star +++ b/.cirrus.star @@ -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") diff --git a/.github/workflows/wheels-pi_heif.yml b/.github/workflows/wheels-pi_heif.yml index 62f454aa..4316b0b3 100644 --- a/.github/workflows/wheels-pi_heif.yml +++ b/.github/workflows/wheels-pi_heif.yml @@ -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/wait-on-check-action@v1.3.4 - 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 @@ -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/* diff --git a/.github/workflows/wheels-pillow_heif.yml b/.github/workflows/wheels-pillow_heif.yml index efa43009..4d95bdb1 100644 --- a/.github/workflows/wheels-pillow_heif.yml +++ b/.github/workflows/wheels-pillow_heif.yml @@ -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/wait-on-check-action@v1.3.4 - 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 diff --git a/ci/cirrus_wheels.yml b/ci/cirrus_wheels.yml deleted file mode 100644 index a9cec9b5..00000000 --- a/ci/cirrus_wheels.yml +++ /dev/null @@ -1,50 +0,0 @@ -wheel_macos_arm_task: - only_if: $CIRRUS_BRANCH == 'master' - name: macosx • aarch64 • Cirrus - alias: wheel_macos_arm - macos_instance: - image: ghcr.io/cirruslabs/macos-monterey-xcode - - env: - PATH: /opt/homebrew/opt/python@3.10/bin:$PATH - CIBW_ARCHS: arm64 - CIBW_ENVIRONMENT: 'MACOSX_DEPLOYMENT_TARGET=14.0 PH_FULL_ACTION=1' - - install_pre_requirements_script: - - brew update || true - - brew install libheif - - brew install python@3.10 - - ln -s python3 /opt/homebrew/opt/python@3.10/bin/python - install_cibuildwheel_script: - - python3 -m pip install --break-system-packages cibuildwheel==2.21.3 - run_cibuildwheel_script: - - python3 -m cibuildwheel - wheels_artifacts: - path: "wheelhouse/*" - -wheel_pi_heif_macos_arm_task: - only_if: $CIRRUS_BRANCH == 'master' - name: macosx • aarch64 • Pi-Heif • Cirrus - alias: wheel_pi_heif_macos_arm - macos_instance: - image: ghcr.io/cirruslabs/macos-monterey-xcode - - env: - PATH: /opt/homebrew/opt/python@3.10/bin:$PATH - CIBW_ARCHS: arm64 - CIBW_ENVIRONMENT: 'MACOSX_DEPLOYMENT_TARGET=14.0 PH_LIGHT_ACTION=1' - - install_pre_requirements_script: - - brew update || true - - brew install libheif - - brew install python@3.10 - - ln -s python3 /opt/homebrew/opt/python@3.10/bin/python - install_cibuildwheel_script: - - python3 -m pip install --break-system-packages cibuildwheel==2.21.3 - transform_to_pi_heif_script: - - cp -r -v ./pi-heif/* . - - python3 .github/transform_to-pi_heif.py - run_cibuildwheel_script: - - python3 -m cibuildwheel - wheels_artifacts: - path: "wheelhouse/*"