Skip to content

Commit 16f7669

Browse files
authored
Merge pull request #20 from VirgilSecurity/develop
v0.9.0
2 parents ac73b1a + 1af29b0 commit 16f7669

36 files changed

Lines changed: 315 additions & 114 deletions

.github/workflows/deploy.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: deploy
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
Deploy:
10+
name: Deploy
11+
runs-on: macOS-12
12+
env:
13+
DEVELOPER_DIR: /Applications/Xcode_13.4.1.app/Contents/Developer
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Prepare Dependencies
17+
env:
18+
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
run: |
20+
set -o pipefail
21+
carthage version
22+
carthage bootstrap --use-xcframeworks
23+
24+
- name: Generate Docs
25+
run: ./CI/publish-docs.sh
26+
27+
- name: Publish Docs
28+
uses: peaceiris/actions-gh-pages@v3
29+
with:
30+
github_token: ${{ secrets.GITHUB_TOKEN }}
31+
publish_dir: ./docs
32+
33+
- name: Build Carthage Binary
34+
run: |
35+
./CI/publish-carthage.sh;
36+
- name: Upload Carthage Binary
37+
uses: svenstaro/upload-release-action@v2
38+
with:
39+
repo_token: ${{ secrets.GITHUB_TOKEN }}
40+
file: VirgilSDKRatchet.xcframework.zip
41+
tag: ${{ github.ref }}
42+
overwrite: true
43+
- name: Publish Cocoapods
44+
run: ./CI/publish-cocoapods.sh
45+
env:
46+
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
47+

.github/workflows/tests.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
8+
jobs:
9+
Tests:
10+
name: Tests
11+
runs-on: macOS-12
12+
env:
13+
DEVELOPER_DIR: /Applications/Xcode_13.4.1.app/Contents/Developer
14+
PROJECT: VirgilSDKRatchet.xcodeproj
15+
strategy:
16+
matrix:
17+
include:
18+
- destination: "OS=15.5,name=iPhone 13 Pro"
19+
prefix: "iOS"
20+
test: "1"
21+
- destination: "arch=x86_64"
22+
prefix: "macOS"
23+
test: "1"
24+
- destination: "OS=15.4,name=Apple TV"
25+
prefix: "tvOS"
26+
test: "1"
27+
- destination: "OS=8.5,name=Apple Watch Series 7 - 45mm"
28+
prefix: "watchOS"
29+
test: "0"
30+
steps:
31+
- uses: actions/checkout@v2
32+
- name: Decrypt tests config
33+
run: ./CI/decrypt-config.sh
34+
env:
35+
ENCRYPTION_KEY: ${{ secrets.ENCRYPTION_KEY }}
36+
ENCRYPTION_IV: ${{ secrets.ENCRYPTION_IV }}
37+
- name: Prepare Dependencies
38+
env:
39+
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
run: |
41+
carthage version
42+
carthage bootstrap --use-xcframeworks --platform ${{ matrix.prefix }}
43+
- name: Run ${{ matrix.prefix }} Tests
44+
run: |
45+
SCHEME="VirgilSDKRatchet ${{ matrix.prefix }}"
46+
47+
if [ "${{ matrix.test }}" == "1" ]; then
48+
# Build Framework
49+
xcodebuild -verbose -project "$PROJECT" -scheme "$SCHEME" -destination "${{ matrix.destination }}" -configuration Debug clean build-for-testing | xcpretty;
50+
# Run Tests
51+
xcodebuild -verbose -project "$PROJECT" -scheme "$SCHEME" -destination "${{ matrix.destination }}" -configuration Debug test-without-building | xcpretty;
52+
else
53+
xcodebuild -verbose -project "$PROJECT" -scheme "$SCHEME" -destination "${{ matrix.destination }}" -configuration Release clean build | xcpretty;
54+
fi
55+
SPM:
56+
runs-on: macOS-12
57+
steps:
58+
- uses: actions/checkout@v2
59+
- name: Decrypt tests config
60+
run: ./CI/decrypt-config.sh
61+
env:
62+
ENCRYPTION_KEY: ${{ secrets.ENCRYPTION_KEY }}
63+
ENCRYPTION_IV: ${{ secrets.ENCRYPTION_IV }}
64+
- name: SPM test
65+
run: |
66+
brew install coreutils # install 'timeout' utility
67+
swift --version
68+
# fix for Swift Package Manager when it fails to download binary targets
69+
timeout 5m bash -c 'until swift build; do rm -fr .build && sleep 10; done'
70+
swift test
71+
72+
Swiftlint:
73+
runs-on: macOS-12
74+
steps:
75+
- uses: actions/checkout@v2
76+
- name: Swiftlint
77+
run: |
78+
brew outdated swiftlint || brew upgrade swiftlint
79+
swiftlint

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Pods
99

