Skip to content

CBL-4688: Jenkins PR Validation (EE) should run on both iOS and macOS… #792

CBL-4688: Jenkins PR Validation (EE) should run on both iOS and macOS…

CBL-4688: Jenkins PR Validation (EE) should run on both iOS and macOS… #792

name: iOS
on:
push:
branches:
- 'master'
- 'release/**'
pull_request:
branches:
- 'master'
- 'release/**'
jobs:
build:
name: build-and-test
runs-on: macOS-latest
strategy:
matrix:
scheme: ["CBL_ObjC", "CBL_Swift"]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: "Select-iOS-Simulator"
run: |
device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | sed 's/Simulator//g' | awk '{$1=$1;print}'`
echo $device | cat >device
echo "Selected the device : ${device}"
- name: "Build-for-testing"
env:
SCHEME: ${{ matrix.scheme }}
run: |
DEVICE=$(cat device)
xcodebuild build-for-testing -scheme "${SCHEME}" -project CouchbaseLite.xcodeproj -destination "platform=iOS Simulator,name=${DEVICE}"
- name: "Test"
env:
SCHEME: ${{ matrix.scheme }}
run: |
DEVICE=$(cat device)
xcodebuild test-without-building -scheme "${SCHEME}" -project CouchbaseLite.xcodeproj -destination "platform=iOS Simulator,name=${DEVICE}"