diff --git a/.vsts/docs-release.yml b/.vsts/docs-release.yml index e90428a42494e0a..87441d06c625c89 100644 --- a/.vsts/docs-release.yml +++ b/.vsts/docs-release.yml @@ -3,41 +3,44 @@ name: $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.rr) -queue: - name: Hosted Linux Preview - -#variables: - -steps: -- checkout: self - clean: true - fetchDepth: 5 - -- script: sudo apt-get update && sudo apt-get install -qy --force-yes texlive-full - displayName: 'Install LaTeX' - -- task: UsePythonVersion@0 - displayName: 'Use Python 3.6 or later' - inputs: - versionSpec: '>=3.6' - -- script: python -m pip install sphinx blurb python-docs-theme - displayName: 'Install build dependencies' - -- script: make dist PYTHON=python SPHINXBUILD='python -m sphinx' BLURB='python -m blurb' - workingDirectory: '$(build.sourcesDirectory)/Doc' - displayName: 'Build documentation' - -- task: PublishBuildArtifacts@1 - displayName: 'Publish build' - inputs: - PathToPublish: '$(build.sourcesDirectory)/Doc/build' - ArtifactName: build - publishLocation: Container - -- task: PublishBuildArtifacts@1 - displayName: 'Publish dist' - inputs: - PathToPublish: '$(build.sourcesDirectory)/Doc/dist' - ArtifactName: dist - publishLocation: Container +jobs: + +- job: docsRelease + pool: + vmImage: 'Ubuntu 16.04' + + #variables: + + steps: + - checkout: self + clean: true + fetchDepth: 5 + + - script: sudo apt-get update && sudo apt-get install -qy --force-yes texlive-full + displayName: 'Install LaTeX' + + - task: UsePythonVersion@0 + displayName: 'Use Python 3.6 or later' + inputs: + versionSpec: '>=3.6' + + - script: python -m pip install sphinx blurb python-docs-theme + displayName: 'Install build dependencies' + + - script: make dist PYTHON=python SPHINXBUILD='python -m sphinx' BLURB='python -m blurb' + workingDirectory: '$(build.sourcesDirectory)/Doc' + displayName: 'Build documentation' + + - task: PublishBuildArtifacts@1 + displayName: 'Publish build' + inputs: + PathToPublish: '$(build.sourcesDirectory)/Doc/build' + ArtifactName: build + publishLocation: Container + + - task: PublishBuildArtifacts@1 + displayName: 'Publish dist' + inputs: + PathToPublish: '$(build.sourcesDirectory)/Doc/dist' + ArtifactName: dist + publishLocation: Container diff --git a/.vsts/docs.yml b/.vsts/docs.yml index 93a7282f770ab4e..9b84545415470cd 100644 --- a/.vsts/docs.yml +++ b/.vsts/docs.yml @@ -2,10 +2,6 @@ # https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted.md name: $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.rr) - -queue: - name: Hosted Linux Preview - trigger: branches: include: @@ -16,43 +12,49 @@ trigger: include: - Doc/* -#variables: - -steps: -- checkout: self - clean: true - fetchDepth: 5 - -- script: | - git fetch -q origin $(system.pullRequest.targetBranch) - if ! git diff --name-only HEAD $(git merge-base HEAD FETCH_HEAD) | grep -qE '(\.rst$|^Doc|^Misc)' - then - echo "No docs were updated, stopping build process." - echo "##vso[task.setvariable variable=NoDocs]true" - exit - fi - displayName: Detect doc-only changes - condition: and(succeeded(), variables['system.pullRequest.targetBranch']) - -- task: UsePythonVersion@0 - displayName: 'Use Python 3.6 or later' - inputs: - versionSpec: '>=3.6' - condition: and(succeeded(), ne(variables['NoDocs'], 'true')) - -- script: python -m pip install sphinx~=1.6.1 blurb python-docs-theme - displayName: 'Install build dependencies' - condition: and(succeeded(), ne(variables['NoDocs'], 'true')) - -- script: make check suspicious html PYTHON=python - workingDirectory: '$(build.sourcesDirectory)/Doc' - displayName: 'Build documentation' - condition: and(succeeded(), ne(variables['NoDocs'], 'true')) - -- task: PublishBuildArtifacts@1 - displayName: 'Publish build' - condition: and(and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')), ne(variables['NoDocs'], 'true')) - inputs: - PathToPublish: '$(build.sourcesDirectory)/Doc/build' - ArtifactName: build - publishLocation: Container +jobs: + +- job: docs + pool: + vmImage: 'Ubuntu 16.04' + + #variables: + + steps: + - checkout: self + clean: true + fetchDepth: 5 + + - script: | + git fetch -q origin $(system.pullRequest.targetBranch) + if ! git diff --name-only HEAD $(git merge-base HEAD FETCH_HEAD) | grep -qE '(\.rst$|^Doc|^Misc)' + then + echo "No docs were updated, stopping build process." + echo "##vso[task.setvariable variable=NoDocs]true" + exit + fi + displayName: Detect doc-only changes + condition: and(succeeded(), variables['system.pullRequest.targetBranch']) + + - task: UsePythonVersion@0 + displayName: 'Use Python 3.6 or later' + inputs: + versionSpec: '>=3.6' + condition: and(succeeded(), ne(variables['NoDocs'], 'true')) + + - script: python -m pip install sphinx~=1.6.1 blurb python-docs-theme + displayName: 'Install build dependencies' + condition: and(succeeded(), ne(variables['NoDocs'], 'true')) + + - script: make check suspicious html PYTHON=python + workingDirectory: '$(build.sourcesDirectory)/Doc' + displayName: 'Build documentation' + condition: and(succeeded(), ne(variables['NoDocs'], 'true')) + + - task: PublishBuildArtifacts@1 + displayName: 'Publish build' + condition: and(and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')), ne(variables['NoDocs'], 'true')) + inputs: + PathToPublish: '$(build.sourcesDirectory)/Doc/build' + ArtifactName: build + publishLocation: Container diff --git a/.vsts/linux-buildbot.yml b/.vsts/linux-buildbot.yml index fc2c8ca2486e1b4..976f0e7a365686b 100644 --- a/.vsts/linux-buildbot.yml +++ b/.vsts/linux-buildbot.yml @@ -2,10 +2,6 @@ # https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted.md name: $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.rr) - -queue: - name: Hosted Linux Preview - trigger: branches: include: @@ -17,56 +13,61 @@ trigger: - Doc/* - Tools/* -variables: - # Copy-pasted from linux-deps.yml until template support arrives - OPENSSL: 1.1.0g - OPENSSL_DIR: "$(build.sourcesDirectory)/multissl/openssl/$(OPENSSL)" +jobs: + +- job: linuxBuildBot + pool: + vmImage: 'Ubuntu 16.04' + variables: + # Copy-pasted from linux-deps.yml until template support arrives + OPENSSL: 1.1.0g + OPENSSL_DIR: "$(build.sourcesDirectory)/multissl/openssl/$(OPENSSL)" -steps: -- checkout: self - clean: true - fetchDepth: 5 + steps: + - checkout: self + clean: true + fetchDepth: 5 -#- template: linux-deps.yml + #- template: linux-deps.yml -# See https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted-templates.md -# For now, we copy/paste the steps -- script: echo "deb-src http://archive.ubuntu.com/ubuntu/ xenial main" > /etc/apt/sources.list.d/python.list && sudo apt-get update - displayName: 'Update apt-get lists' + # See https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted-templates.md + # For now, we copy/paste the steps + - script: sudo apt-get update + displayName: 'Update apt-get lists' -- script: echo ##vso[task.prependpath]$(OPENSSL_DIR) - displayName: 'Add $(OPENSSL_DIR) to PATH' -- script: > - sudo apt-get -yq install - build-essential - zlib1g-dev - libbz2-dev - liblzma-dev - libncurses5-dev - libreadline6-dev - libsqlite3-dev - libssl-dev - libgdbm-dev - tk-dev - lzma - lzma-dev - liblzma-dev - libffi-dev - uuid-dev - xvfb - displayName: 'Install dependencies' -- script: python3 Tools/ssl/multissltests.py --steps=library --base-directory $(build.sourcesDirectory)/multissl --openssl $(OPENSSL) --system Linux - displayName: 'python multissltests.py' + - script: echo ##vso[task.prependpath]$(OPENSSL_DIR) + displayName: 'Add $(OPENSSL_DIR) to PATH' + - script: > + sudo apt-get -yq install + build-essential + zlib1g-dev + libbz2-dev + liblzma-dev + libncurses5-dev + libreadline6-dev + libsqlite3-dev + libssl-dev + libgdbm-dev + tk-dev + lzma + lzma-dev + liblzma-dev + libffi-dev + uuid-dev + xvfb + displayName: 'Install dependencies' + - script: python3 Tools/ssl/multissltests.py --steps=library --base-directory $(build.sourcesDirectory)/multissl --openssl $(OPENSSL) --system Linux + displayName: 'python multissltests.py' -- script: ./configure --with-pydebug - displayName: 'Configure CPython (debug)' + - script: ./configure --with-pydebug + displayName: 'Configure CPython (debug)' -- script: make -s -j4 - displayName: 'Build CPython' + - script: make -s -j4 + displayName: 'Build CPython' -- script: make pythoninfo - displayName: 'Display build info' + - script: make pythoninfo + displayName: 'Display build info' -- script: xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu" - displayName: 'Tests' + - script: xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu" + displayName: 'Tests' diff --git a/.vsts/linux-coverage.yml b/.vsts/linux-coverage.yml index 1112555ab93f9b5..67400554eef4077 100644 --- a/.vsts/linux-coverage.yml +++ b/.vsts/linux-coverage.yml @@ -2,10 +2,6 @@ # https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted.md name: $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.rr) - -queue: - name: Hosted Linux Preview - trigger: branches: include: @@ -17,82 +13,88 @@ trigger: - Doc/* - Tools/* -variables: - # Copy-pasted from linux-deps.yml until template support arrives - OPENSSL: 1.1.0g - OPENSSL_DIR: "$(build.sourcesDirectory)/multissl/openssl/$(OPENSSL)" - -steps: -- checkout: self - clean: true - fetchDepth: 5 - -- script: | - git fetch -q origin $(system.pullRequest.targetBranch) - if ! git diff --name-only HEAD $(git merge-base HEAD FETCH_HEAD) | grep -qvE '(\.rst$|^Doc|^Misc)' - then - echo "Only docs were updated, stopping build process." - echo "##vso[task.setvariable variable=DocOnly]true" - exit - fi - displayName: Detect doc-only changes - condition: and(succeeded(), variables['system.pullRequest.targetBranch']) - -#- template: linux-deps.yml - -# See https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted-templates.md -# For now, we copy/paste the steps -- script: echo "deb-src http://archive.ubuntu.com/ubuntu/ xenial main" > /etc/apt/sources.list.d/python.list && sudo apt-get update - displayName: 'Update apt-get lists' - condition: and(succeeded(), ne(variables['DocOnly'], 'true')) - -- script: echo ##vso[task.prependpath]$(OPENSSL_DIR) - displayName: 'Add $(OPENSSL_DIR) to PATH' -- script: > - sudo apt-get -yq install - build-essential - zlib1g-dev - libbz2-dev - liblzma-dev - libncurses5-dev - libreadline6-dev - libsqlite3-dev - libssl-dev - libgdbm-dev - tk-dev - lzma - lzma-dev - liblzma-dev - libffi-dev - uuid-dev - xvfb - displayName: 'Install dependencies' - condition: and(succeeded(), ne(variables['DocOnly'], 'true')) -- script: python3 Tools/ssl/multissltests.py --steps=library --base-directory $(build.sourcesDirectory)/multissl --openssl $(OPENSSL) --system Linux - displayName: 'python multissltests.py' - condition: and(succeeded(), ne(variables['DocOnly'], 'true')) - - -- script: ./configure --with-pydebug - displayName: 'Configure CPython (debug)' - condition: and(succeeded(), ne(variables['DocOnly'], 'true')) - -- script: make -s -j4 - displayName: 'Build CPython' - condition: and(succeeded(), ne(variables['DocOnly'], 'true')) - -- script: ./python -m venv venv && ./venv/bin/python -m pip install -U coverage - displayName: 'Set up virtual environment' - condition: and(succeeded(), ne(variables['DocOnly'], 'true')) - -- script: ./venv/bin/python -m test.pythoninfo - displayName: 'Display build info' - condition: and(succeeded(), ne(variables['DocOnly'], 'true')) - -- script: xvfb-run ./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 - displayName: 'Tests with coverage' - condition: and(succeeded(), ne(variables['DocOnly'], 'true')) - -- script: source ./venv/bin/activate && bash <(curl -s https://codecov.io/bash) - displayName: 'Publish code coverage results' - condition: and(succeeded(), ne(variables['DocOnly'], 'true')) +jobs: + +- job: linuxCoverage + pool: + vmImage: 'Ubuntu 16.04' + + variables: + # Copy-pasted from linux-deps.yml until template support arrives + OPENSSL: 1.1.0g + OPENSSL_DIR: "$(build.sourcesDirectory)/multissl/openssl/$(OPENSSL)" + + steps: + - checkout: self + clean: true + fetchDepth: 5 + + - script: | + git fetch -q origin $(system.pullRequest.targetBranch) + if ! git diff --name-only HEAD $(git merge-base HEAD FETCH_HEAD) | grep -qvE '(\.rst$|^Doc|^Misc)' + then + echo "Only docs were updated, stopping build process." + echo "##vso[task.setvariable variable=DocOnly]true" + exit + fi + displayName: Detect doc-only changes + condition: and(succeeded(), variables['system.pullRequest.targetBranch']) + + #- template: linux-deps.yml + + # See https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted-templates.md + # For now, we copy/paste the steps + - script: sudo apt-get update + displayName: 'Update apt-get lists' + condition: and(succeeded(), ne(variables['DocOnly'], 'true')) + + - script: echo ##vso[task.prependpath]$(OPENSSL_DIR) + displayName: 'Add $(OPENSSL_DIR) to PATH' + - script: > + sudo apt-get -yq install + build-essential + zlib1g-dev + libbz2-dev + liblzma-dev + libncurses5-dev + libreadline6-dev + libsqlite3-dev + libssl-dev + libgdbm-dev + tk-dev + lzma + lzma-dev + liblzma-dev + libffi-dev + uuid-dev + xvfb + displayName: 'Install dependencies' + condition: and(succeeded(), ne(variables['DocOnly'], 'true')) + - script: python3 Tools/ssl/multissltests.py --steps=library --base-directory $(build.sourcesDirectory)/multissl --openssl $(OPENSSL) --system Linux + displayName: 'python multissltests.py' + condition: and(succeeded(), ne(variables['DocOnly'], 'true')) + + + - script: ./configure --with-pydebug + displayName: 'Configure CPython (debug)' + condition: and(succeeded(), ne(variables['DocOnly'], 'true')) + + - script: make -s -j4 + displayName: 'Build CPython' + condition: and(succeeded(), ne(variables['DocOnly'], 'true')) + + - script: ./python -m venv venv && ./venv/bin/python -m pip install -U coverage + displayName: 'Set up virtual environment' + condition: and(succeeded(), ne(variables['DocOnly'], 'true')) + + - script: ./venv/bin/python -m test.pythoninfo + displayName: 'Display build info' + condition: and(succeeded(), ne(variables['DocOnly'], 'true')) + + - script: xvfb-run ./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 + displayName: 'Tests with coverage' + condition: and(succeeded(), ne(variables['DocOnly'], 'true')) + + - script: source ./venv/bin/activate && bash <(curl -s https://codecov.io/bash) + displayName: 'Publish code coverage results' + condition: and(succeeded(), ne(variables['DocOnly'], 'true')) diff --git a/.vsts/linux-deps.yml b/.vsts/linux-deps.yml index 83b0b5961721d0c..20e638d44ff9f82 100644 --- a/.vsts/linux-deps.yml +++ b/.vsts/linux-deps.yml @@ -9,7 +9,7 @@ parameters: OPENSSL_DIR: "$(build.sourcesDirectory)/multissl/openssl/$(OPENSSL)" steps: -- script: echo "deb-src http://archive.ubuntu.com/ubuntu/ xenial main" > /etc/apt/sources.list.d/python.list && sudo apt-get update +- script: sudo apt-get update displayName: 'Update apt-get lists' - script: echo ##vso[task.prependpath]$(OPENSSL_DIR) diff --git a/.vsts/linux-pr.yml b/.vsts/linux-pr.yml index 145ebb38016a612..6d90b1574c4e106 100644 --- a/.vsts/linux-pr.yml +++ b/.vsts/linux-pr.yml @@ -2,10 +2,6 @@ # https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted.md name: $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.rr) - -queue: - name: Hosted Linux Preview - trigger: branches: include: @@ -17,82 +13,88 @@ trigger: - Doc/* - Tools/* -variables: - # Copy-pasted from linux-deps.yml until template support arrives - OPENSSL: 1.1.0g - OPENSSL_DIR: "$(build.sourcesDirectory)/multissl/openssl/$(OPENSSL)" - -steps: -- checkout: self - clean: true - fetchDepth: 5 - -- script: | - git fetch -q origin $(system.pullRequest.targetBranch) - if ! git diff --name-only HEAD $(git merge-base HEAD FETCH_HEAD) | grep -qvE '(\.rst$|^Doc|^Misc)' - then - echo "Only docs were updated, stopping build process." - echo "##vso[task.setvariable variable=DocOnly]true" - exit - fi - displayName: Detect doc-only changes - condition: and(succeeded(), variables['system.pullRequest.targetBranch']) - -#- template: linux-deps.yml - -# See https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted-templates.md -# For now, we copy/paste the steps -- script: echo "deb-src http://archive.ubuntu.com/ubuntu/ xenial main" > /etc/apt/sources.list.d/python.list && sudo apt-get update - displayName: 'Update apt-get lists' - condition: and(succeeded(), ne(variables['DocOnly'], 'true')) - -- script: echo ##vso[task.prependpath]$(OPENSSL_DIR) - displayName: 'Add $(OPENSSL_DIR) to PATH' - condition: and(succeeded(), ne(variables['DocOnly'], 'true')) - -- script: > - sudo apt-get -yq install - build-essential - zlib1g-dev - libbz2-dev - liblzma-dev - libncurses5-dev - libreadline6-dev - libsqlite3-dev - libssl-dev - libgdbm-dev - tk-dev - lzma - lzma-dev - liblzma-dev - libffi-dev - uuid-dev - xvfb - displayName: 'Install dependencies' - condition: and(succeeded(), ne(variables['DocOnly'], 'true')) - -- script: python3 Tools/ssl/multissltests.py --steps=library --base-directory $(build.sourcesDirectory)/multissl --openssl $(OPENSSL) --system Linux - displayName: 'python multissltests.py' - condition: and(succeeded(), ne(variables['DocOnly'], 'true')) - - -- script: ./configure --with-pydebug - displayName: 'Configure CPython (debug)' - condition: and(succeeded(), ne(variables['DocOnly'], 'true')) - -- script: make -s -j4 - displayName: 'Build CPython' - condition: and(succeeded(), ne(variables['DocOnly'], 'true')) - -- script: make pythoninfo - displayName: 'Display build info' - condition: and(succeeded(), ne(variables['DocOnly'], 'true')) - -# Run patchcheck and fail if anything is discovered -- script: ./python Tools/scripts/patchcheck.py --travis true - displayName: 'Run patchcheck.py' - condition: and(succeeded(), ne(variables['DocOnly'], 'true')) - -- script: xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu" - displayName: 'Tests' - condition: and(succeeded(), ne(variables['DocOnly'], 'true')) +jobs: + +- job: linuxPR + pool: + vmImage: 'Ubuntu 16.04' + + variables: + # Copy-pasted from linux-deps.yml until template support arrives + OPENSSL: 1.1.0g + OPENSSL_DIR: "$(build.sourcesDirectory)/multissl/openssl/$(OPENSSL)" + + steps: + - checkout: self + clean: true + fetchDepth: 5 + + - script: | + git fetch -q origin $(system.pullRequest.targetBranch) + if ! git diff --name-only HEAD $(git merge-base HEAD FETCH_HEAD) | grep -qvE '(\.rst$|^Doc|^Misc)' + then + echo "Only docs were updated, stopping build process." + echo "##vso[task.setvariable variable=DocOnly]true" + exit + fi + displayName: Detect doc-only changes + condition: and(succeeded(), variables['system.pullRequest.targetBranch']) + + #- template: linux-deps.yml + + # See https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted-templates.md + # For now, we copy/paste the steps + - script: sudo apt-get update + displayName: 'Update apt-get lists' + condition: and(succeeded(), ne(variables['DocOnly'], 'true')) + + - script: echo ##vso[task.prependpath]$(OPENSSL_DIR) + displayName: 'Add $(OPENSSL_DIR) to PATH' + condition: and(succeeded(), ne(variables['DocOnly'], 'true')) + + - script: > + sudo apt-get -yq install + build-essential + zlib1g-dev + libbz2-dev + liblzma-dev + libncurses5-dev + libreadline6-dev + libsqlite3-dev + libssl-dev + libgdbm-dev + tk-dev + lzma + lzma-dev + liblzma-dev + libffi-dev + uuid-dev + xvfb + displayName: 'Install dependencies' + condition: and(succeeded(), ne(variables['DocOnly'], 'true')) + + - script: python3 Tools/ssl/multissltests.py --steps=library --base-directory $(build.sourcesDirectory)/multissl --openssl $(OPENSSL) --system Linux + displayName: 'python multissltests.py' + condition: and(succeeded(), ne(variables['DocOnly'], 'true')) + + + - script: ./configure --with-pydebug + displayName: 'Configure CPython (debug)' + condition: and(succeeded(), ne(variables['DocOnly'], 'true')) + + - script: make -s -j4 + displayName: 'Build CPython' + condition: and(succeeded(), ne(variables['DocOnly'], 'true')) + + - script: make pythoninfo + displayName: 'Display build info' + condition: and(succeeded(), ne(variables['DocOnly'], 'true')) + + # Run patchcheck and fail if anything is discovered + - script: ./python Tools/scripts/patchcheck.py --travis true + displayName: 'Run patchcheck.py' + condition: and(succeeded(), ne(variables['DocOnly'], 'true')) + + - script: xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu" + displayName: 'Tests' + condition: and(succeeded(), ne(variables['DocOnly'], 'true')) diff --git a/.vsts/macos-buildbot.yml b/.vsts/macos-buildbot.yml index d9b2297283b0a86..576ea332363ab39 100644 --- a/.vsts/macos-buildbot.yml +++ b/.vsts/macos-buildbot.yml @@ -2,10 +2,6 @@ # https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted.md name: $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.rr) - -queue: - name: Hosted macOS Preview - trigger: branches: include: @@ -17,21 +13,27 @@ trigger: - Doc/* - Tools/* -#variables: +jobs: + +- job: macOSBuildBot + pool: + vmImage: 'macOS 10.13' + + #variables: -steps: -- checkout: self - clean: true - fetchDepth: 5 + steps: + - checkout: self + clean: true + fetchDepth: 5 -- script: ./configure --with-pydebug --with-openssl=/usr/local/opt/openssl --prefix=/opt/python-vsts - displayName: 'Configure CPython (debug)' + - script: ./configure --with-pydebug --with-openssl=/usr/local/opt/openssl --prefix=/opt/python-vsts + displayName: 'Configure CPython (debug)' -- script: make -s -j4 - displayName: 'Build CPython' + - script: make -s -j4 + displayName: 'Build CPython' -- script: make pythoninfo - displayName: 'Display build info' + - script: make pythoninfo + displayName: 'Display build info' -- script: make buildbottest TESTOPTS="-j4 -uall,-cpu" - displayName: 'Tests' + - script: make buildbottest TESTOPTS="-j4 -uall,-cpu" + displayName: 'Tests' diff --git a/.vsts/macos-pr.yml b/.vsts/macos-pr.yml index a3fd4487ed3a703..c0fe111e08443d5 100644 --- a/.vsts/macos-pr.yml +++ b/.vsts/macos-pr.yml @@ -2,10 +2,6 @@ # https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted.md name: $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.rr) - -queue: - name: Hosted macOS Preview - trigger: branches: include: @@ -17,39 +13,45 @@ trigger: - Doc/* - Tools/* -#variables: - -steps: -- checkout: self - clean: true - fetchDepth: 5 - -- script: | - git fetch -q origin $(system.pullRequest.targetBranch) - changes = $(git diff --name-only HEAD $(git merge-base HEAD FETCH_HEAD)) - echo "Files changed:" - echo "$changes" - if ! echo "$changes" | grep -qvE '(\.rst$)|(^Doc)|(^Misc)' - then - echo "Only docs were updated, stopping build process." - echo "##vso[task.setvariable variable=DocOnly]true" - exit - fi - displayName: Detect doc-only changes - condition: and(succeeded(), variables['system.pullRequest.targetBranch']) - -- script: ./configure --with-pydebug --with-openssl=/usr/local/opt/openssl --prefix=/opt/python-vsts - displayName: 'Configure CPython (debug)' - condition: and(succeeded(), ne(variables['DocOnly'], 'true')) - -- script: make -s -j4 - displayName: 'Build CPython' - condition: and(succeeded(), ne(variables['DocOnly'], 'true')) - -- script: make pythoninfo - displayName: 'Display build info' - condition: and(succeeded(), ne(variables['DocOnly'], 'true')) - -- script: make buildbottest TESTOPTS="-j4 -uall,-cpu" - displayName: 'Tests' - condition: and(succeeded(), ne(variables['DocOnly'], 'true')) +jobs: + +- job: macOSPR + pool: + vmImage: 'macOS 10.13' + + #variables: + + steps: + - checkout: self + clean: true + fetchDepth: 5 + + - script: | + git fetch -q origin $(system.pullRequest.targetBranch) + changes = $(git diff --name-only HEAD $(git merge-base HEAD FETCH_HEAD)) + echo "Files changed:" + echo "$changes" + if ! echo "$changes" | grep -qvE '(\.rst$)|(^Doc)|(^Misc)' + then + echo "Only docs were updated, stopping build process." + echo "##vso[task.setvariable variable=DocOnly]true" + exit + fi + displayName: Detect doc-only changes + condition: and(succeeded(), variables['system.pullRequest.targetBranch']) + + - script: ./configure --with-pydebug --with-openssl=/usr/local/opt/openssl --prefix=/opt/python-vsts + displayName: 'Configure CPython (debug)' + condition: and(succeeded(), ne(variables['DocOnly'], 'true')) + + - script: make -s -j4 + displayName: 'Build CPython' + condition: and(succeeded(), ne(variables['DocOnly'], 'true')) + + - script: make pythoninfo + displayName: 'Display build info' + condition: and(succeeded(), ne(variables['DocOnly'], 'true')) + + - script: make buildbottest TESTOPTS="-j4 -uall,-cpu" + displayName: 'Tests' + condition: and(succeeded(), ne(variables['DocOnly'], 'true')) diff --git a/.vsts/windows-buildbot.yml b/.vsts/windows-buildbot.yml index 5ec4522796cea90..7dff20b42019141 100644 --- a/.vsts/windows-buildbot.yml +++ b/.vsts/windows-buildbot.yml @@ -2,18 +2,6 @@ # https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted.md name: $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.rr) - -queue: - name: Hosted VS2017 - parallel: 2 - matrix: - amd64: - buildOpt: -p x64 - outDirSuffix: amd64 - win32: - buildOpt: - outDirSuffix: win32 - trigger: branches: include: @@ -25,25 +13,40 @@ trigger: - Doc/* - Tools/* -variables: - # Relocate build outputs outside of source directory to make cleaning faster - Py_IntDir: $(Build.BinariesDirectory)\obj - # UNDONE: Do not build to a different directory because of broken tests - Py_OutDir: $(Build.SourcesDirectory)\PCbuild - EXTERNAL_DIR: $(Build.BinariesDirectory)\externals - -steps: -- checkout: self - clean: true - fetchDepth: 5 - -- script: PCbuild\build.bat -e $(buildOpt) - displayName: 'Build CPython' - -- script: python.bat -m test.pythoninfo - displayName: 'Display build info' - -- script: PCbuild\rt.bat -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0 - displayName: 'Tests' - env: - PREFIX: $(Py_OutDir)\$(outDirSuffix) +jobs: + +- job: windowsBuildBot + pool: + vmImage: 'vs2017-win2016' + strategy: + maxParallel: 2 + matrix: + amd64: + buildOpt: -p x64 + outDirSuffix: amd64 + win32: + buildOpt: + outDirSuffix: win32 + + variables: + # Relocate build outputs outside of source directory to make cleaning faster + Py_IntDir: $(Build.BinariesDirectory)\obj + # UNDONE: Do not build to a different directory because of broken tests + Py_OutDir: $(Build.SourcesDirectory)\PCbuild + EXTERNAL_DIR: $(Build.BinariesDirectory)\externals + + steps: + - checkout: self + clean: true + fetchDepth: 5 + + - script: PCbuild\build.bat -e $(buildOpt) + displayName: 'Build CPython' + + - script: python.bat -m test.pythoninfo + displayName: 'Display build info' + + - script: PCbuild\rt.bat -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0 + displayName: 'Tests' + env: + PREFIX: $(Py_OutDir)\$(outDirSuffix) diff --git a/.vsts/windows-pr.yml b/.vsts/windows-pr.yml index 3dd5609a32e514d..1b933936ed7c262 100644 --- a/.vsts/windows-pr.yml +++ b/.vsts/windows-pr.yml @@ -2,18 +2,6 @@ # https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted.md name: $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.rr) - -queue: - name: Hosted VS2017 - parallel: 2 - matrix: - amd64: - buildOpt: -p x64 - outDirSuffix: amd64 - win32: - buildOpt: - outDirSuffix: win32 - trigger: branches: include: @@ -25,37 +13,52 @@ trigger: - Doc/* - Tools/* -variables: - # Relocate build outputs outside of source directory to make cleaning faster - Py_IntDir: $(Build.BinariesDirectory)\obj - # UNDONE: Do not build to a different directory because of broken tests - Py_OutDir: $(Build.SourcesDirectory)\PCbuild - EXTERNAL_DIR: $(Build.BinariesDirectory)\externals - -steps: -- checkout: self - clean: true - fetchDepth: 5 - -- powershell: | - git fetch -q origin $(System.PullRequest.TargetBranch) - if (-not (git diff --name-only HEAD (git merge-base HEAD FETCH_HEAD) | sls -NotMatch '(\.rst$)|(^Doc)|(^Misc)')) { - Write-Host 'Only docs were updated. Skipping build' - Write-Host '##vso[task.setvariable variable=DocOnly]true' - } - displayName: Detect doc-only changes - condition: and(succeeded(), variables['System.PullRequest.TargetBranch']) - -- script: PCbuild\build.bat -e $(buildOpt) - displayName: 'Build CPython' - condition: and(succeeded(), ne(variables['DocOnly'], 'true')) - -- script: python.bat -m test.pythoninfo - displayName: 'Display build info' - condition: and(succeeded(), ne(variables['DocOnly'], 'true')) - -- script: PCbuild\rt.bat -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0 - displayName: 'Tests' - env: - PREFIX: $(Py_OutDir)\$(outDirSuffix) - condition: and(succeeded(), ne(variables['DocOnly'], 'true')) +jobs: + +- job: windowsPR + pool: + vmImage: 'vs2017-win2016' + strategy: + maxParallel: 2 + matrix: + amd64: + buildOpt: -p x64 + outDirSuffix: amd64 + win32: + buildOpt: + outDirSuffix: win32 + + variables: + # Relocate build outputs outside of source directory to make cleaning faster + Py_IntDir: $(Build.BinariesDirectory)\obj + # UNDONE: Do not build to a different directory because of broken tests + Py_OutDir: $(Build.SourcesDirectory)\PCbuild + EXTERNAL_DIR: $(Build.BinariesDirectory)\externals + + steps: + - checkout: self + clean: true + fetchDepth: 5 + + - powershell: | + git fetch -q origin $(System.PullRequest.TargetBranch) + if (-not (git diff --name-only HEAD (git merge-base HEAD FETCH_HEAD) | sls -NotMatch '(\.rst$)|(^Doc)|(^Misc)')) { + Write-Host 'Only docs were updated. Skipping build' + Write-Host '##vso[task.setvariable variable=DocOnly]true' + } + displayName: Detect doc-only changes + condition: and(succeeded(), variables['System.PullRequest.TargetBranch']) + + - script: PCbuild\build.bat -e $(buildOpt) + displayName: 'Build CPython' + condition: and(succeeded(), ne(variables['DocOnly'], 'true')) + + - script: python.bat -m test.pythoninfo + displayName: 'Display build info' + condition: and(succeeded(), ne(variables['DocOnly'], 'true')) + + - script: PCbuild\rt.bat -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0 + displayName: 'Tests' + env: + PREFIX: $(Py_OutDir)\$(outDirSuffix) + condition: and(succeeded(), ne(variables['DocOnly'], 'true')) diff --git a/Misc/NEWS.d/next/Build/2018-09-05-19-58-20.bpo-34582.8Shyl4.rst b/Misc/NEWS.d/next/Build/2018-09-05-19-58-20.bpo-34582.8Shyl4.rst new file mode 100644 index 000000000000000..c60d182bb971df1 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2018-09-05-19-58-20.bpo-34582.8Shyl4.rst @@ -0,0 +1,2 @@ +The latest YAML syntax is adopted for VSTS build pipelines. Also, new hosted +agent pools are used for better performance.