Use xcbeautify to reduce the warning noise of xcodebuild #480
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build main target | |
on: | |
pull_request: | |
paths: | |
- '.github/workflows/**' | |
- NextcloudTalk.xcodeproj/** | |
- NextcloudTalk/** | |
- NextcloudTalkTests/** | |
- NotificationServiceExtension/** | |
- ShareExtension/** | |
push: | |
branches: | |
- main | |
- master | |
- stable* | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
build-and-test: | |
name: Build and Test | |
runs-on: macos-14 | |
strategy: | |
fail-fast: false | |
matrix: | |
# Test with stable23 as well to find regressions in older versions | |
configs: [ | |
{ talkbranch: 'stable23', serverbranch: 'stable23', phpversion: '8.0' }, | |
{ talkbranch: 'stable27', serverbranch: 'stable27', phpversion: '8.2' }, | |
{ talkbranch: 'stable28', serverbranch: 'stable28', phpversion: '8.2' }, | |
{ talkbranch: 'main', serverbranch: 'master', phpversion: '8.2' } | |
] | |
env: | |
WORKSPACE: NextcloudTalk.xcworkspace | |
DESTINATION: platform=iOS Simulator,name=iPhone 15,OS=17.2 | |
SCHEME: NextcloudTalk | |
steps: | |
- name: Checkout app | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: actions/cache@v4 | |
with: | |
path: Pods | |
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-pods- | |
- name: Set up php ${{ matrix.configs.phpversion }} | |
uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2.30.0 | |
with: | |
php-version: ${{ matrix.configs.phpversion }} | |
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation | |
extensions: apcu, bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, pgsql, pdo_pgsql | |
coverage: none | |
ini-file: development | |
# Temporary workaround for missing pcntl_* in PHP 8.3: ini-values: apc.enable_cli=on | |
ini-values: apc.enable_cli=on, disable_functions= | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Checkout server | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
submodules: true | |
repository: nextcloud/server | |
path: server | |
ref: ${{ matrix.configs.serverbranch }} | |
- name: Checkout Talk | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
repository: nextcloud/spreed | |
path: server/apps/spreed | |
ref: ${{ matrix.configs.talkbranch }} | |
- name: Set up production dependencies | |
working-directory: server/apps/spreed | |
run: composer i --no-dev | |
- name: Set up Nextcloud | |
run: | | |
mkdir server/data | |
./server/occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin | |
./server/occ config:system:set hashing_default_password --value=true --type=boolean | |
./server/occ config:system:set memcache.local --value="\\OC\\Memcache\\APCu" | |
./server/occ config:system:set memcache.distributed --value="\\OC\\Memcache\\APCu" | |
./server/occ app:enable --force spreed | |
PHP_CLI_SERVER_WORKERS=3 php -S localhost:8080 -t server/ & | |
- name: Set up dependencies talk-ios | |
run: | | |
pod install | |
- name: Install xcbeautify | |
run: | | |
brew install xcbeautify | |
- name: Build & Test NextcloudTalk iOS | |
run: | | |
set -o pipefail && xcodebuild test -workspace $WORKSPACE \ | |
-scheme "$SCHEME" \ | |
-destination "$DESTINATION" \ | |
-test-iterations 3 \ | |
-retry-tests-on-failure \ | |
-resultBundlePath "testResult.xcresult" \ | |
| xcbeautify --quieter | |
- name: Upload test results | |
uses: actions/upload-artifact@v4 | |
if: ${{ !cancelled() }} | |
with: | |
name: testResults-${{ matrix.configs.talkbranch }}.xcresult | |
path: "testResult.xcresult" | |
summary: | |
permissions: | |
contents: none | |
runs-on: ubuntu-latest-low | |
needs: [build-and-test] | |
if: always() | |
name: build-and-test-summary | |
steps: | |
- name: Summary status | |
run: if ${{ needs.build-and-test.result != 'success' }}; then exit 1; fi |