Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
- Remove Carthage
- Use SPM within Xcode project
- Update CI/CD scripts
- Update to VirgilSDK 9.0.0
- Update to VirgilSDKPythia 0.12.0
- Update to VirgilSDKRatchet 0.10.0
  • Loading branch information
SergeySeroshtan committed Aug 9, 2023
1 parent 873c50a commit cee15b4
Show file tree
Hide file tree
Showing 16 changed files with 294 additions and 488 deletions.
25 changes: 3 additions & 22 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,11 @@ on:
jobs:
Deploy:
name: Deploy
runs-on: macOS-12
runs-on: macOS-13
env:
DEVELOPER_DIR: /Applications/Xcode_13.4.1.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_14.3.1.app/Contents/Developer
steps:
- uses: actions/checkout@v2
- name: Prepare Dependencies
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -o pipefail
carthage version
carthage bootstrap --use-xcframeworks
- uses: actions/checkout@v3

- name: Generate Docs
run: ./CI/publish-docs.sh
Expand All @@ -30,19 +23,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs

- name: Build Carthage Binary
run: |
./CI/publish-carthage.sh;
- name: Upload Carthage Binary
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: VirgilE3Kit.xcframework.zip
tag: ${{ github.ref }}
overwrite: true

- name: Publish Cocoapods
run: ./CI/publish-cocoapods.sh
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}

70 changes: 42 additions & 28 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,76 +3,90 @@ name: tests
on:
push:
branches:
- develop
- 'develop'
- 'release/**'

jobs:
Tests:
name: Tests
runs-on: macOS-12
runs-on: macOS-13
env:
DEVELOPER_DIR: /Applications/Xcode_13.4.1.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_14.3.1.app/Contents/Developer
PROJECT: VirgilE3Kit.xcodeproj
strategy:
matrix:
include:
- destination: "OS=15.5,name=iPhone 13 Pro"
- destination: "OS=17.0,name=iPhone 14"
prefix: "iOS"
test: "1"
- destination: "arch=x86_64"
prefix: "macOS"
test: "1"
- destination: "OS=15.4,name=Apple TV"
- destination: "OS=17.0,name=Apple TV"
prefix: "tvOS"
test: "1"
- destination: "OS=8.5,name=Apple Watch Series 7 - 45mm"
- destination: "OS=10.0,name=Apple Watch Series 7 - 45mm"
prefix: "watchOS"
test: "0"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Decrypt tests config
run: ./CI/decrypt-config.sh
env:
ENCRYPTION_KEY: ${{ secrets.ENCRYPTION_KEY }}
ENCRYPTION_IV: ${{ secrets.ENCRYPTION_IV }}
- name: Prepare Dependencies
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
carthage version
carthage bootstrap --use-xcframeworks --platform ${{ matrix.prefix }}
ENCRYPTION_KEY: ${{ secrets.ENCRYPTION_KEY }}
ENCRYPTION_IV: ${{ secrets.ENCRYPTION_IV }}
run: ./CI/decrypt-config.sh

- name: Run ${{ matrix.prefix }} Tests
run: |
uses: nick-fields/retry@v2
with:
max_attempts: 20
timeout_minutes: 30
retry_on: error
command: |
set -o pipefail
SCHEME="VirgilE3Kit ${{ matrix.prefix }}"
if [ "${{ matrix.test }}" == "1" ]; then
# Build Framework
xcodebuild -verbose -project "$PROJECT" -scheme "$SCHEME" -destination "${{ matrix.destination }}" -configuration Debug clean build-for-testing | xcpretty;
# Run Tests
xcodebuild -verbose -project "$PROJECT" -scheme "$SCHEME" -destination "${{ matrix.destination }}" -configuration Debug test-without-building | xcpretty;
# Build & Test Framework
xcodebuild -verbose -project "$PROJECT" -scheme "$SCHEME" -destination "${{ matrix.destination }}" -configuration Debug clean test | xcpretty;
else
# Build Only
xcodebuild -verbose -project "$PROJECT" -scheme "$SCHEME" -destination "${{ matrix.destination }}" -configuration Release clean build | xcpretty;
fi
SPM:
runs-on: macOS-12
runs-on: macOS-13
env:
DEVELOPER_DIR: /Applications/Xcode_14.3.1.app/Contents/Developer
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Decrypt tests config
run: ./CI/decrypt-config.sh
env:
ENCRYPTION_KEY: ${{ secrets.ENCRYPTION_KEY }}
ENCRYPTION_IV: ${{ secrets.ENCRYPTION_IV }}
- name: SPM test
run: ./CI/decrypt-config.sh

