From fc4eda0f447f7799fb0d7933d816780375ce845b Mon Sep 17 00:00:00 2001 From: sfan5 Date: Fri, 6 May 2022 14:05:16 +0200 Subject: [PATCH] Properly strip windows binaries produced by CI --- .github/workflows/build.yml | 4 ++-- scripts/ci-build-mingw.sh | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f50726cf..5feea3e4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -77,7 +77,7 @@ jobs: - uses: actions/upload-artifact@v2 with: name: irrlicht-win32 - path: ./irrlicht-windows.zip + path: ./irrlicht-win32.zip win64: runs-on: ubuntu-20.04 @@ -99,7 +99,7 @@ jobs: - uses: actions/upload-artifact@v2 with: name: irrlicht-win64 - path: ./irrlicht-windows.zip + path: ./irrlicht-win64.zip macos: runs-on: macos-10.15 diff --git a/scripts/ci-build-mingw.sh b/scripts/ci-build-mingw.sh index e925c394..8173aa64 100755 --- a/scripts/ci-build-mingw.sh +++ b/scripts/ci-build-mingw.sh @@ -34,15 +34,17 @@ tmp=( -DZLIB_LIBRARY=$libs/zlib/lib/libz.dll.a \ -DZLIB_INCLUDE_DIR=$libs/zlib/include ) -[ "$1" = "package" ] && tmp+=(-DCMAKE_EXE_LINKER_FLAGS="-s") cmake . "${tmp[@]}" make -j$(nproc) if [ "$1" = "package" ]; then make DESTDIR=$PWD/_install install + # strip library + "${CXX%-*}-strip" --strip-unneeded _install/usr/local/lib/*.dll # bundle the DLLs that are specific to Irrlicht (kind of a hack) cp -p $libs/*/bin/lib{jpeg,png}*.dll _install/usr/local/lib/ - (cd _install/usr/local; zip -9r "$OLDPWD"/irrlicht-windows.zip -- *) + # create a ZIP + (cd _install/usr/local; zip -9r "$OLDPWD"/irrlicht-$variant.zip -- *) fi exit 0