Skip to content

Commit eb19366

Browse files
authored
CirrusCI tests -> GitHub (#221)
Signed-off-by: Alexander Piskun <[email protected]>
1 parent e928d33 commit eb19366

File tree

3 files changed

+93
-58
lines changed

3 files changed

+93
-58
lines changed

.github/workflows/analysis-coverage.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,42 @@ jobs:
162162
fail_ci_if_error: true
163163
verbose: true
164164

165+
coverage-macos-arm:
166+
runs-on: macos-14
167+
name: Coverage(macOS-14) • 🐍3.11
168+
169+
steps:
170+
- uses: actions/checkout@v4
171+
- uses: actions/setup-python@v5
172+
with:
173+
python-version: '3.11'
174+
175+
- name: Install from source
176+
run: |
177+
brew install --formula ./libheif/macos/libheif.rb
178+
python3 -m pip -v install ".[dev]"
179+
180+
- name: LibHeif info
181+
run: python3 -c "import pillow_heif; print(pillow_heif.libheif_info())"
182+
183+
- name: Generate coverage report
184+
run: coverage run -m pytest && coverage xml && coverage html
185+
186+
- name: HTML coverage to artifacts
187+
uses: actions/upload-artifact@v3
188+
with:
189+
name: coverage_macos_arm
190+
path: ./htmlcov
191+
if-no-files-found: error
192+
193+
- name: Upload report to Codecov
194+
uses: codecov/codecov-action@v3
195+
with:
196+
token: ${{ secrets.CODECOV_TOKEN }}
197+
file: ./coverage.xml
198+
fail_ci_if_error: true
199+
verbose: true
200+
165201
coverage-windows:
166202
runs-on: windows-2022
167203
name: Coverage(Windows) • 🐍3.9

.github/workflows/test-src-build-macos.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,32 @@ jobs:
5252
- name: Perform tests
5353
run: python3 -m pytest
5454

55+
full_macos_14:
56+
name: macOS:14-Arm
57+
runs-on: macos-14
58+
env:
59+
PH_FULL_ACTION: 1
60+
EXP_PH_LIBHEIF_VERSION: ""
61+
62+
steps:
63+
- uses: actions/checkout@v4
64+
- uses: actions/setup-python@v5
65+
with:
66+
python-version: '3.12'
67+
- name: Install libheif from formula
68+
run: |
69+
brew uninstall --force --ignore-dependencies imagemagick libheif
70+
brew install --formula ./libheif/macos/libheif.rb
71+
72+
- name: Installing Pillow-Heif
73+
run: python3 -m pip -v install ".[dev]"
74+
75+
- name: LibHeif info
76+
run: python3 -c "import pillow_heif; print(pillow_heif.libheif_info())"
77+
78+
- name: Perform tests
79+
run: python3 -m pytest
80+
5581
lite_macos_12:
5682
name: macOS:12-x86_64(Pi-Heif)
5783
runs-on: macos-12
@@ -80,3 +106,34 @@ jobs:
80106

81107
- name: Perform tests
82108
run: python3 -m pytest
109+
110+
lite_macos_14:
111+
name: macOS:14-Arm(Pi-Heif)
112+
runs-on: macos-14
113+
env:
114+
PH_LIGHT_ACTION: 1
115+
EXP_PH_LIBHEIF_VERSION: ""
116+
117+
steps:
118+
- uses: actions/checkout@v4
119+
- uses: actions/setup-python@v5
120+
with:
121+
python-version: '3.12'
122+
- name: Transform to Pi-Heif
123+
run: |
124+
cp -r -v ./pi-heif/* .
125+
python3 .github/transform_to-pi_heif.py
126+
127+
- name: Install libheif from formula
128+
run: |
129+
brew uninstall --force --ignore-dependencies imagemagick libheif x265 aom
130+
brew install --formula ./libheif/macos/libheif.rb
131+
132+
- name: Installing Pi-Heif
133+
run: python3 -m pip -v install ".[tests]"
134+
135+
- name: LibHeif info
136+
run: python3 -c "import pi_heif; print(pi_heif.libheif_info())"
137+
138+
- name: Perform tests
139+
run: python3 -m pytest

ci/cirrus_general_ci.yml

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,3 @@
1-
test_src_build_full_macos_arm_task:
2-
only_if: "changesInclude(
3-
'ci/cirrus_general_ci.yml',
4-
'libheif/macos/**',
5-
'setup.*',
6-
'pyproject.toml')"
7-
8-
name: From source(macOS) / macOS:12-arm64
9-
macos_instance:
10-
image: ghcr.io/cirruslabs/macos-monterey-xcode
11-
12-
env:
13-
PH_FULL_ACTION: 1
14-
EXP_PH_LIBHEIF_VERSION: ""
15-
16-
install_libheif_script:
17-
- brew update || true
18-
- brew install libheif
19-
- brew uninstall --force --ignore-dependencies imagemagick libheif
20-
- brew install --formula ./libheif/macos/libheif.rb
21-
install_pillow_heif_script:
22-
- python3 -m pip -v install ".[dev]"
23-
libheif_info_script:
24-
- python3 -c "import pillow_heif; print(pillow_heif.libheif_info())"
25-
perform_tests_script:
26-
- python3 -m pytest
27-
28-
test_src_build_lite_macos_arm_task:
29-
only_if: "changesInclude(
30-
'ci/cirrus_general_ci.yml',
31-
'pi-heif/libheif/macos/**',
32-
'pi-heif/setup.cfg',
33-
'setup.py',
34-
'pyproject.toml')"
35-
36-
name: From source(macOS) / macOS:12-arm64(Pi-Heif)
37-
macos_instance:
38-
image: ghcr.io/cirruslabs/macos-monterey-xcode
39-
40-
env:
41-
PH_LIGHT_ACTION: 1
42-
EXP_PH_LIBHEIF_VERSION: ""
43-
44-
transform_to_pi_heif_script:
45-
- cp -r -v ./pi-heif/* .
46-
- python3 .github/transform_to-pi_heif.py
47-
install_libheif_script:
48-
- brew update || true
49-
- brew install libheif
50-
- brew uninstall --force --ignore-dependencies imagemagick libheif x265 aom
51-
- brew install --formula ./libheif/macos/libheif.rb
52-
install_pi_heif_script:
53-
- python3 -m pip -v install ".[tests]"
54-
libheif_info_script:
55-
- python3 -c "import pi_heif; print(pi_heif.libheif_info())"
56-
perform_tests_script:
57-
- python3 -m pytest
58-
591
test_src_build_full_freebsd_task:
602
only_if: "changesInclude(
613
'ci/cirrus_general_ci.yml',

0 commit comments

Comments
 (0)