From 4247e38349b4b526d23e06e87d0d85e3abfe8c80 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Wed, 7 Apr 2021 12:39:26 -0400 Subject: [PATCH] CI: Compress Linux/macOS debug files Installs Intel IPP on Ubuntu and macOS runners Updates boo to fix FindIPP for new *nix path --- .github/workflows/release.yml | 45 ++++++++++++++++++++++------------- ci/build-dmg.sh | 11 +++++++++ ci/split-debug-linux.sh | 5 ++-- ci/upload-debug-macos.sh | 3 ++- extern/boo | 2 +- 5 files changed, 46 insertions(+), 20 deletions(-) create mode 100644 ci/build-dmg.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 81ce256a0..dd9fe05a3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,13 +32,18 @@ jobs: - name: Install dependencies run: | - sudo apt-get update + wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB + sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB + rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB + sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main" sudo apt-get -y install build-essential curl git cmake ninja-build llvm-dev libclang-dev clang lld \ zlib1g-dev libglu1-mesa-dev libdbus-1-dev libvulkan-dev libxi-dev libxrandr-dev libasound2-dev \ libpulse-dev libudev-dev libpng-dev libncurses5-dev libx11-xcb-dev python3 python-is-python3 qt5-default \ - libcurl4-openssl-dev + libcurl4-openssl-dev intel-oneapi-ipp-devel + yarn global add @sentry/cli echo "$(yarn global bin)" >> $GITHUB_PATH + # free up disk space # https://github.com/actions/virtual-environments/issues/2840#issuecomment-790492173 echo Before @@ -84,7 +89,7 @@ jobs: name: metaforce-${{env.METAFORCE_VERSION}}-linux-${{matrix.cc}}-x86_64 path: | Metaforce-*.AppImage - build/Binaries/*.dbg + debug.tar.* build-macos: name: Build macOS (AppleClang x86_64) @@ -101,6 +106,17 @@ jobs: brew link qt@5 yarn global add create-dmg + - name: Install Intel IPP + env: + IPP_VERSION: 2021.2.0.192 + run: | + NAME="m_ipp_oneapi_p_${IPP_VERSION}_offline" + curl -LSfs https://registrationcenter-download.intel.com/akdlm/irc_nas/17606/$NAME.dmg -o /tmp/$NAME.dmg + sudo hdiutil attach /tmp/$NAME.dmg -quiet + sudo /Volumes/$NAME/bootstrapper.app/Contents/MacOS/install.sh -c --action install --eula accept + sudo hdiutil detach /Volumes/$NAME -quiet + rm /tmp/$NAME.dmg + - name: Create build directory run: cmake -E make_directory ${{github.workspace}}/build @@ -129,23 +145,20 @@ jobs: keychain-password: ${{ secrets.MACOS_KEYCHAIN_PASSWORD }} - name: Deploy & codesign application - working-directory: build/Binaries - run: | - mv metaforce-gui.app Metaforce.app - for i in visigen hecl metaforce crashpad_handler; do - codesign --timestamp --options runtime -s "${{secrets.MACOS_CODESIGN_IDENT}}" Metaforce.app/Contents/MacOS/$i - done - macdeployqt Metaforce.app -sign-for-notarization="${{secrets.MACOS_CODESIGN_IDENT}}" -no-strip - create-dmg Metaforce.app --identity="${{secrets.MACOS_CODESIGN_IDENT}}" - xcrun altool -t osx -f *.dmg --primary-bundle-id com.axiodl.URDE --notarize-app \ - -u "${{secrets.MACOS_ASC_USERNAME}}" -p "${{secrets.MACOS_ASC_PASSWORD}}" \ - --team-id "${{secrets.MACOS_ASC_TEAM_ID}}" + env: + ASC_USERNAME: ${{secrets.MACOS_ASC_USERNAME}} + ASC_PASSWORD: ${{secrets.MACOS_ASC_PASSWORD}} + ASC_TEAM_ID: ${{secrets.MACOS_ASC_TEAM_ID}} + CODESIGN_IDENT: ${{secrets.MACOS_CODESIGN_IDENT}} + run: ci/build-dmg.sh - name: Upload artifacts uses: actions/upload-artifact@v2 with: name: metaforce-${{env.METAFORCE_VERSION}}-macos-appleclang-x86_64 - path: build/Binaries/*.dmg + path: | + Metaforce *.dmg + debug.tar.* build-windows-msvc: name: Build Windows (MSVC x86_64) @@ -275,7 +288,7 @@ jobs: # $TempDir = "$env:RUNNER_WORKSPACE\temp" # $Filename = "w_ipp_oneapi_p_${env:IPP_VERSION}_offline.exe" # New-Item -Path "$TempDir" -ItemType Directory -ea 0 -# (New-Object Net.WebClient).DownloadFile("https://registrationcenter-download.intel.com/akdlm/irc_nas/$Filename", "$TempDir\$Filename") +# (New-Object Net.WebClient).DownloadFile("https://registrationcenter-download.intel.com/akdlm/irc_nas/17739/$Filename", "$TempDir\$Filename") # Start-Process "$TempDir\$Filename" -ArgumentList "--x --s --f $TempDir\ipp" -Wait # Start-Process "$TempDir\ipp\bootstrapper.exe" -ArgumentList "--eula accept -c --action install" -Wait diff --git a/ci/build-dmg.sh b/ci/build-dmg.sh new file mode 100644 index 000000000..864f29428 --- /dev/null +++ b/ci/build-dmg.sh @@ -0,0 +1,11 @@ +#!/bin/bash -ex +cd build/Binaries +mv metaforce-gui.app Metaforce.app +# order is important +for i in visigen hecl metaforce crashpad_handler; do + codesign --timestamp --options runtime -s "$CODESIGN_IDENT" Metaforce.app/Contents/MacOS/$i +done +macdeployqt Metaforce.app -sign-for-notarization="$CODESIGN_IDENT" -no-strip +create-dmg Metaforce.app --identity="$CODESIGN_IDENT" "$GITHUB_WORKSPACE" +xcrun altool -t osx -f "$GITHUB_WORKSPACE"/*.dmg --primary-bundle-id com.axiodl.URDE --notarize-app \ + -u "$ASC_USERNAME" -p "$ASC_PASSWORD" --team-id "$ASC_TEAM_ID" \ No newline at end of file diff --git a/ci/split-debug-linux.sh b/ci/split-debug-linux.sh index 1511f2617..91f551bea 100755 --- a/ci/split-debug-linux.sh +++ b/ci/split-debug-linux.sh @@ -1,6 +1,7 @@ #!/bin/bash -ex cd build/Binaries for f in hecl metaforce-gui metaforce visigen; do - objcopy --only-keep-debug --compress-debug-sections=zlib $f $f.dbg + objcopy --only-keep-debug $f $f.dbg objcopy --strip-debug --add-gnu-debuglink=$f.dbg $f -done \ No newline at end of file +done +tar acfv "$GITHUB_WORKSPACE"/debug.tar.xz -- *.dbg \ No newline at end of file diff --git a/ci/upload-debug-macos.sh b/ci/upload-debug-macos.sh index 4b4166be4..528d8bbc8 100755 --- a/ci/upload-debug-macos.sh +++ b/ci/upload-debug-macos.sh @@ -2,7 +2,8 @@ cd build/Binaries/metaforce-gui.app/Contents/MacOS for f in hecl metaforce-gui metaforce visigen; do dsymutil $f + strip -S $f done -strip -S hecl metaforce-gui metaforce visigen crashpad_handler sentry-cli upload-dif --org axiodl --project metaforce {hecl,metaforce-gui,metaforce,visigen}{,.dSYM} --include-sources +tar acfv "$GITHUB_WORKSPACE"/debug.tar.xz -- *.dSYM rm -r -- *.dSYM diff --git a/extern/boo b/extern/boo index fa89c9c13..6335cb09f 160000 --- a/extern/boo +++ b/extern/boo @@ -1 +1 @@ -Subproject commit fa89c9c1380bb8b5bfee329e45ede41c86e7c825 +Subproject commit 6335cb09fe5046984e8baa9b5a65de837037e70c