-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI & CD: macos and windows install from src
- Loading branch information
Showing
2 changed files
with
111 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Build from source(macOS) | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: [master] | ||
types: [opened, reopened, edited] | ||
paths: | ||
- 'libheif/macos/**' | ||
- 'libheif/build.py' | ||
- 'libheif/heif.h' | ||
- 'setup.*' | ||
- 'pyproject.toml' | ||
push: | ||
branches: [master] | ||
paths: | ||
- 'libheif/macos/**' | ||
- 'libheif/build.py' | ||
- 'libheif/heif.h' | ||
- 'setup.*' | ||
- 'pyproject.toml' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
macos_11: | ||
name: macOS:11-x86_64 | ||
runs-on: macos-11 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install brew | ||
run: | | ||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | ||
brew install --formula ./libheif/macos/libheif.rb | ||
- name: Installing Pillow-Heif | ||
run: python3 -m pip -v install ".[dev]" | ||
|
||
- name: Perform tests | ||
run: python3 -m pytest -s |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Build from source(Windows) | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: [master] | ||
types: [opened, reopened, edited] | ||
paths: | ||
- 'libheif/windows/**' | ||
- 'libheif/build.py' | ||
- 'libheif/heif.h' | ||
- 'setup.*' | ||
- 'pyproject.toml' | ||
push: | ||
branches: [master] | ||
paths: | ||
- 'libheif/windows/**' | ||
- 'libheif/build.py' | ||
- 'libheif/heif.h' | ||
- 'setup.*' | ||
- 'pyproject.toml' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
windows_2019: | ||
name: Windows:2019-x86_64 | ||
runs-on: windows-2019 | ||
env: | ||
VCPKG_PREFIX: "C:/temp/msys64/mingw64" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: msys2/setup-msys2@v2 | ||
with: | ||
location: C:/temp | ||
update: true | ||
install: >- | ||
patch | ||
mingw-w64-x86_64-binutils | ||
- name: Build libheif and dependencies | ||
shell: msys2 {0} | ||
run: | | ||
cd libheif/windows/mingw-w64-libheif | ||
makepkg-mingw --syncdeps --noconfirm -f | ||
pacman -U mingw-w64-x86_64-libheif-1.12.0-9-any.pkg.tar.zst --noconfirm | ||
- name: Installing Pillow-Heif | ||
run: python -m pip -v install ".[dev]" | ||
|
||
- name: Copy DLLs from MSYS2 | ||
run: | | ||
$site_packages=(python -c 'import sysconfig; print(sysconfig.get_paths()[\"platlib\"])') | ||
cp ${{ env.VCPKG_PREFIX }}/bin/libheif.dll $site_packages/ | ||
cp ${{ env.VCPKG_PREFIX }}/bin/libde265-0.dll $site_packages/ | ||
cp ${{ env.VCPKG_PREFIX }}/bin/libx265.dll $site_packages/ | ||
cp ${{ env.VCPKG_PREFIX }}/bin/libaom.dll $site_packages/ | ||
cp ${{ env.VCPKG_PREFIX }}/bin/libwinpthread-1.dll $site_packages/ | ||
cp ${{ env.VCPKG_PREFIX }}/bin/libgcc_s_seh-1.dll $site_packages/ | ||
cp ${{ env.VCPKG_PREFIX }}/bin/libstdc++-6.dll $site_packages/ | ||
- name: Perform tests | ||
run: python -m pytest -s |