forked from calabash/calabash-ios-server
-
Notifications
You must be signed in to change notification settings - Fork 2
/
azure-pipelines.yml
99 lines (82 loc) · 2.84 KB
/
azure-pipelines.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
variables:
# `AzurePublishWhen` variable points to the matrix case that will be the main case
# it will run `appcenter-cli` test step and publish artifacts to the Azure Blob
AzurePublishWhen: 'Mojave-Xcode-11.2'
trigger:
tags:
include:
- '*'
branches:
include:
- master
- develop
pr:
branches:
include:
- master
- develop
jobs:
- job:
strategy:
matrix:
Catalina-Xcode-11.7:
IMAGE_POOL: 'macOS-10.15'
XCODE_VERSION: '11.7'
Catalina-Xcode-12.0:
IMAGE_POOL: 'macOS-10.15'
XCODE_VERSION: '12'
timeoutInMinutes: 180
pool:
vmImage: $(IMAGE_POOL)
variables:
- group: XTCRunTimeArtifactsCI
steps:
- script: |
set -e
sudo xcode-select --switch "/Applications/Xcode_$(XCODE_VERSION).app/Contents/Developer"
echo "Xcode version: $(xcrun xcodebuild -version)"
echo "Xcode path: $(xcrun -f xcodebuild)"
echo "Xcode select path: $(xcode-select --print-path)"
displayName: "Select Xcode $(XCODE_VERSION)"
- script: |
set -e
ruby -v
echo -e "install: --no-document --env-shebang\nupdate: --no-document --env-shebang" > ~/.gemrc
bundle install
displayName: "Prepare Ruby Environment"
- script: brew install tree
displayName: "Install brew dependencies"
- script: |
set -e
git clone https://$(CalabashKeychainGitHubAccessToken)@github.com/xamarinhq/calabash-codesign.git
calabash-codesign/apple/create-keychain.sh
displayName: "Download and install keychain"
- script: make framework
displayName: "Make framework"
- script: make dylibs
displayName: "Make dylibs"
- script: MAKE_FRAMEWORK=0 make ipa-cal
displayName: "Make ipa-call"
- script: MAKE_FRAMEWORK=0 make app-cal
displayName: "Make app-call"
- script: bundle exec bin/test/xctest.rb
displayName: "Make xctests"
- script: bundle exec bin/ci/jenkins/appcenter.sh
displayName: "test appcenter"
condition: and(succeeded(), eq(variables['Agent.JobName'], variables['mainJob']))
- script: bundle exec bin/test/cucumber.rb
displayName: "exec cucumber"
# azureStorage* env vars are defined in the pipeline UI as secret variables
- bash: "./bin/ci/az-publish.sh"
env:
AZURE_STORAGE_ACCOUNT: $(azureStorageAccount)
AZURE_STORAGE_KEY: $(azureStorageKey)
AZURE_STORAGE_CONNECTION_STRING: $(azureStorageConnectionString)
SOURCE_BRANCH: $(Build.SourceBranch)
displayName: "Publish to Azure Blob Storage"
condition: and(succeeded(), eq(variables['Agent.JobName'], variables['AzurePublishWhen']), or(startsWith(variables['Build.SourceBranch'], 'refs/tags/'), startsWith(variables['Build.SourceBranch'], 'develop')))
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFiles: 'cucumber/reports/junit/*.xml'
condition: always()