Skip to content

Commit

Permalink
Migrated ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Ogerets committed Jul 24, 2022
1 parent 120a7c6 commit 520770d
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 97 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: deploy

on:
push:
tags:
- '*'

jobs:
Deploy:
name: Deploy
runs-on: macOS-12
env:
DEVELOPER_DIR: /Applications/Xcode_13.4.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
- name: Generate Docs
run: ./CI/publish-docs.sh

- name: Publish Docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs

- name: Build Carthage Binary
run: |
./CI/publish-carthage.sh;
- name: Upload Carthage Binary
uses: AButler/[email protected]
with:
files: 'VirgilSDK.xcframework.zip'
repo-token: ${{ secrets.GITHUB_TOKEN }}

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

58 changes: 58 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: tests

on:
push:
branches:
- develop

jobs:
Tests:
name: Tests
runs-on: macOS-12
env:
DEVELOPER_DIR: /Applications/Xcode_13.4.1.app/Contents/Developer
PROJECT: VirgilSDK.xcodeproj
strategy:
matrix:
include:
- destination: "OS=15.5,name=iPhone 13 Pro"
prefix: "iOS"
test: "1"
- destination: "arch=x86_64"
prefix: "macOS"
test: "1"
- destination: "OS=15.4,name=Apple TV"
prefix: "tvOS"
test: "1"
- destination: "OS=8.5,name=Apple Watch Series 7 - 45mm"
prefix: "watchOS"
test: "0"
steps:
- uses: actions/checkout@v2
- name: Prepare Dependencies
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
carthage version
carthage bootstrap --use-xcframeworks --platform ${{ matrix.prefix }}
- name: Run ${{ matrix.prefix }} Tests
run: |
set -o pipefail
SCHEME="VirgilSDK ${{ 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;
else
xcodebuild -verbose -project "$PROJECT" -scheme "$SCHEME" -destination "${{ matrix.destination }}" -configuration Release clean build | xcpretty;
fi
SPM:
runs-on: macOS-12
steps:
- uses: actions/checkout@v2
- run: brew install coreutils # install 'timeout' utility
- run: swift --version
- run: timeout 5m bash -c 'until swift build; do rm -fr .build && sleep 10; done' # fix for Swift Package Manager when it fails to download binary targets
- run: swift test
97 changes: 0 additions & 97 deletions .travis.yml

This file was deleted.

0 comments on commit 520770d

Please sign in to comment.