From be47d1ba1044d99719690aeb7cb5f3a109f655b2 Mon Sep 17 00:00:00 2001 From: Alexander Piskun Date: Sun, 4 Feb 2024 11:43:46 +0300 Subject: [PATCH] dev, windows (5) --- .github/workflows/test-src-build-windows.yml | 52 ++++++++++---------- third-party/x265/macos/x265.rb | 15 ++++++ 2 files changed, 41 insertions(+), 26 deletions(-) diff --git a/.github/workflows/test-src-build-windows.yml b/.github/workflows/test-src-build-windows.yml index 2a5b64d..7571cf3 100644 --- a/.github/workflows/test-src-build-windows.yml +++ b/.github/workflows/test-src-build-windows.yml @@ -27,47 +27,47 @@ jobs: windows_2019: name: Windows:2019-x86_64 runs-on: windows-2019 + defaults: + run: + shell: bash.exe --login -eo pipefail "{0}" env: - MSYS2_PREFIX: "C:/temp/msys64/mingw64" + MSYSTEM: MINGW64 + CHERE_INVOKING: 1 + MSYS2_PREFIX: "C:/msys64/mingw64" + + timeout-minutes: 60 steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: '3.11' + - name: Set up shellBuild + run: echo "C:\msys64\usr\bin\" >> $env:GITHUB_PATH + shell: pwsh - - uses: msys2/setup-msys2@v2 - with: - location: C:/temp - install: >- + - name: Install base packages + run: | + pacman -S --noconfirm \ + mingw-w64-x86_64-gcc \ + mingw-w64-x86_64-python3-pip \ + mingw-w64-x86_64-python3-setuptools \ mingw-w64-x86_64-binutils - - name: Build x265 and dependencies - shell: msys2 {0} - run: | - cd third-party/x265/windows/mingw-w64-x265 - makepkg-mingw --syncdeps --noconfirm -f - pacman -U mingw-w64-x86_64-x265-*-any.pkg.tar.zst --noconfirm +# - name: Build x265 and dependencies +# run: | +# cd third-party/x265/windows/mingw-w64-x265 +# makepkg-mingw --syncdeps --noconfirm -f +# pacman -U mingw-w64-x86_64-x265-*-any.pkg.tar.zst --noconfirm - - name: Installing Pillow-Heif-x265 - run: python -m pip -v install ".[tests]" + - name: Build x265 and dependencies + run: pacman -S --noconfirm mingw-w64-x86_64-x265 - name: Build libheif and dependencies - shell: msys2 {0} run: | cd tests makepkg-mingw --syncdeps --noconfirm -f pacman -U mingw-w64-x86_64-libheif-*-any.pkg.tar.zst --noconfirm - - name: Copy DLLs from MSYS2 - run: | - $site_packages=(python -c 'import sysconfig; print(sysconfig.get_paths()["platlib"])') - cp ${{ env.MSYS2_PREFIX }}/bin/libheif.dll $site_packages/ - cp ${{ env.MSYS2_PREFIX }}/bin/libde265-0.dll $site_packages/ - cp ${{ env.MSYS2_PREFIX }}/bin/libx265.dll $site_packages/ - cp ${{ env.MSYS2_PREFIX }}/bin/libwinpthread-1.dll $site_packages/ - cp ${{ env.MSYS2_PREFIX }}/bin/libgcc_s_seh-1.dll $site_packages/ - cp ${{ env.MSYS2_PREFIX }}/bin/libstdc++-6.dll $site_packages/ + - name: Installing Pillow-Heif-x265 + run: SETUPTOOLS_USE_DISTUTILS=stdlib python -m pip -v install ".[tests]" - name: Install Pillow-Heif run: python3 -m pip install git+https://github.com/bigcat88/pillow_heif.git diff --git a/third-party/x265/macos/x265.rb b/third-party/x265/macos/x265.rb index 9ca802a..59a6456 100644 --- a/third-party/x265/macos/x265.rb +++ b/third-party/x265/macos/x265.rb @@ -8,6 +8,21 @@ class X265 < Formula license "GPL-2.0-only" head "https://bitbucket.org/multicoreware/x265_git.git", branch: "master" + bottle do + rebuild 1 + sha256 cellar: :any, arm64_sonoma: "d9979f7990c114bc1283c75b7e3b186fd0a979af6206bf2675998d8189bdd7e5" + sha256 cellar: :any, arm64_ventura: "fc0bf01af954762a85e8b808d5b03d28b9e36e8e71035783e39bb9dc0307abea" + sha256 cellar: :any, arm64_monterey: "e60559191a9aba607e512ad33ac9f66688b12837df7e6a3cf57ceae26968235b" + sha256 cellar: :any, arm64_big_sur: "adc617eed2e065af669994fb5b538195fd46db4ac7b13c7ca2490dc8abaf6466" + sha256 cellar: :any, sonoma: "26943ec04286b0669309ea55b9eff3db0bb581761be7b21170b42f8b52ec5045" + sha256 cellar: :any, ventura: "42bac1c3760905fc0f6c8ee2af2b97c5ef371d6135f6822357afe91f4014a2dd" + sha256 cellar: :any, monterey: "be446f5c7cb4872205f260b8821fc7ebd5bd7c4b8837888c98c08e051dff2e3f" + sha256 cellar: :any, big_sur: "55bb46a5dc1924e59b7fa7bc800a21c0cf21355e48cb38b941d8e786427c70a0" + sha256 cellar: :any, catalina: "5e5bc106e1cf971a176dd5b37a61d28769e353f81102c011b4230cc8732eca7a" + sha256 cellar: :any, mojave: "c61ebdf9dcd4aedf5da2a7eb2b3a5154fd355c105a19a0471d43a3aa67f3cb88" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c80f18988caea25e95ca87dd648f5ff8b0856e24d26adc8d68ca68cc6d4faabf" + end + depends_on "cmake" => :build on_intel do