-
Notifications
You must be signed in to change notification settings - Fork 16
/
azure-pipelines.yml
112 lines (95 loc) · 3.19 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
100
101
102
103
104
105
106
107
108
109
110
111
112
variables:
# When Agent.JobName matches this value (and the git ref is a tag), then
# built artifacts will be published to Azure Blob Storage.
AzurePublishWhen: "Ventura-Xcode-14.3"
EOCompliance-Mac: true
trigger:
tags:
include:
- '*'
branches:
include:
- master
- develop
pr:
branches:
include:
- master
- develop
jobs:
- job:
strategy:
matrix:
Monterey-Xcode-13.4.1:
IMAGE_POOL: 'macOS-12'
XCODE_VERSION: '13.4.1'
SIM_NAME: "iPhone 13"
SIM_OS_VERSION: "15.5"
Monterey-Xcode-14.2:
IMAGE_POOL: 'macOS-12'
XCODE_VERSION: '14.2'
SIM_NAME: "iPhone 14"
SIM_OS_VERSION: "16.2"
Ventura-Xcode-14.3:
IMAGE_POOL: 'macOS-13'
XCODE_VERSION: '14.3'
SIM_NAME: "iPhone 14"
SIM_OS_VERSION: "16.4"
pool:
vmImage: $(IMAGE_POOL)
timeoutInMinutes: 120
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: |
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 app-agent
displayName: "Make app-agent"
- script: make ipa-agent
displayName: "Make ipa-agent"
- script: make test-ipa
displayName: "Make test-ipa"
- script: make test-app
displayName: "Make test-app"
- script: make unit-tests SIM_NAME="$(SIM_NAME)" SIM_OS_VERSION="$(SIM_OS_VERSION)"
displayName: "Make unit-tests"
condition: and(succeeded(), eq(variables['IsRunUnitTests'], 'true'))
- script: make ui-tests
displayName: "Make ui-tests"
condition: and(succeeded(), eq(variables['IsRunUITests'], 'true'))
- script: make alerts-ui-tests
displayName: "Run alerts UI tests"
condition: and(succeeded(), eq(variables['IsRunUITests'], 'true'))
- script: bundle exec bin/ci/cucumber.rb
displayName: "exec cucumber"
condition: and(succeeded(), eq(variables['IsRunCucumberTests'], 'true'))
- 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']), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFiles: 'cucumber/reports/junit/*.xml'
failTaskOnFailedTests: true
condition: always()