From eb19366548accefc11197a984f23b86a2901a3da Mon Sep 17 00:00:00 2001 From: Alexander Piskun <13381981+bigcat88@users.noreply.github.com> Date: Wed, 27 Mar 2024 11:44:42 +0300 Subject: [PATCH] CirrusCI tests -> GitHub (#221) Signed-off-by: Alexander Piskun --- .github/workflows/analysis-coverage.yml | 36 ++++++++++++++ .github/workflows/test-src-build-macos.yml | 57 +++++++++++++++++++++ ci/cirrus_general_ci.yml | 58 ---------------------- 3 files changed, 93 insertions(+), 58 deletions(-) diff --git a/.github/workflows/analysis-coverage.yml b/.github/workflows/analysis-coverage.yml index 890fdb3f..f279904c 100644 --- a/.github/workflows/analysis-coverage.yml +++ b/.github/workflows/analysis-coverage.yml @@ -162,6 +162,42 @@ jobs: fail_ci_if_error: true verbose: true + coverage-macos-arm: + runs-on: macos-14 + name: Coverage(macOS-14) • 🐍3.11 + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install from source + run: | + brew install --formula ./libheif/macos/libheif.rb + python3 -m pip -v install ".[dev]" + + - name: LibHeif info + run: python3 -c "import pillow_heif; print(pillow_heif.libheif_info())" + + - name: Generate coverage report + run: coverage run -m pytest && coverage xml && coverage html + + - name: HTML coverage to artifacts + uses: actions/upload-artifact@v3 + with: + name: coverage_macos_arm + path: ./htmlcov + if-no-files-found: error + + - name: Upload report to Codecov + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + file: ./coverage.xml + fail_ci_if_error: true + verbose: true + coverage-windows: runs-on: windows-2022 name: Coverage(Windows) • 🐍3.9 diff --git a/.github/workflows/test-src-build-macos.yml b/.github/workflows/test-src-build-macos.yml index d4bdac24..a68150bc 100644 --- a/.github/workflows/test-src-build-macos.yml +++ b/.github/workflows/test-src-build-macos.yml @@ -52,6 +52,32 @@ jobs: - name: Perform tests run: python3 -m pytest + full_macos_14: + name: macOS:14-Arm + runs-on: macos-14 + env: + PH_FULL_ACTION: 1 + EXP_PH_LIBHEIF_VERSION: "" + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + - name: Install libheif from formula + run: | + brew uninstall --force --ignore-dependencies imagemagick libheif + brew install --formula ./libheif/macos/libheif.rb + + - name: Installing Pillow-Heif + run: python3 -m pip -v install ".[dev]" + + - name: LibHeif info + run: python3 -c "import pillow_heif; print(pillow_heif.libheif_info())" + + - name: Perform tests + run: python3 -m pytest + lite_macos_12: name: macOS:12-x86_64(Pi-Heif) runs-on: macos-12 @@ -80,3 +106,34 @@ jobs: - name: Perform tests run: python3 -m pytest + + lite_macos_14: + name: macOS:14-Arm(Pi-Heif) + runs-on: macos-14 + env: + PH_LIGHT_ACTION: 1 + EXP_PH_LIBHEIF_VERSION: "" + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + - 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: Installing Pi-Heif + run: python3 -m pip -v install ".[tests]" + + - name: LibHeif info + run: python3 -c "import pi_heif; print(pi_heif.libheif_info())" + + - name: Perform tests + run: python3 -m pytest diff --git a/ci/cirrus_general_ci.yml b/ci/cirrus_general_ci.yml index 8c95b35c..d5be62e2 100644 --- a/ci/cirrus_general_ci.yml +++ b/ci/cirrus_general_ci.yml @@ -1,61 +1,3 @@ -test_src_build_full_macos_arm_task: - only_if: "changesInclude( - 'ci/cirrus_general_ci.yml', - 'libheif/macos/**', - 'setup.*', - 'pyproject.toml')" - - name: From source(macOS) / macOS:12-arm64 - macos_instance: - image: ghcr.io/cirruslabs/macos-monterey-xcode - - env: - PH_FULL_ACTION: 1 - EXP_PH_LIBHEIF_VERSION: "" - - install_libheif_script: - - brew update || true - - brew install libheif - - brew uninstall --force --ignore-dependencies imagemagick libheif - - brew install --formula ./libheif/macos/libheif.rb - install_pillow_heif_script: - - python3 -m pip -v install ".[dev]" - libheif_info_script: - - python3 -c "import pillow_heif; print(pillow_heif.libheif_info())" - perform_tests_script: - - python3 -m pytest - -test_src_build_lite_macos_arm_task: - only_if: "changesInclude( - 'ci/cirrus_general_ci.yml', - 'pi-heif/libheif/macos/**', - 'pi-heif/setup.cfg', - 'setup.py', - 'pyproject.toml')" - - name: From source(macOS) / macOS:12-arm64(Pi-Heif) - macos_instance: - image: ghcr.io/cirruslabs/macos-monterey-xcode - - env: - PH_LIGHT_ACTION: 1 - EXP_PH_LIBHEIF_VERSION: "" - - transform_to_pi_heif_script: - - cp -r -v ./pi-heif/* . - - python3 .github/transform_to-pi_heif.py - install_libheif_script: - - brew update || true - - brew install libheif - - brew uninstall --force --ignore-dependencies imagemagick libheif x265 aom - - brew install --formula ./libheif/macos/libheif.rb - install_pi_heif_script: - - python3 -m pip -v install ".[tests]" - libheif_info_script: - - python3 -c "import pi_heif; print(pi_heif.libheif_info())" - perform_tests_script: - - python3 -m pytest - test_src_build_full_freebsd_task: only_if: "changesInclude( 'ci/cirrus_general_ci.yml',