Skip to content

Commit

Permalink
CBL-2862: Add package validation actions (#3173)
Browse files Browse the repository at this point in the history
* update package

* add actions validation

* update run condition for rest of actions
  • Loading branch information
velicuvlad authored Jul 14, 2023
1 parent c1bab8d commit ee07027
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 14 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/check_package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Swift Package

on:
pull_request:
paths:
- "Package.swift"

jobs:
build:
name: Swift ${{ matrix.swift }}
runs-on: macos-latest
strategy:
matrix:
swift: ["5.7", "5.8"]

steps:
- uses: actions/checkout@v2
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY_VERIFY }}
log-public-key: false
- uses: swift-actions/[email protected]
with:
swift-version: ${{ matrix.swift }}
- name: Set CBL Version
run: |
export VERSION=$(awk -F'/' '/url:/{print $6}' Package.swift | cut -d'_' -f3)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Checkout couchbase-lite-ios-release-verify
run: |
git clone https://github.com/couchbaselabs/couchbase-lite-ios-release-verify.git
- name: Validate
run: |
./couchbase-lite-ios-release-verify/Scripts/verify_spm.sh -ce -v $VERSION
14 changes: 9 additions & 5 deletions .github/workflows/xcodebuild-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@ name: iOS

on:
push:
branches: [ master ]
branches:
- 'master'
- 'release/**'
pull_request:
branches: [ master ]
branches:
- 'master'
- 'release/**'

jobs:
build:
name: build-and-test
runs-on: macos-latest
runs-on: macOS-latest
strategy:
matrix:
scheme: ["CBL_ObjC", "CBL_Swift"]
matrix:
scheme: ["CBL_ObjC", "CBL_Swift"]
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/xcodebuild-mac.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: macOS

on:
push:
branches:
- master
pull_request:
branches:
- '**'
push:
branches:
- 'master'
- 'release/**'
pull_request:
branches:
- 'master'
- 'release/**'

jobs:
build:
Expand Down
7 changes: 4 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.3
// swift-tools-version: 5.7
import PackageDescription

let package = Package(
Expand All @@ -14,8 +14,9 @@ let package = Package(
targets: [
.binaryTarget(
name: "CouchbaseLiteSwift",
url: "https://packages.couchbase.com/releases/couchbase-lite-ios/3.0.0/couchbase-lite-swift_xc_community_3.0.0.zip",
checksum: "1c77f6f9e6eb41e19dec32fbae4463601196c5edca3ae2a164d81e311e57a8d1"
url: "https://packages.couchbase.com/releases/couchbase-lite-ios/3.1.0/couchbase-lite-swift_xc_community_3.1.0.zip",
checksum: "556d6ae41df3b5ebf91dbe45d38214dd7032f97ac1b132f925356d20e3b9ada5"
)
]
)

0 comments on commit ee07027

Please sign in to comment.