From fadfc5e53556c968fca80677306915a3652c985b Mon Sep 17 00:00:00 2001 From: Oleksiy Yakovenko Date: Sat, 17 Dec 2022 11:46:39 +0100 Subject: [PATCH] Publish test results from github actions --- .github/workflows/macbuild.yml | 13 +++++++++---- travis/build.sh | 8 ++++++-- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/macbuild.yml b/.github/workflows/macbuild.yml index 3d3ae977d7..c469412f68 100644 --- a/.github/workflows/macbuild.yml +++ b/.github/workflows/macbuild.yml @@ -12,19 +12,24 @@ jobs: - 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/composite@v2 + if: always() + with: + junit_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 - name: Upload logs uses: actions/upload-artifact@v4 with: diff --git a/travis/build.sh b/travis/build.sh index 83dfc91089..b4316446f6 100755 --- a/travis/build.sh +++ b/travis/build.sh @@ -20,13 +20,17 @@ 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 + echo "Build & run tests ..." + mkdir -p osx/build/reports + 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 -quiet | 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