-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a72b1a1
commit 535a903
Showing
1 changed file
with
22 additions
and
19 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,35 @@ | ||
name: Swift-Package | ||
|
||
on: | ||
push: | ||
branches: [ master, release/** ] | ||
pull_request: | ||
branches: | ||
- master | ||
- release/** | ||
paths: | ||
- Package.swift | ||
|
||
jobs: | ||
build: | ||
name: build-and-test | ||
runs-on: macOS-latest | ||
name: Swift ${{ matrix.swift }} | ||
runs-on: macos-latest | ||
strategy: | ||
matrix: | ||
swift: ["5.7", "5.8"] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build & test MacOS | ||
run: | | ||
swift build -v | ||
swift test -v | ||
- name: Build & test iOS | ||
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}" | ||
- uses: actions/checkout@v2 | ||
- uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.VERIFY_SPM_KEY }} | ||
|
||
DEVICE=$(cat device) | ||
xcodebuild build-for-testing -scheme "CBL_Swift" -project CouchbaseLite.xcodeproj -destination "platform=iOS Simulator,name=${DEVICE}" | ||
- name: Get verification scripts | ||
run: git clone [email protected]:couchbaselabs/couchbase-lite-ios-release-verify.git -b CBL-2862 | ||
|
||
DEVICE=$(cat device) | ||
xcodebuild test-without-building -scheme "CBL_Swift" -project CouchbaseLite.xcodeproj -destination "platform=iOS Simulator,name=${DEVICE}" | ||
- uses: swift-actions/[email protected] | ||
with: | ||
swift-version: ${{ matrix.swift }} | ||
|
||
- name: Replace Swift Package | ||
run: cp -f Package.swift couchbase-lite-ios-release-verify/ReleaseVerify/ReleaseVerify-SPM-EE/Package.swift | ||
|
||
- name: Validation | ||
run: couchbase-lite-ios-release-verify/Scripts/verify_spm.sh -ce |