bpo-33522: Enable CI builds on Visual Studio Team Services (#6865) · python/cpython@e5f41d2

22 files changed

lines changed

Original file line numberDiff line numberDiff line change

@@ -0,0 +1,43 @@

1+

# Current docs for the syntax of this file are at:

2+

# https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted.md

3+
4+

name: $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.rr)

5+
6+

queue:

7+

name: Hosted Linux Preview

8+
9+

#variables:

10+
11+

steps:

12+

- checkout: self

13+

clean: true

14+

fetchDepth: 5

15+
16+

- script: sudo apt-get update && sudo apt-get install -qy --force-yes texlive-full

17+

displayName: 'Install LaTeX'

18+
19+

- task: UsePythonVersion@0

20+

displayName: 'Use Python 3.6 or later'

21+

inputs:

22+

versionSpec: '>=3.6'

23+
24+

- script: python -m pip install sphinx blurb python-docs-theme

25+

displayName: 'Install build dependencies'

26+
27+

- script: make dist PYTHON=python SPHINXBUILD='python -m sphinx' BLURB='python -m blurb'

28+

workingDirectory: '$(build.sourcesDirectory)/Doc'

29+

displayName: 'Build documentation'

30+
31+

- task: PublishBuildArtifacts@1

32+

displayName: 'Publish build'

33+

inputs:

34+

PathToPublish: '$(build.sourcesDirectory)/Doc/build'

35+

ArtifactName: build

36+

publishLocation: Container

37+
38+

- task: PublishBuildArtifacts@1

39+

displayName: 'Publish dist'

40+

inputs:

41+

PathToPublish: '$(build.sourcesDirectory)/Doc/dist'

42+

ArtifactName: dist

43+

publishLocation: Container

Original file line numberDiff line numberDiff line change

@@ -0,0 +1,43 @@

1+

# Current docs for the syntax of this file are at:

2+

# https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted.md

3+
4+

name: $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.rr)

5+
6+

queue:

7+

name: Hosted Linux Preview

8+
9+

trigger:

10+

branches:

11+

include:

12+

- master

13+

- 3.7

14+

- 3.6

15+

paths:

16+

include:

17+

