forked from adafruit/circuitpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
165 lines (159 loc) · 5.72 KB
/
azure-pipelines.yml
File metadata and controls
165 lines (159 loc) · 5.72 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# C/C++ with GCC
# Build your C/C++ project with GCC using make.
# Add steps that publish test results, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/c-cpp/gcc
# To ask:
# * 400+ artifacts we can't explicitly list. Can we use templating like each to do it per board?
# * Better way to have deb hosted/cached for install?
# * Release pipeline vs GitHub triggered tag?
trigger:
- azure-pipelines
jobs:
- job: Download_ARM_GCC
pool:
vmImage: 'Ubuntu-16.04'
steps:
- checkout: none
- bash: |
wget https://s3.amazonaws.com/adafruit-circuit-python/gcc-arm-embedded_7-2018q2-1~xenial1_amd64.deb
displayName: 'Download ARM GCC from S3'
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'arm-gcc'
targetPath: 'gcc-arm-embedded_7-2018q2-1~xenial1_amd64.deb'
- job: Test
pool:
vmImage: 'Ubuntu-16.04'
steps:
- checkout: self
submodules: recursive
- task: UsePythonVersion@0
inputs:
versionSpec: '3.5'
architecture: 'x64'
- bash: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install sh click Sphinx==1.8.5 sphinx-rtd-theme recommonmark polib wheel
python -m pip install --upgrade cpp-coveralls
displayName: 'Install python deps'
- bash: |
gcc --version
python3 --version
displayName: 'Print versions'
- bash: |
sphinx-build -E -W -b html . _build/html
displayName: 'Building docs'
continueOnError: true
- bash: |
sudo apt-get install gettext
displayName: 'Install native deps'
- bash: |
make check-translate
displayName: 'Checking translations'
continueOnError: true
- bash: |
make -C mpy-cross -j2
displayName: 'Build mpy-cross'
- bash: |
make -j2 deplibs
make -j2
make -j2 coverage
displayName: 'Build unix'
workingDirectory: 'ports/unix'
- bash: |
MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1
displayName: 'Test all'
workingDirectory: 'tests'
continueOnError: true
- bash: |
MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 -d thread
displayName: 'Test threads'
workingDirectory: 'tests'
continueOnError: true
- bash: |
MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --emit native
displayName: 'Testing with native'
workingDirectory: 'tests'
continueOnError: true
- bash: |
MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --via-mpy -d basics float
displayName: 'Testing with mpy'
workingDirectory: 'tests'
continueOnError: true
- bash: |
for exp in *.exp;
do testbase=$(basename $exp .exp)
echo -e "\nFAILURE $testbase"
diff -u $testbase.exp $testbase.out
done
displayName: "Dump test failure info"
workingDirectory: 'tests'
condition: failed()
failOnStderr: false
continueOnError: true
- bash: |
exit 1
condition: eq(variables['Agent.JobStatus'], 'SucceededWithIssues')
displayName: "Fail fully if issues occurred"
- job: BuildARM
pool:
vmImage: 'Ubuntu-16.04'
dependsOn: Download_ARM_GCC
strategy:
matrix:
# Nine subjobs that will go in parallel with the test job
samd_m0_boards1:
TRAVIS_BOARDS: 'trinket_m0 pirkey_m0 gemma_m0 sparkfun_lumidrive arduino_zero'
samd_m0_boards2:
TRAVIS_BOARDS: 'arduino_mkr1300 arduino_mkrzero sparkfun_samd21_mini sparkfun_samd21_dev'
samd_m0_boards3:
TRAVIS_BOARDS: 'meowmeow uchip pewpew10 catwan_usbstick'
feather_samd_m0_boards:
TRAVIS_BOARDS: 'feather_radiofruit_zigbee feather_m0_rfm69 feather_m0_rfm9x feather_m0_adalogger feather_m0_basic'
samd_m0_express_boards1:
TRAVIS_BOARDS: 'circuitplayground_express_crickit circuitplayground_express feather_m0_express_crickit feather_m0_express'
samd_m0_express_boards2:
TRAVIS_BOARDS: 'metro_m0_express sparkfun_redboard_turbo hallowing_m0_express itsybitsy_m0_express'
samd_m4_boards1:
TRAVIS_BOARDS: 'itsybitsy_m4_express feather_m4_express pyportal mini_sam_m4'
samd_m4_boards2:
TRAVIS_BOARDS: 'grandcentral_m4_express metro_m4_express trellis_m4_express pybadge'
nrf_boards:
TRAVIS_BOARDS: 'pca10056 pca10059 makerdiary_nrf52840_mdk makerdiary_nrf52840_mdk_usb_dongle particle_boron particle_argon particle_xenon sparkfun_nrf52840_mini feather_nrf52840_express sam32'
steps:
- checkout: self
submodules: recursive
- task: DownloadPipelineArtifact@0
inputs:
artifactName: 'arm-gcc'
targetPath: $(System.DefaultWorkingDirectory)
displayName: 'Download ARM GCC from pipeline'
- bash: |
sudo dpkg -i arm-gcc/*.deb
displayName: 'Install ARM GCC'
- bash: |
sudo apt-get install gettext
displayName: 'Install native deps'
- bash: |
sudo apt-get install -y python3-pip
pip3 install --user sh click
displayName: 'Install python deps'
- bash: |
gcc --version
arm-none-eabi-gcc --version
python3 --version
displayName: 'Print versions'
- bash: |
make -C mpy-cross -j2
displayName: 'Build mpy-cross'
- bash: |
python3 -u build_release_files.py
displayName: 'Build board'
workingDirectory: 'tools'
- bash: |
env
displayName: 'Dump env'
# - task: PublishPipelineArtifact@0
# inputs:
# artifactName: variables['']
# targetPath: 'bin'