Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from Travis to Azure Pipelines #111

Merged
merged 3 commits into from Jul 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
62 changes: 0 additions & 62 deletions .travis.yml

This file was deleted.

45 changes: 45 additions & 0 deletions azure-pipelines.yml
@@ -0,0 +1,45 @@
trigger:
- master

jobs:
- job: lint
pool:
vmImage: 'macos-latest'
steps:
- bash: ./lint.sh
- job: pod
pool:
vmImage: 'macos-latest'
steps:
- bash: ./pod.sh
- job: test_xcodebuild_10_0
pool:
vmImage: 'macos-latest'
steps:
- bash: ./test_xcodebuild.sh Xcode_10
env:
IOS_DEVICE: 'platform=iOS Simulator,OS=12.0,name=iPhone SE'
TVOS_DEVICE: 'platform=tvOS Simulator,OS=12.0,name=Apple TV 4K'
- job: test_xcodebuild_10_1
pool:
vmImage: 'macos-latest'
steps:
- bash: ./test_xcodebuild.sh Xcode_10.1
env:
IOS_DEVICE: 'platform=iOS Simulator,OS=12.1,name=iPhone SE'
TVOS_DEVICE: 'platform=tvOS Simulator,OS=12.1,name=Apple TV 4K'
- job: test_xcodebuild_10_2
pool:
vmImage: 'macos-latest'
steps:
- bash: ./test_xcodebuild.sh Xcode_10.2.1
env:
IOS_DEVICE: 'platform=iOS Simulator,OS=12.2,name=iPhone SE'
TVOS_DEVICE: 'platform=tvOS Simulator,OS=12.2,name=Apple TV 4K'
CODECOV_JOB: 'true'
CODECOV_TOKEN: $(codecovToken)
- job: test_swiftpm
pool:
vmImage: 'macos-latest'
steps:
- script: ./test_swiftpm.sh
10 changes: 10 additions & 0 deletions lint.sh
@@ -0,0 +1,10 @@
#!/bin/bash

set -e
set -o pipefail

brew update
brew install swiftformat swiftlint

swiftformat --lint --verbose .
swiftlint
7 changes: 7 additions & 0 deletions pod.sh
@@ -0,0 +1,7 @@
#!/bin/bash

set -e
set -o pipefail

pod repo update
pod lib lint --verbose
6 changes: 6 additions & 0 deletions test_swiftpm.sh
@@ -0,0 +1,6 @@
#!/bin/bash

set -e
set -o pipefail

swift test
21 changes: 21 additions & 0 deletions test_xcodebuild.sh
@@ -0,0 +1,21 @@
#!/bin/bash

set -e
set -o pipefail

sudo xcode-select --switch /Applications/$1.app/Contents/Developer

xcodebuild -version
xcodebuild build -scheme XMLCoder \
-sdk iphonesimulator -destination "$IOS_DEVICE" | xcpretty
xcodebuild build -scheme XMLCoder \
-sdk appletvsimulator -destination "$TVOS_DEVICE" | xcpretty

if [ -n "$CODECOV_JOB" ]; then
xcodebuild test -enableCodeCoverage YES -scheme XMLCoder \
-sdk macosx | xcpretty
bash <(curl -s https://codecov.io/bash)
else
xcodebuild test -scheme XMLCoder \
-sdk macosx | xcpretty
fi