From 526147a337768fa64c2ecc73f8260e3ca2ba7a55 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Wed, 4 Dec 2024 20:51:18 +1100 Subject: [PATCH] fix --- .github/workflows/wheels-dependencies.sh | 46 ++++++++---------------- .github/workflows/wheels.yml | 20 ----------- 2 files changed, 14 insertions(+), 52 deletions(-) diff --git a/.github/workflows/wheels-dependencies.sh b/.github/workflows/wheels-dependencies.sh index 69a2e3c34f3..a6cacd4241c 100755 --- a/.github/workflows/wheels-dependencies.sh +++ b/.github/workflows/wheels-dependencies.sh @@ -97,49 +97,31 @@ function build_harfbuzz { touch harfbuzz-stamp } -function install_rav1e { - if [ -n "$IS_MACOS" ]; then - suffix="macos" - if [[ "$PLAT" == "arm64" ]]; then - suffix+="-aarch64" - fi - else - suffix="linux" - if [[ "$PLAT" == "aarch64" ]]; then - suffix+="-aarch64" - else - suffix+="-generic" - fi - fi - - curl -sLo - \ - https://github.com/xiph/rav1e/releases/download/v$RAV1E_VERSION/librav1e-$RAV1E_VERSION-$suffix.tar.gz \ - | tar -C $BUILD_PREFIX --exclude LICENSE --exclude '*.so' --exclude '*.dylib' -zxf - +function build_rav1e { + if [ -e rav1e-stamp ]; then return; fi + curl https://sh.rustup.rs -sSf | sh -s -- -y + . "$HOME/.cargo/env" - if [ -z "$IS_MACOS" ]; then - sed -i 's/-lgcc_s/-lgcc_eh/g' "${BUILD_PREFIX}/lib/pkgconfig/rav1e.pc" + if [[ -z "$IS_MACOS" ]]; then + yum install -y openssl-devel fi - # Force libavif to treat system rav1e as if it were local - mkdir -p /tmp/cmake/Modules - cat < /tmp/cmake/Modules/Findrav1e.cmake - add_library(rav1e::rav1e STATIC IMPORTED GLOBAL) - set_target_properties(rav1e::rav1e PROPERTIES - IMPORTED_LOCATION "$BUILD_PREFIX/lib/librav1e.a" - AVIF_LOCAL ON - INTERFACE_INCLUDE_DIRECTORIES "$BUILD_PREFIX/include/rav1e" - ) -EOF + local out_dir=$(fetch_unpack https://github.com/xiph/rav1e/archive/refs/tags/v$RAV1E_VERSION.tar.gz) + (cd $out_dir \ + && cargo install cargo-c \ + && sudo cargo cinstall --release) + touch rav1e-stamp } function build_libavif { if [ -e libavif-stamp ]; then return; fi - install_rav1e - python3 -m pip install meson ninja if [[ "$PLAT" == "x86_64" ]]; then build_simple nasm 2.16.03 https://www.nasm.us/pub/nasm/releasebuilds/2.16.03/ fi + build_rav1e + + python3 -m pip install meson ninja local out_dir=$(fetch_unpack https://github.com/AOMediaCodec/libavif/archive/refs/tags/v$LIBAVIF_VERSION.tar.gz libavif-$LIBAVIF_VERSION.tar.gz) (cd $out_dir \ diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 45f18634100..812e4c92b2b 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -10,32 +10,12 @@ on: # │ │ │ │ │ - cron: "42 1 * * 0,3" push: - paths: - - ".ci/requirements-cibw.txt" - - ".github/workflows/wheel*" - - "setup.py" - - "wheels/*" - - "winbuild/build_prepare.py" - - "winbuild/fribidi.cmake" - tags: - - "*" pull_request: - paths: - - ".ci/requirements-cibw.txt" - - ".github/workflows/wheel*" - - "setup.py" - - "wheels/*" - - "winbuild/build_prepare.py" - - "winbuild/fribidi.cmake" workflow_dispatch: permissions: contents: read -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - env: FORCE_COLOR: 1