moved actions from QEMU to GH Arm64 runners (#331) #267
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Linux dependencies | |
on: | |
push: | |
branches: [master] | |
paths: | |
- '.github/workflows/build-cache-deps.yml' | |
- 'libheif/linux/**' | |
- 'libheif/linux_*.py' | |
- 'setup.py' | |
schedule: | |
- cron: '59 23 * * 5' # Every Friday at 23:59 (GMT+2) | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
dependencies_linux_amd64: | |
strategy: | |
fail-fast: true | |
matrix: | |
cibw_buildlinux: [ manylinux, musllinux ] | |
name: AMD64 • ${{ matrix.cibw_buildlinux }} | |
runs-on: ubuntu-24.04 | |
env: | |
KEY_HEAD: x86_64-${{ matrix.cibw_buildlinux }} | |
BUILD_DIR: "/tmp/ph_build_stuff" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install cibuildwheel & twine | |
run: python3 -m pip install twine cibuildwheel==2.21.3 | |
- uses: actions/cache@v4 | |
with: | |
path: ${{ env.BUILD_DIR }} | |
key: ${{ env.KEY_HEAD }}-${{ env.KEY_C_BUILD }}-${{ env.KEY_LINUX_LIBS }} | |
env: | |
KEY_LINUX_LIBS: ${{ hashFiles('libheif/linux/**') }} | |
KEY_C_BUILD: ${{ hashFiles('libheif/linux_*.py') }}-${{ hashFiles('libheif/setup.py') }} | |
- name: Start test build | |
run: cibuildwheel | |
env: | |
CIBW_BUILD: ${{ format('cp39-{0}*', matrix.cibw_buildlinux) }} | |
CIBW_ARCHS: "x86_64" | |
CIBW_BEFORE_ALL_LINUX: | | |
python3 {package}/libheif/linux_build_libs.py | |
CIBW_ENVIRONMENT_LINUX: BUILD_DIR=/host${{ env.BUILD_DIR }} PH_FULL_ACTION=1 | |
CIBW_BUILD_VERBOSITY: 1 | |
- name: Checking built wheels | |
run: twine check wheelhouse/* | |
- name: Uploading wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: wheelhouse/*.whl | |
if-no-files-found: error | |
- name: Fix cache permissions | |
run: sudo chmod -R 777 ${{ env.BUILD_DIR }} | |
dependencies_linux_arm64: | |
strategy: | |
fail-fast: true | |
matrix: | |
cibw_buildlinux: [ manylinux, musllinux ] | |
name: ARM64 • ${{ matrix.cibw_buildlinux }} | |
runs-on: ubuntu-24.04-arm | |
env: | |
KEY_HEAD: aarch64-${{ matrix.cibw_buildlinux }} | |
BUILD_DIR: "/tmp/ph_build_stuff" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install cibuildwheel & twine | |
run: python3 -m pip install twine cibuildwheel==2.21.3 | |
- uses: actions/cache@v4 | |
with: | |
path: ${{ env.BUILD_DIR }} | |
key: ${{ env.KEY_HEAD }}-${{ env.KEY_C_BUILD }}-${{ env.KEY_LINUX_LIBS }} | |
env: | |
KEY_LINUX_LIBS: ${{ hashFiles('libheif/linux/**') }} | |
KEY_C_BUILD: ${{ hashFiles('libheif/linux_*.py') }}-${{ hashFiles('libheif/setup.py') }} | |
- name: Start test build | |
run: cibuildwheel | |
env: | |
CIBW_BUILD: ${{ format('cp39-{0}*', matrix.cibw_buildlinux) }} | |
CIBW_ARCHS: "aarch64" | |
CIBW_BEFORE_ALL_LINUX: | | |
python3 {package}/libheif/linux_build_libs.py | |
CIBW_ENVIRONMENT_LINUX: BUILD_DIR=/host${{ env.BUILD_DIR }} PH_FULL_ACTION=1 | |
CIBW_BUILD_VERBOSITY: 1 | |
- name: Checking built wheels | |
run: twine check wheelhouse/* | |
- name: Uploading wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: wheelhouse/*.whl | |
if-no-files-found: error | |
- name: Fix cache permissions | |
run: sudo chmod -R 777 ${{ env.BUILD_DIR }} | |
pi_heif_dependencies_linux_amd64: | |
strategy: | |
fail-fast: true | |
matrix: | |
cibw_buildlinux: [ manylinux, musllinux ] | |
name: Pi-Heif • AMD64 • ${{ matrix.cibw_buildlinux }} | |
runs-on: ubuntu-24.04 | |
env: | |
KEY_HEAD: Pi-Heif-x86_64-${{ matrix.cibw_buildlinux }} | |
BUILD_DIR: "/tmp/ph_build_stuff" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Transform to Pi-Heif | |
run: | | |
cp -r -v ./pi-heif/* . | |
python3 .github/transform_to-pi_heif.py | |
- name: Install cibuildwheel & twine | |
run: python3 -m pip install twine cibuildwheel==2.21.3 | |
- uses: actions/cache@v4 | |
with: | |
path: ${{ env.BUILD_DIR }} | |
key: ${{ env.KEY_HEAD }}-${{ env.KEY_C_BUILD }}-${{ env.KEY_LINUX_LIBS }} | |
env: | |
KEY_LINUX_LIBS: ${{ hashFiles('libheif/linux/**') }} | |
KEY_C_BUILD: ${{ hashFiles('libheif/linux_*.py') }}-${{ hashFiles('libheif/setup.py') }} | |
- name: Start test build | |
run: cibuildwheel | |
env: | |
CIBW_BUILD: ${{ format('cp39-{0}*', matrix.cibw_buildlinux) }} | |
CIBW_ARCHS: "x86_64" | |
CIBW_BEFORE_ALL_LINUX: | | |
${{ env.INSTALL_OS_PACKAGES }} | |
python3 {package}/libheif/linux_build_libs.py | |
CIBW_ENVIRONMENT_LINUX: BUILD_DIR=/host${{ env.BUILD_DIR }} PH_LIGHT_ACTION=1 | |
CIBW_BUILD_VERBOSITY: 1 | |
- name: Checking built wheels | |
run: twine check wheelhouse/* | |
- name: Uploading wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: wheelhouse/*.whl | |
if-no-files-found: error | |
- name: Fix cache permissions | |
run: sudo chmod -R 777 ${{ env.BUILD_DIR }} | |
pi_heif_dependencies_linux_arm64: | |
strategy: | |
fail-fast: true | |
matrix: | |
cibw_buildlinux: [ manylinux, musllinux ] | |
name: Pi-Heif • ARM64 • ${{ matrix.cibw_buildlinux }} | |
runs-on: ubuntu-24.04-arm | |
env: | |
KEY_HEAD: Pi-Heif-aarch64-${{ matrix.cibw_buildlinux }} | |
BUILD_DIR: "/tmp/ph_build_stuff" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Transform to Pi-Heif | |
run: | | |
cp -r -v ./pi-heif/* . | |
python3 .github/transform_to-pi_heif.py | |
- name: Install cibuildwheel & twine | |
run: python3 -m pip install twine cibuildwheel==2.21.3 | |
- uses: actions/cache@v4 | |
with: | |
path: ${{ env.BUILD_DIR }} | |
key: ${{ env.KEY_HEAD }}-${{ env.KEY_C_BUILD }}-${{ env.KEY_LINUX_LIBS }} | |
env: | |
KEY_LINUX_LIBS: ${{ hashFiles('libheif/linux/**') }} | |
KEY_C_BUILD: ${{ hashFiles('libheif/linux_*.py') }}-${{ hashFiles('libheif/setup.py') }} | |
- name: Start test build | |
run: cibuildwheel | |
env: | |
CIBW_BUILD: ${{ format('cp39-{0}*', matrix.cibw_buildlinux) }} | |
CIBW_ARCHS: "aarch64" | |
CIBW_BEFORE_ALL_LINUX: | | |
${{ env.INSTALL_OS_PACKAGES }} | |
python3 {package}/libheif/linux_build_libs.py | |
CIBW_ENVIRONMENT_LINUX: BUILD_DIR=/host${{ env.BUILD_DIR }} PH_LIGHT_ACTION=1 | |
CIBW_BUILD_VERBOSITY: 1 | |
- name: Checking built wheels | |
run: twine check wheelhouse/* | |
- name: Uploading wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: wheelhouse/*.whl | |
if-no-files-found: error | |
- name: Fix cache permissions | |
run: sudo chmod -R 777 ${{ env.BUILD_DIR }} |