diff --git a/.github/workflows/macbuild.yml b/.github/workflows/macbuild.yml index 3d3ae977d7..a85c4f8e34 100644 --- a/.github/workflows/macbuild.yml +++ b/.github/workflows/macbuild.yml @@ -6,25 +6,31 @@ 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 - name: Upload logs uses: actions/upload-artifact@v4 with: 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 ../../..