Skip to content

Commit

Permalink
Publish test results from github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksiy-Yakovenko committed Nov 2, 2024
1 parent 0fc8f68 commit 6cdee0c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/macbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
11 changes: 8 additions & 3 deletions travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ../../..
Expand Down

0 comments on commit 6cdee0c

Please sign in to comment.