forked from benfogle/crossenv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
62 lines (53 loc) · 1.78 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
parameters:
- name: enable_python_main
displayName: Test against Python main branch
type: boolean
default: false
pool:
vmImage: 'ubuntu-18.04'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '>=3.5'
- script: |
set -x
sudo apt update
sudo apt install -y qemu-user git-lfs
python -m pip install --upgrade pip
pip install pytest wheel coverage pytest-xdist
displayName: Install dependencies
- script: |
git lfs pull
displayName: Pull prebuilt binaries
# This step is usually disabled. We only do this for our weekly builds, or
# if it was specifically requested in a commit message
- ${{ if or(eq(parameters.enable_python_main, true), eq(variables['Build.Reason'], 'Schedule')) }}:
- script: |
tar xf tests/prebuilt/prebuilt_musl_arm_aarch64.tar.xz
./tests/prebuilt/make_main.sh $PWD/prebuilt_musl_arm_aarch64/musl-toolchain
displayName: Cross compile Python main branch
- script: |
pytest -n auto --junit-xml=test-results.xml --coverage
displayName: Run tests
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFiles: '**/test-*.xml'
testRunTitle: 'Publish test results'
- script: |
coverage combine
coverage xml
condition: succeededOrFailed()
displayName: Collect code coverage
- task: PublishCodeCoverageResults@1
condition: succeededOrFailed()
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/coverage.xml'
schedules:
- cron: "0 12 * * 0"
displayName: "Weekly build"
branches:
include:
- master
always: true