- name: SPM test build
run: |
brew install coreutils # install 'timeout' utility
swift --version
# fix for Swift Package Manager when it fails to download binary targets
timeout 5m bash -c 'until swift build; do rm -fr .build && sleep 10; done'
swift test
- name: SPM test run
uses: nick-fields/retry@v2
with:
max_attempts: 10
timeout_minutes: 5
retry_on: error
command: swift test

Swiftlint:
runs-on: macOS-12
runs-on: macOS-13
env:
DEVELOPER_DIR: /Applications/Xcode_14.3.1.app/Contents/Developer
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Swiftlint
run: |
brew outdated swiftlint || brew upgrade swiftlint
Expand Down
6 changes: 0 additions & 6 deletions CI/publish-carthage.sh

This file was deleted.

2 changes: 1 addition & 1 deletion CI/publish-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ git clone -b gh-pages "${REPO_PATH}" --single-branch ${DOCS_DIR}
INFOPLIST_FILE_PATH="${GITHUB_WORKSPACE}/VirgilE3Kit/Info.plist"

# Define SDK versions
VIRGIL_SDK_VERSION="v"$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "${INFOPLIST_FILE_PATH}")
VIRGIL_SDK_VERSION="v4.0.0"
CURRENT_VERSION_DIR="${DOCS_DIR}/${VIRGIL_SDK_VERSION}"

# Generate the HTML documentation.
Expand Down
2 changes: 0 additions & 2 deletions Cartfile

This file was deleted.

9 changes: 0 additions & 9 deletions Cartfile.resolved

This file was deleted.

45 changes: 0 additions & 45 deletions E3Kit TestApp iOS/Info.plist

This file was deleted.

32 changes: 0 additions & 32 deletions E3Kit TestApp tvOS/Info.plist

This file was deleted.

