-
Notifications
You must be signed in to change notification settings - Fork 204
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
111 lines (100 loc) · 4.25 KB
/
azure-pipelines.yml
File metadata and controls
111 lines (100 loc) · 4.25 KB
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
# -----------------------------------------------------------------------------
# Copyright (c) 2009-2021, Shotgun Software Inc.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# - Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# - Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# - Neither the name of the Shotgun Software Inc nor the names of its
# contributors may be used to endorse or promote products derived from this
# software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
resources:
repositories:
- repository: templates
type: github
name: shotgunsoftware/tk-ci-tools
ref: refs/heads/master
endpoint: shotgunsoftware
# Despite using the "tk-" prefix, tk-ci-tools is not a Toolkit only tool.
# We use it to avoid duplicating and maintaining CI pipeline code.
# We've stored some variables in Azure. They contain credentials
# and are encrypted. They are also not available to clients.
# This statement says which variable groups this repo requires.
# We have two: one that can be shared by all repos that use CI
# and another that is used just by the Python API, which creates
# HumanUser's and as such need a password, which we can't
# hardcode in the .yml files.
variables:
- group: sg-credentials
# We want builds to trigger for 3 reasons:
# - The master branch sees new commits
# - Each PR should get rebuilt when commits are added to it.
trigger:
branches:
include:
- master
pr:
branches:
include:
- "*"
parameters:
- name: python_versions
type: object
default:
- '3.9'
- '3.10'
- '3.11'
- '3.13'
- name: os_versions
type: object
default:
- name: Linux
vm_image: ubuntu-latest
codecov_download_url: https://uploader.codecov.io/latest/linux/codecov
- name: macOS
vm_image: macOS-latest
codecov_download_url: https://uploader.codecov.io/v0.7.3/macos/codecov
# macOS & codecov note:
# In Nov 2024 (SG-36700), we pinned macOS to codecov v0.7.3 because the
# macOS-latest Azure Pipelines agent is Intel (x86_64), but Codecov
# started shipping arm64-only binaries.
# When we will change the macOs image to a arm64 arch, we can use the
# "latest" version again.
- name: Windows
vm_image: windows-latest
codecov_download_url: https://uploader.codecov.io/latest/windows/codecov.exe
# This here is the list of jobs we want to run for our build.
# Jobs run in parallel.
jobs:
- template: build-pipeline.yml@templates
parameters:
# Python API does not follow the exact same Python version lifecycle than
# Toolkit. So we prefer to control the test execution here instead.
has_unit_tests: false
has_ui_resources: false
- template: azure-pipelines-templates/type_checking.yml
- ${{ each os_version in parameters.os_versions }}:
- ${{ each python_version in parameters.python_versions }}:
- template: azure-pipelines-templates/run-tests.yml
parameters:
codecov_download_url: ${{ os_version.codecov_download_url }}
os_name: ${{ os_version.name }}
python_version: ${{ python_version }}
vm_image: ${{ os_version.vm_image }}