1010
## Build generated
1111
build/
12+
.build/
1213
DerivedData/
1314

1415
## Various settings

.swiftlint.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,10 @@ opt_in_rules:
128128
- void_return
129129
- weak_delegate
130130

131-
excluded:
131+
excluded:
132+
- .build
133+
- .swiftpm
134+
- Package.swift
132135
- Carthage
133136
- Tests
134137
- RatchetTestApp iOS

.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.travis.yml

Lines changed: 0 additions & 98 deletions
This file was deleted.

CI/decrypt-config.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
openssl aes-256-cbc -K $ENCRYPTION_KEY -iv $ENCRYPTION_IV -in config.tar.enc -out config.tar -d
2+
tar xvf config.tar
3+
mv TestConfig.plist Tests/Data/TestConfig.plist

CI/publish-docs.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,18 @@
3636
#
3737

3838
# Settings
39-
DOCS_DIR="${TRAVIS_BUILD_DIR}/docs"
39+
DOCS_DIR="${GITHUB_WORKSPACE}/docs"
4040
mkdir -p ${DOCS_DIR}
4141
git clone -b gh-pages "${REPO_PATH}" --single-branch ${DOCS_DIR}
4242

43-
INFOPLIST_FILE_PATH="${TRAVIS_BUILD_DIR}/VirgilSDKRatchet/Info.plist"
43+
INFOPLIST_FILE_PATH="${GITHUB_WORKSPACE}/VirgilSDKRatchet/Info.plist"
4444

4545
# Define SDK versions
4646
VIRGIL_SDK_VERSION="v"$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "${INFOPLIST_FILE_PATH}")
4747
CURRENT_VERSION_DIR="${DOCS_DIR}/${VIRGIL_SDK_VERSION}"
4848

4949
# Generate the HTML documentation.
50-
OUTPUT=${CURRENT_VERSION_DIR} ${TRAVIS_BUILD_DIR}/CI/generate-docs.sh
50+
OUTPUT=${CURRENT_VERSION_DIR} ${GITHUB_WORKSPACE}/CI/generate-docs.sh
5151

5252
# Generate root HTML file
5353
function get_dir_names {

Cartfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
github "VirgilSecurity/virgil-cryptowrapper-x" ~> 0.16.0
2-
github "VirgilSecurity/virgil-sdk-x" ~> 8.0.0
1+
github "VirgilSecurity/virgil-cryptowrapper-x" ~> 0.16.1
2+
github "VirgilSecurity/virgil-sdk-x" ~> 8.1.0

Cartfile.resolved

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
github "VirgilSecurity/virgil-crypto-c" "v0.16.0"
2-
github "VirgilSecurity/virgil-crypto-x" "6.0.0"
3-
github "VirgilSecurity/virgil-cryptowrapper-x" "0.16.0"
4-
github "VirgilSecurity/virgil-sdk-x" "8.0.0"
1+
binary "https://raw.githubusercontent.com/VirgilSecurity/virgil-crypto-c/v0.16.1/carthage-specs/VSCCommon.json" "0.16.1"
2+
binary "https://raw.githubusercontent.com/VirgilSecurity/virgil-crypto-c/v0.16.1/carthage-specs/VSCFoundation.json" "0.16.1"
3+
binary "https://raw.githubusercontent.com/VirgilSecurity/virgil-crypto-c/v0.16.1/carthage-specs/VSCPythia.json" "0.16.1"
4+
binary "https://raw.githubusercontent.com/VirgilSecurity/virgil-crypto-c/v0.16.1/carthage-specs/VSCRatchet.json" "0.16.1"
5+
github "VirgilSecurity/virgil-crypto-x" "6.0.1"
6+
github "VirgilSecurity/virgil-cryptowrapper-x" "0.16.1"
7+
github "VirgilSecurity/virgil-sdk-x" "8.1.0"

0 commit comments

Comments
 (0)