Skip to content

Commit

Permalink
CirrusCI tests -> GitHub (#221)
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
  • Loading branch information
bigcat88 committed Mar 27, 2024
1 parent e928d33 commit eb19366
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 58 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/analysis-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/test-src-build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
58 changes: 0 additions & 58 deletions ci/cirrus_general_ci.yml
Original file line number Diff line number Diff line change
@@ -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',
Expand Down

0 comments on commit eb19366

Please sign in to comment.