diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 37ae18d..9f89a5c 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -90,17 +90,14 @@ jobs: echo "name=mpv-natives-windows-x86_64-mpv-$VER" >> "$GITHUB_OUTPUT" echo "version=$VER" >> "$GITHUB_OUTPUT" - - name: Zip artifact - run: | - cd artifact-libmpv - zip -9r "../${{ steps.artifact.outputs.name }}.zip" . - ls -l .. - + # upload-artifact zips the directory itself, so handing it the folder + # (not a pre-zipped file) yields a single-level archive without the + # double-zip wrapper. - name: Upload artifact uses: actions/upload-artifact@v4 with: name: ${{ steps.artifact.outputs.name }} - path: ${{ steps.artifact.outputs.name }}.zip + path: artifact-libmpv - name: Save ccache uses: actions/cache/save@v4 diff --git a/ci/build-libmpv-mingw64.sh b/ci/build-libmpv-mingw64.sh index 3c5cf4e..f48b02a 100644 --- a/ci/build-libmpv-mingw64.sh +++ b/ci/build-libmpv-mingw64.sh @@ -297,11 +297,15 @@ mkdir -p artifact LIBMPV_DLL=$(find $build -maxdepth 1 -name 'libmpv-*.dll' | head -n 1) [ -n "$LIBMPV_DLL" ] || { echo "ERROR: libmpv DLL not found in $build"; ls -l $build; exit 1; } cp -pv "$LIBMPV_DLL" artifact/ +# buildtype=release emits DWARF .debug_* sections even for MinGW; for a +# distributable native we strip them out (~130 MB) so only the code/data +# sections remain. +"$TARGET-strip" --strip-all "artifact/$(basename "$LIBMPV_DLL")" # import library, for native linkers that want it (jlibmpv uses JNA, optional) -cp -pv "$build/libmpv.dll.a" artifact/ 2>/dev/null || true +cp -pv "$build"/libmpv*.dll.a artifact/ 2>/dev/null || true cp -pv "$build"/*.h artifact/ 2>/dev/null || true echo "=== artifact contents ===" ls -l artifact echo "=== libmpv-2.dll import dependencies (should be Windows system DLLs only) ===" -"$TARGET-objdump" -p artifact/$(basename "$LIBMPV_DLL") | grep -A500 "DLL Name" | grep -E "DLL Name" || true \ No newline at end of file +"$TARGET-objdump" -p "artifact/$(basename "$LIBMPV_DLL")" | awk '/DLL Name/{print $3}' || true \ No newline at end of file