28 changes: 14 additions & 14 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
{
"pins" : [
{
"identity" : "virgil-crypto-x",
"identity" : "virgil-crypto-c",
"kind" : "remoteSourceControl",
"location" : "https://github.com/VirgilSecurity/virgil-crypto-x.git",
"location" : "https://github.com/VirgilSecurity/virgil-crypto-c.git",
"state" : {
"revision" : "eee53f493c6dcdefe49378d2967b7fe750ad18e0",
"version" : "6.0.1"
"revision" : "591c32a4c54378e750c80052d7588df8056525b0",
"version" : "0.17.0"
}
},
{
"identity" : "virgil-cryptowrapper-x",
"identity" : "virgil-crypto-x",
"kind" : "remoteSourceControl",
"location" : "https://github.com/VirgilSecurity/virgil-cryptowrapper-x.git",
"location" : "https://github.com/VirgilSecurity/virgil-crypto-x.git",
"state" : {
"revision" : "957bf2113ea570f1b934ffab5bbfbc8e12c7e6a3",
"version" : "0.16.1"
"revision" : "96fef3abb3c96eec0c14cdf3f406658776071dbd",
"version" : "7.0.0"
}
},
{
"identity" : "virgil-pythia-x",
"kind" : "remoteSourceControl",
"location" : "https://github.com/VirgilSecurity/virgil-pythia-x.git",
"state" : {
"revision" : "4a259dd70fa3ae27ad65054d54c617a870de53e5",
"version" : "0.11.0"
"revision" : "5b8eb3a4a8e891826d8a2c0d00e13a4b246aa596",
"version" : "0.12.0-dev.1"
}
},
{
"identity" : "virgil-ratchet-x",
"kind" : "remoteSourceControl",
"location" : "https://github.com/VirgilSecurity/virgil-ratchet-x.git",
"state" : {
"revision" : "16f7669ea056b411cc11a13118b4354d0bef18fe",
"version" : "0.9.0"
"revision" : "19e28149a973aba2f70ba1c0cf176fa15e84e278",
"version" : "0.10.0"
}
},
{
"identity" : "virgil-sdk-x",
"kind" : "remoteSourceControl",
"location" : "https://github.com/VirgilSecurity/virgil-sdk-x.git",
"state" : {
"revision" : "4ea08d9ad458c9197961d88dbc163ee1a608fa84",
"version" : "8.1.0"
"revision" : "7165aafa08be93a874097033ec903bac447e4b9b",
"version" : "9.0.0"
}
}
],
Expand Down
6 changes: 3 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import PackageDescription
let package = Package(
name: "VirgilE3Kit",
platforms: [
.macOS(.v10_11), .iOS(.v9), .tvOS(.v9), .watchOS(.v2)
.macOS(.v10_12), .iOS(.v11), .tvOS(.v11), .watchOS(.v4)
],
products: [
.library(
Expand All @@ -15,8 +15,8 @@ let package = Package(
],

dependencies: [
.package(url: "https://github.com/VirgilSecurity/virgil-pythia-x.git", exact: .init(0, 11, 0)),
.package(url: "https://github.com/VirgilSecurity/virgil-ratchet-x.git", exact: .init(0, 9, 0))
.package(url: "https://github.com/VirgilSecurity/virgil-pythia-x.git", exact: .init(0, 12, 0, prereleaseIdentifiers: ["dev", "1"])),
.package(url: "https://github.com/VirgilSecurity/virgil-ratchet-x.git", exact: .init(0, 10, 0))
],

targets: [
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Virgil E3Kit Objective-C/Swift

[![Build Status](https://api.travis-ci.com/VirgilSecurity/virgil-e3kit-x.svg?branch=master)](https://travis-ci.com/VirgilSecurity/virgil-e3kit-x)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/VirgilE3Kit.svg)](https://cocoapods.org/pods/VirgilE3Kit)
[![Platform](https://img.shields.io/cocoapods/p/VirgilE3Kit.svg?style=flat)](https://cocoapods.org/pods/VirgilE3Kit)
[![SPM compatible](https://img.shields.io/badge/Swift_Package_Manager-compatible-green.svg?style=flat)](https://www.swift.org/package-manager)
[![GitHub license](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg)](https://github.com/VirgilSecurity/virgil/blob/master/LICENSE)
[![API Reference](https://img.shields.io/badge/API%20reference-e3kit--x-green)](https://virgilsecurity.github.io/virgil-e3kit-x/)

Expand Down
8 changes: 4 additions & 4 deletions VirgilE3Kit.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "VirgilE3Kit"
s.version = "3.0.1"
s.swift_version = "5.1"
s.version = "4.0.0-dev.1"
s.swift_version = "5."
s.license = { :type => "BSD", :file => "LICENSE" }
s.summary = "Vigil E3Kit for Apple devices and languages"
s.homepage = "https://github.com/VirgilSecurity/virgil-e3kit-x/"
Expand All @@ -12,6 +12,6 @@ Pod::Spec.new do |s|
s.watchos.deployment_target = "2.0"
s.source = { :git => "https://github.com/VirgilSecurity/virgil-e3kit-x.git", :tag => s.version }
s.source_files = 'Source/**/*.{swift}'
s.dependency "VirgilSDKPythia", '= 0.11.0'
s.dependency "VirgilSDKRatchet", '= 0.9.0'
s.dependency "VirgilSDKPythia", '= 0.12.0'
s.dependency "VirgilSDKRatchet", '= 0.10.0'
end
Loading

0 comments on commit cee15b4

Please sign in to comment.