- Doc/*

18+
19+

#variables:

20+
21+

steps:

22+

- checkout: self

23+

clean: true

24+

fetchDepth: 5

25+
26+

- task: UsePythonVersion@0

27+

displayName: 'Use Python 3.6 or later'

28+

inputs:

29+

versionSpec: '>=3.6'

30+
31+

- script: python -m pip install sphinx~=1.6.1 blurb python-docs-theme

32+

displayName: 'Install build dependencies'

33+
34+

- script: make check suspicious html PYTHON=python

35+

workingDirectory: '$(build.sourcesDirectory)/Doc'

36+

displayName: 'Build documentation'

37+
38+

- task: PublishBuildArtifacts@1

39+

displayName: 'Publish build'

40+

inputs:

41+

PathToPublish: '$(build.sourcesDirectory)/Doc/build'

42+

ArtifactName: build

43+

publishLocation: Container

Original file line numberDiff line numberDiff line change

@@ -0,0 +1,71 @@

1+

# Current docs for the syntax of this file are at:

2+

# https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted.md

3+
4+

name: $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.rr)

5+
6+

queue:

7+

name: Hosted Linux Preview

8+
9+

trigger:

10+

branches:

11+

include:

12+

- master

13+

- 3.7

14+

- 3.6

15+

paths:

16+

exclude:

17+

- Doc/*

18+

- Tools/*

19+
20+

variables:

21+

# Copy-pasted from linux-deps.yml until template support arrives

22+

OPENSSL: 1.1.0g

23+

OPENSSL_DIR: "$(build.sourcesDirectory)/multissl/openssl/$(OPENSSL)"

24+
25+
26+

steps:

27+

- checkout: self

28+

clean: true

29+

fetchDepth: 5

30+
31+

#- template: linux-deps.yml

32+
33+

# See https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted-templates.md

34+

# For now, we copy/paste the steps

35+

- script: echo "deb-src http://archive.ubuntu.com/ubuntu/ xenial main" > /etc/apt/sources.list.d/python.list && sudo apt-get update

36+

displayName: 'Update apt-get lists'

37+
38+

- script: echo ##vso[task.prependpath]$(OPENSSL_DIR)

39+

displayName: 'Add $(OPENSSL_DIR) to PATH'

40+

- script: >

41+

sudo apt-get -yq install

42+

build-essential

43+

zlib1g-dev

44+

libbz2-dev

45+

liblzma-dev

46+

libncurses5-dev

47+

libreadline6-dev

48+

libsqlite3-dev

49+

libssl-dev

50+

libgdbm-dev

51+

tk-dev

52+

lzma

53+

lzma-dev

54+

liblzma-dev

55+

libffi-dev

56+

uuid-dev

57+

displayName: 'Install dependencies'

58+

- script: python3 Tools/ssl/multissltests.py --steps=library --base-directory $(build.sourcesDirectory)/multissl --openssl $(OPENSSL) --system Linux

59+

displayName: 'python multissltests.py'

60+
61+

- script: ./configure --with-pydebug

62+

displayName: 'Configure CPython (debug)'

63+
64+

- script: make -s -j4

65+

displayName: 'Build CPython'

66+
67+

- script: make pythoninfo

68+

displayName: 'Display build info'

69+
70+

- script: make buildbottest TESTOPTS="-j4 -uall,-cpu"

71+

displayName: 'Tests'

Original file line numberDiff line numberDiff line change

@@ -0,0 +1,77 @@

1+

# Current docs for the syntax of this file are at:

2+

# https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted.md

3+
4+

name: $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.rr)

5+
6+

queue:

7+

name: Hosted Linux Preview

8+
9+

trigger:

10+

branches:

11+

include:

12+

- master

13+

- 3.7

14+

- 3.6

15+

paths:

16+

exclude:

17+

- Doc/*

18+

- Tools/*

19+
20+

variables:

21+

# Copy-pasted from linux-deps.yml until template support arrives

22+

OPENSSL: 1.1.0g

23+

OPENSSL_DIR: "$(build.sourcesDirectory)/multissl/openssl/$(OPENSSL)"

24+
25+

steps:

26+

- checkout: self

27+

clean: true

28+

fetchDepth: 5

29+
30+

#- template: linux-deps.yml

31+
32+

# See https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted-templates.md

33+

# For now, we copy/paste the steps

34+

- script: echo "deb-src http://archive.ubuntu.com/ubuntu/ xenial main" > /etc/apt/sources.list.d/python.list && sudo apt-get update

35+

displayName: 'Update apt-get lists'

36+
37+

- script: echo ##vso[task.prependpath]$(OPENSSL_DIR)

38+

displayName: 'Add $(OPENSSL_DIR) to PATH'

39+

- script: >

40+

sudo apt-get -yq install

41+

build-essential

42+

zlib1g-dev

43+

libbz2-dev

44+

liblzma-dev

45+

libncurses5-dev

46+

libreadline6-dev

47+

libsqlite3-dev

48+

libssl-dev

49+

libgdbm-dev

50+

tk-dev

51+

lzma

52+

lzma-dev

53+

liblzma-dev

54+

libffi-dev

55+

uuid-dev

56+

displayName: 'Install dependencies'

57+

- script: python3 Tools/ssl/multissltests.py --steps=library --base-directory $(build.sourcesDirectory)/multissl --openssl $(OPENSSL) --system Linux

58+

displayName: 'python multissltests.py'

59+
60+
61+

- script: ./configure --with-pydebug

62+

displayName: 'Configure CPython (debug)'

63+
64+

- script: make -s -j4

65+

displayName: 'Build CPython'

66+
67+

- script: ./python -m venv venv && ./venv/bin/python -m pip install -U coverage

68+

displayName: 'Set up virtual environment'

69+
70+

- script: ./venv/bin/python -m test.pythoninfo

71+

displayName: 'Display build info'

72+
73+

- script: ./venv/bin/python -m coverage run --pylib -m test --fail-env-changed -uall,-cpu -x test_multiprocessing_fork -x test_multiprocessing_forkserver -x test_multiprocessing_spawn -x test_concurrent_futures

74+

displayName: 'Tests with coverage'

75+
76+

- script: source ./venv/bin/activate && bash <(curl -s https://codecov.io/bash)

77+

displayName: 'Publish code coverage results'

Original file line numberDiff line numberDiff line change

@@ -0,0 +1,36 @@

1+

# Note: this file is not currently used, but when template support comes to VSTS it

2+

# will be referenced from the other scripts..

3+
4+

# Current docs for the syntax of this file are at:

5+

# https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted.md

6+
7+

parameters:

8+

OPENSSL: 1.1.0g

9+

OPENSSL_DIR: "$(build.sourcesDirectory)/multissl/openssl/$(OPENSSL)"

10+
11+

steps:

12+

- script: echo "deb-src http://archive.ubuntu.com/ubuntu/ xenial main" > /etc/apt/sources.list.d/python.list && sudo apt-get update

13+

displayName: 'Update apt-get lists'

14+
15+

- script: echo ##vso[task.prependpath]$(OPENSSL_DIR)

16+

displayName: 'Add $(OPENSSL_DIR) to PATH'

17+

- script: >

18+

sudo apt-get -yq install

19+

build-essential

20+

zlib1g-dev

21+

libbz2-dev

22+

liblzma-dev

23+

libncurses5-dev

24+

libreadline6-dev

25+

libsqlite3-dev

26+

libssl-dev

27+

libgdbm-dev

28+

tk-dev

29+

lzma

30+

lzma-dev

31+

liblzma-dev

32+

libffi-dev

33+

uuid-dev

34+

displayName: 'Install dependencies'

35+

- script: python3 Tools/ssl/multissltests.py --steps=library --base-directory $(build.sourcesDirectory)/multissl --openssl $(OPENSSL) --system Linux

36+

displayName: 'python multissltests.py'

Original file line numberDiff line numberDiff line change

@@ -0,0 +1,75 @@

1+

# Current docs for the syntax of this file are at:

2+

# https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted.md

3+
4+

name: $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.rr)

5+
6+

queue:

7+

name: Hosted Linux Preview

8+
9+

trigger:

10+

branches:

11+

include:

12+

- master

13+

- 3.7

14+

- 3.6

15+

paths:

16+

exclude:

17+

- Doc/*

18+

- Tools/*

19+
20+

variables:

21+

# Copy-pasted from linux-deps.yml until template support arrives

22+

OPENSSL: 1.1.0g

23+

OPENSSL_DIR: "$(build.sourcesDirectory)/multissl/openssl/$(OPENSSL)"

24+
25+

steps:

26+

- checkout: self

27+

clean: true

28+

fetchDepth: 5

29+
30+

#- template: linux-deps.yml

31+
32+

# See https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted-templates.md

33+

# For now, we copy/paste the steps

34+

- script: echo "deb-src http://archive.ubuntu.com/ubuntu/ xenial main" > /etc/apt/sources.list.d/python.list && sudo apt-get update

35+

displayName: 'Update apt-get lists'

36+
37+

- script: echo ##vso[task.prependpath]$(OPENSSL_DIR)

38+

displayName: 'Add $(OPENSSL_DIR) to PATH'

39+

- script: >

40+

sudo apt-get -yq install

41+

build-essential

42+

zlib1g-dev

43+

libbz2-dev

44+

liblzma-dev

45+

libncurses5-dev

46+

libreadline6-dev

47+

libsqlite3-dev

48+

libssl-dev

49+

libgdbm-dev

50+

tk-dev

51+

lzma

52+

lzma-dev

53+

liblzma-dev

54+

libffi-dev

55+

uuid-dev

56+

displayName: 'Install dependencies'

57+

- script: python3 Tools/ssl/multissltests.py --steps=library --base-directory $(build.sourcesDirectory)/multissl --openssl $(OPENSSL) --system Linux

58+

displayName: 'python multissltests.py'

59+
60+
61+

- script: ./configure --with-pydebug

62+

displayName: 'Configure CPython (debug)'

63+
64+

- script: make -s -j4

65+

displayName: 'Build CPython'

66+
67+

- script: make pythoninfo

68+

displayName: 'Display build info'

69+
70+

# Run patchcheck and fail if anything is discovered

71+

- script: ./python Tools/scripts/patchcheck.py --travis true

72+

displayName: 'Run patchcheck.py'

73+
74+

- script: make buildbottest TESTOPTS="-j4 -uall,-cpu"

75+

displayName: 'Tests'

Original file line numberDiff line numberDiff line change

@@ -0,0 +1,37 @@

1+

# Current docs for the syntax of this file are at:

2+

# https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted.md

3+
4+

name: $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.rr)

5+
6+

queue:

7+

name: Hosted macOS Preview

8+
9+

trigger:

10+

branches:

11+

include:

12+

- master

13+

- 3.7

14+

- 3.6

15+

paths:

16+

exclude:

17+

- Doc/*

18+

- Tools/*

19+
20+

#variables:

21+
22+

steps:

23+

- checkout: self

24+

clean: true

25+

fetchDepth: 5

26+
27+

- script: ./configure --with-pydebug --with-openssl=/usr/local/opt/openssl

28+

displayName: 'Configure CPython (debug)'

29+
30+

- script: make -s -j4

31+

displayName: 'Build CPython'

32+
33+

- script: make pythoninfo

34+

displayName: 'Display build info'

35+
36+

- script: make buildbottest TESTOPTS="-j4 -uall,-cpu"

37+

displayName: 'Tests'