Skip to content

Commit

Permalink
wip: full static build test
Browse files Browse the repository at this point in the history
  • Loading branch information
fdintino committed Sep 28, 2023
1 parent 72c1617 commit dd8b7fc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -358,14 +358,14 @@ jobs:
id: wheel
if: "github.event_name == 'push'"
run: |
cmd /c "winbuild\build\build_env.cmd && $env:pythonLocation\python.exe -m pip wheel ."
cmd /c "winbuild\build\build_env.cmd && $env:pythonLocation\python.exe -m pip wheel -v ."
shell: pwsh

- uses: actions/upload-artifact@v3
if: "github.event_name == 'push'"
with:
name: wheels
path: dist\*.whl
path: "*.whl"

success:
needs: [build, windows]
Expand Down
17 changes: 10 additions & 7 deletions wheelbuild/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -eo pipefail
CONFIG_DIR=$(abspath $(dirname "${BASH_SOURCE[0]}"))

ARCHIVE_SDIR=pillow-avif-plugin-depends
LIBAVIF_VERSION=1.0.1
LIBAVIF_VERSION=9575bb2a32346694b9b346652d6ea2c398e80721
AOM_VERSION=3.7.0
DAV1D_VERSION=1.2.1
SVT_AV1_VERSION=1.7.0
Expand All @@ -23,6 +23,11 @@ alias trace_off='{ set +x; } 2>/dev/null'
alias trace_suppress='{ [[ $- =~ .*x.* ]] && trace_enabled=1 || trace_enabled=0; set +x; } 2>/dev/null'
alias trace_restore='{ [ $trace_enabled -eq 1 ] && trace_on || trace_off; } 2>/dev/null'

if [ -n "$IS_MACOS" ] && [ -n "$MACOSX_DEPLOYMENT_TARGET" ]; then
CFLAGS="${CFLAGS} -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET"
LDFLAGS="${LDFLAGS} -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET"
fi

call_and_restore_trace() {
local rc
local force_trace
Expand Down Expand Up @@ -467,14 +472,11 @@ function build_libavif {
group_start "Download libavif source"

fetch_unpack \
"https://github.com/AOMediaCodec/libavif/archive/v$LIBAVIF_VERSION.tar.gz" \
"https://github.com/fdintino/libavif/archive/$LIBAVIF_VERSION.tar.gz" \
"libavif-$LIBAVIF_VERSION.tar.gz"

group_end

(cd libavif-$LIBAVIF_VERSION \
&& patch -p1 -i $CONFIG_DIR/libavif-1.0.1-local-static.patch)

build_libsharpyuv
mv libwebp-$LIBWEBP_SHA libavif-$LIBAVIF_VERSION/ext/libwebp
LIBAVIF_CMAKE_FLAGS+=(-DAVIF_LOCAL_LIBSHARPYUV=ON)
Expand All @@ -489,11 +491,12 @@ function build_libavif {

(cd libavif-$LIBAVIF_VERSION/build \
&& cmake .. \
-G "Ninja" \
-DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DBUILD_SHARED_LIBS=OFF \
"${LIBAVIF_CMAKE_FLAGS[@]}" \
&& make install)
&& ninja -v install/strip)

group_end
}
Expand Down
6 changes: 3 additions & 3 deletions winbuild/build_prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ def cmd_msbuild(
"libavif": {
"url": (
"https://github.com/fdintino/libavif/archive/"
"217e76487e7ca81057e8de1d3a2ab095e1c4fcb1.zip"
"9575bb2a32346694b9b346652d6ea2c398e80721.zip"
),
"filename": "libavif-217e76487e7ca81057e8de1d3a2ab095e1c4fcb1.zip",
"dir": "libavif-217e76487e7ca81057e8de1d3a2ab095e1c4fcb1",
"filename": "libavif-9575bb2a32346694b9b346652d6ea2c398e80721.zip",
"dir": "libavif-9575bb2a32346694b9b346652d6ea2c398e80721",
"license": "LICENSE",
"build": [
cmd_mkdir(r"ext\rav1e\build.libavif\usr"),
Expand Down

0 comments on commit dd8b7fc

Please sign in to comment.