-
Notifications
You must be signed in to change notification settings - Fork 6
60 lines (55 loc) · 1.76 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: CI
on:
push:
branches: [ main ]
pull_request:
workflow_dispatch:
jobs:
verify-swift-package-binaryTargets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Create .netrc file with credentials to download binaries from SAP RSBC
uses: little-core-labs/netrc-creds@master
with:
machine: rbsc.repositories.cloud.sap
login: sap-sdkiospecs
password: ${{ secrets.RSBC_USER_BASICAUTH_PWD }}
- name: Reset the complete cache/build directory
run: swift package reset
- name: Check download of binary frameworks
run: swift package resolve
- name: View downloaded binary frameworks
run: ls .build/artifacts/cloud-sdk-ios
verify-swift-package-platform:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Verify platform
run: |
VERSION=$(cat Package.swift | grep 'let version')
PLATFORM=$(cat Package.swift | grep 'platforms')
if [[ "$VERSION" == *"\"9"* ]]; then
if [[ "$PLATFORM" == *15* ]]; then
exit 0
else
echo "SDK version 9.x requires iOS 15 as minimum deployment target"
exit 1
fi
fi
if [[ "$VERSION" == *"\"7"* || "$VERSION" == *"\"8"* ]]; then
if [[ "$PLATFORM" == *14* ]]; then
exit 0
else
echo "SDK version 7.X and 8.X require iOS 14 as minimum deployment target"
exit 1
fi
fi
if [[ "$VERSION" == *"\"6"* ]]; then
if [[ "$PLATFORM" == *13* ]]; then
exit 0
else
echo "SDK version 6.x requires iOS 13 as minimum deployment target"
exit 1
fi
fi