From f748dc52c721b971d8c8c21d8b0bfa315c26bf4f Mon Sep 17 00:00:00 2001 From: Oleksiy Yakovenko Date: Sat, 17 Dec 2022 11:46:39 +0100 Subject: [PATCH] Github: Publish mac test results and full build log; minor gh action updates --- .github/workflows/macbuild.yml | 18 +++++++++++++----- travis/build.sh | 11 ++++++++--- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/.github/workflows/macbuild.yml b/.github/workflows/macbuild.yml index 3d3ae977d7..f54f40bb09 100644 --- a/.github/workflows/macbuild.yml +++ b/.github/workflows/macbuild.yml @@ -6,27 +6,35 @@ jobs: runs-on: macos-latest steps: - name: Checkout for macOS - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: true - name: Select Xcode version uses: maxim-lobanov/setup-xcode@v1 with: - xcode-version: '14' + xcode-version: '15' - name: Build for macOS run: TRAVIS_OS_NAME=osx travis/build.sh + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action/macos@v2 + if: always() + with: + files: | + osx/build/reports/junit.xml - name: Upload for macOS env: - gh_ed25519_key: ${{ secrets.GH_ENCRYPTED_ED25519_KEY }} - gh_ed25519_iv: ${{ secrets.GH_ENCRYPTED_ED25519_IV }} + gh_ed25519_key: ${{ secrets.GH_ENCRYPTED_ED25519_KEY }} + gh_ed25519_iv: ${{ secrets.GH_ENCRYPTED_ED25519_IV }} run: TRAVIS_OS_NAME=osx travis/upload.sh - name: Upload artifact uses: actions/upload-artifact@v4 with: name: deadbeef-macos-universal - path: osx/build/Release/DeaDBeeF.app + path: osx/build/Release/*.zip + if-no-files-found: error - name: Upload logs uses: actions/upload-artifact@v4 with: name: build-logs path: osx/build/Release/*.log + if-no-files-found: warn diff --git a/travis/build.sh b/travis/build.sh index 83dfc91089..7718cf1d7c 100755 --- a/travis/build.sh +++ b/travis/build.sh @@ -20,14 +20,19 @@ case "$TRAVIS_OS_NAME" in make dist ;; osx) - echo gem install xcpretty ... + echo "Install xcbeautify ..." brew install xcbeautify 1> /dev/null 2> /dev/null + echo "Patch Info.plist ..." VERSION=`tr -d '\r' < PORTABLE_VERSION` /usr/libexec/PlistBuddy -c "Set CFBundleShortVersionString $VERSION" plugins/cocoaui/deadbeef-Info.plist rev=`git rev-parse --short HEAD` /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $rev" plugins/cocoaui/deadbeef-Info.plist - xcodebuild "MACOSX_DEPLOYMENT_TARGET=10.13" test -project osx/deadbeef.xcodeproj -scheme deadbeef -configuration Release | xcbeautify ; test ${PIPESTATUS[0]} -eq 0 - xcodebuild "MACOSX_DEPLOYMENT_TARGET=10.13" -project osx/deadbeef.xcodeproj -target DeaDBeeF -configuration Release -quiet | tee osx/build/Release/build.log | xcbeautify ; test ${PIPESTATUS[0]} -eq 0 + echo "Build & run tests ..." + mkdir -p osx/build/reports + mkdir -p osx/build/Release + xcodebuild "MACOSX_DEPLOYMENT_TARGET=10.13" test -project osx/deadbeef.xcodeproj -scheme deadbeef -configuration Release | xcbeautify --report junit --report-path "osx/build/reports" ; test ${PIPESTATUS[0]} -eq 0 + echo "Build DeaDBeeF.app ..." + xcodebuild "MACOSX_DEPLOYMENT_TARGET=10.13" -project osx/deadbeef.xcodeproj -target DeaDBeeF -configuration Release | tee osx/build/Release/build.log | xcbeautify ; test ${PIPESTATUS[0]} -eq 0 cd osx/build/Release zip -r deadbeef-$VERSION-macos-universal.zip DeaDBeeF.app cd ../../..