From 3bfa52d46a787ea0a88730803a98c74f4f9a1172 Mon Sep 17 00:00:00 2001 From: Benjamin Winkel Date: Thu, 9 Jan 2020 17:15:09 +0100 Subject: [PATCH 1/5] start adding azure support --- azure-pipelines.yml | 263 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 263 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..d22af1d1c --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,263 @@ +trigger: + tags: + include: + - v* + branches: + include: + - master + +pr: +- master + +variables: + package_name: pycraf + is.tag: ${{ startsWith(variables['Build.SourceBranch'], 'refs/tags/') }} + publish.wheels: ${{ startsWith(variables['Build.SourceBranch'], 'refs/tags/') }} + is.pullrequest: ${{ startsWith(variables['Build.Reason'], 'PullRequest') }} + # is.tag: ${{ true }} + # publish.wheels: ${{ true }} + # why is the following not working? + is.linux: ${{ startsWith(variables['Agent.OS'], 'Linux') }} + is.macos: ${{ startsWith(variables['Agent.OS'], 'Darwin') }} + is.win: ${{ startsWith(variables['Agent.OS'], 'Windows') }} + +jobs: + +- job: + displayName: Job + + variables: + arch: x86_64 + plat: manylinux2010_x86_64 + image: quay.io/pypa/manylinux2010_x86_64 + # for very old systems, the following would also be an alternative: + # plat: manylinux1_x86_64 + # image: skhep/manylinuxgcc-x86_64 + python.architecture: x64 + ${{ if eq(variables['is.win'], true) }}: + srtmdata: ${{ format('{0}\srtm', variables['Agent.BuildDirectory']) }} + ${{ if eq(variables['is.win'], false) }}: + srtmdata: ${{ format('{0}/srtm', variables['Agent.BuildDirectory']) }} + + strategy: + matrix: + linux35: + imageName: 'ubuntu-16.04' + python.version: '3.5' + py_whl: 35 + numpy.version: '1.13.1' + linux36: + imageName: 'ubuntu-16.04' + python.version: '3.6' + py_whl: 36 + numpy.version: '1.13.1' + # docs should only be published by one thread, as they are version- + # independent; and only if not on a PR + publish.docs: ${{ not(eq(variables['is.pullrequest'], true)) }} + ${{ if eq(variables['is.tag'], true) }}: + docs.target: '.' + ${{ if eq(variables['is.tag'], false) }}: + docs.target: 'latest' + # tarball should only be published by one thread, as it is version- + # independent + build.tarball: ${{ true }} + publish.tarball: ${{ eq(variables['is.tag'], true) }} + linux37: + imageName: 'ubuntu-16.04' + python.version: '3.7' + py_whl: 37 + numpy.version: '1.14.5' + linux38: + imageName: 'ubuntu-16.04' + python.version: '3.8' + py_whl: 38 + numpy.version: '1.14.5' + mac35: + imageName: 'macos-10.13' + python.version: '3.5' + numpy.version: '1.13.1' + mac36: + imageName: 'macos-10.13' + python.version: '3.6' + numpy.version: '1.13.1' + mac37: + imageName: 'macos-10.13' + python.version: '3.7' + numpy.version: '1.14.5' + mac38: + imageName: 'macos-10.13' + python.version: '3.8' + numpy.version: '1.14.5' + win35: + imageName: 'vs2017-win2016' + python.version: '3.5' + numpy.version: '1.13.1' + win36: + imageName: 'vs2017-win2016' + python.version: '3.6' + numpy.version: '1.13.1' + win37: + imageName: 'vs2017-win2016' + python.version: '3.7' + numpy.version: '1.14.5' + win38: + imageName: 'vs2017-win2016' + python.version: '3.8' + numpy.version: '1.14.5' + + pool: + vmImage: $(imageName) + + steps: + + - bash: | + echo "##vso[task.prependpath]$CONDA/bin" + echo "##vso[task.setvariable variable=conda.activate]source activate" + displayName: Add conda to PATH, Linux/MacOS + # condition: not(eq(variables['is.win'], true)) + condition: not(startsWith(variables['Agent.OS'], 'Windows')) + + - powershell: | + Write-Host "##vso[task.prependpath]$env:CONDA\Scripts" + echo "##vso[task.setvariable variable=conda.activate]call activate" + displayName: Add conda to PATH, Windows + # condition: eq(variables['is.win'], true) + condition: startsWith(variables['Agent.OS'], 'Windows') + + - script: | + echo "Build.SourceBranch" $(Build.SourceBranch) + echo "Agent.OS" $(Agent.OS) "/" ${{ variables['Agent.OS'] }} + echo "is.linux" $(is.linux) "/" ${{ variables['is.linux'] }} + echo "is.macos" $(is.macos) "/" ${{ variables['is.macos'] }} + echo "is.win" $(is.win) "/" ${{ variables['is.win'] }} + echo "srtmdata" $(srtmdata) + echo "conda.activate" $(conda.activate) + echo "is.tag" $(is.tag) + echo "publish.docs" $(publish.docs) + echo "is.pullrequest" $(is.pullrequest) + echo "docs.target" $(docs.target) + echo "publish.wheels" $(publish.wheels) + echo "python.version" $(python.version) + echo "py_whl" $(py_whl) + echo "numpy.version" $(numpy.version) + echo "imageName" $(imageName) + displayName: Show Vars + + - script: conda create --yes --quiet --name pycraf-env -c conda-forge + displayName: Create Anaconda environment + + # note: with project.toml it should not be necessary to have cython + # installed already, but on PRs building wheels and the tarball still fails + # for some reason!? therefore, we add it here (should also be faster than + # pip installation) + - script: | + $(conda.activate) pycraf-env + conda install --yes --quiet -c conda-forge python=$(python.version) cython h5py matplotlib numpy==$(numpy.version) pip pyproj<2 pyqt>=5 pytest pytest-astropy pytest-doctestplus pytest-qt scipy sgp4 sphinx-astropy twine wheel + displayName: Install Anaconda packages + + # need to fix cctools and ld64 to slightly older version, otherwise an + # error ("ld: library not found for -lSystem") occurs during build + - script: | + $(conda.activate) pycraf-env + conda install --yes --quiet --name pycraf-env -c conda-forge clang_osx-64 clangxx_osx-64 llvm-openmp openmp cctools==921 ld64==409.12 + displayName: Prepare clang, MacOS + # condition: and(succeeded(), eq(variables['is.macos'], true)) + condition: and(succeeded(), startsWith(variables['Agent.OS'], 'Darwin')) + + - script: | + $(conda.activate) pycraf-env + pip install -e . + displayName: Building + + - script: | + $(conda.activate) pycraf-env + pip install pytest-azurepipelines + pytest -rsx --doctest-rst docs pycraf + displayName: Testing + + - script: | + $(conda.activate) pycraf-env + conda install --yes --quiet --name pycraf-env -c conda-forge astropy sphinx-astropy + sphinx-build docs docs/_build/html -W -b html + displayName: Make docs + condition: succeeded() + + - task: DownloadSecureFile@1 + inputs: + secureFile: ghpages_deploy_key + displayName: 'Get the deploy key' + condition: and(succeeded(), eq(variables['publish.docs'], true)) + + - bash: | + mkdir ~/.ssh && mv $DOWNLOADSECUREFILE_SECUREFILEPATH ~/.ssh/id_rsa + chmod 700 ~/.ssh && chmod 600 ~/.ssh/id_rsa + ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts + mkdir gh_pages && cd gh_pages + git init + git config --local user.name "Benjamin Winkel" + git config --local user.email "bwinkel@mpifr.de" + git remote add github git@github.com:bwinkel/pycraf.git + git fetch github gh-pages + git checkout --track github/gh-pages + # mkdir -p ./$DOCS_TARGET + rsync -av ../docs/_build/html/ ${DOCS_TARGET}/ + docs_version=$(python -c "import pycraf; print(pycraf.__version__)") + git add -A && git commit -m "Update docs for $docs_version ***NO_CI***" + bash ../retry.sh git push github + displayName: Publish docs + condition: and(succeeded(), eq(variables['publish.docs'], true)) + + - task: TwineAuthenticate@1 + inputs: + pythonUploadServiceConnection: pypi + displayName: 'Twine Authenticate' + + - bash: | + docker run -e NPY_NUM_BUILD_JOBS=4 -e PLAT=$(plat) -e package_name=$(package_name) -e py_whl=$(py_whl) --rm -v `pwd`:/io $(image) /io/.ci/build-wheels.sh + ls -lh wheelhouse/ + mkdir -p dist + cp wheelhouse/$(package_name)*.whl dist/. + ls dist + displayName: Build wheels, Linux + condition: and(succeeded(), startsWith(variables['Agent.OS'], 'Linux')) + + - script: | + $(conda.activate) pycraf-env + python setup.py bdist_wheel + displayName: Build wheels, MacOS/Windows + condition: and(succeeded(), not(startsWith(variables['Agent.OS'], 'Linux'))) + + # twine upload with python 3.5 doesn't work? + # (pkg_resources.DistributionNotFound: The 'readme-renderer>=21.0' distribution was not found) + # will use system python for upload + - task: UsePythonVersion@0 + inputs: + versionSpec: '3.6' + + - script: | + pip install twine + python -m twine upload -r "pypi" --config-file $(PYPIRC_PATH) dist/*.whl + displayName: Upload wheels, Linux/MacOS + condition: and(succeeded(), eq(variables['publish.wheels'], true), not(startsWith(variables['Agent.OS'], 'Windows'))) + + - script: | + pip install twine + python -m twine upload -r "pypi" --config-file %PYPIRC_PATH% dist/*.whl + displayName: Upload wheels, Windows + condition: and(succeeded(), eq(variables['publish.wheels'], true), startsWith(variables['Agent.OS'], 'Windows')) + + - script: | + $(conda.activate) pycraf-env + python setup.py sdist + displayName: Build tarball + condition: and(succeeded(), eq(variables['build.tarball'], true)) + + - script: | + $(conda.activate) pycraf-env + python -m twine upload -r "pypi" --config-file $(PYPIRC_PATH) dist/*.tar.gz + displayName: Upload tarball + condition: and(succeeded(), eq(variables['publish.tarball'], true)) + + - script: rm ~/.ssh/id_rsa || true + displayName: 'Cleanup docs deploy key' + condition: and(always(), eq(variables['publish.docs'], true)) From 8f6c864f256e34b497571713c6415a08a5dff64f Mon Sep 17 00:00:00 2001 From: Benjamin Winkel Date: Thu, 9 Jan 2020 17:33:13 +0100 Subject: [PATCH 2/5] update deploy key file name (gh-pages) --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d22af1d1c..8f42c0377 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -184,7 +184,7 @@ jobs: - task: DownloadSecureFile@1 inputs: - secureFile: ghpages_deploy_key + secureFile: ghpages_deploy_key_pycraf displayName: 'Get the deploy key' condition: and(succeeded(), eq(variables['publish.docs'], true)) From 2a35147fe37d3d686ca11a15bd80f9193971bc63 Mon Sep 17 00:00:00 2001 From: Benjamin Winkel Date: Thu, 9 Jan 2020 17:48:43 +0100 Subject: [PATCH 3/5] work on azure.yml --- azure-pipelines.yml | 80 ++++++++++++++++++++++----------------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8f42c0377..efa54d626 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -41,11 +41,11 @@ jobs: strategy: matrix: - linux35: - imageName: 'ubuntu-16.04' - python.version: '3.5' - py_whl: 35 - numpy.version: '1.13.1' + # linux35: + # imageName: 'ubuntu-16.04' + # python.version: '3.5' + # py_whl: 35 + # numpy.version: '1.13.1' linux36: imageName: 'ubuntu-16.04' python.version: '3.6' @@ -62,48 +62,48 @@ jobs: # independent build.tarball: ${{ true }} publish.tarball: ${{ eq(variables['is.tag'], true) }} - linux37: - imageName: 'ubuntu-16.04' - python.version: '3.7' - py_whl: 37 - numpy.version: '1.14.5' - linux38: - imageName: 'ubuntu-16.04' - python.version: '3.8' - py_whl: 38 - numpy.version: '1.14.5' - mac35: - imageName: 'macos-10.13' - python.version: '3.5' - numpy.version: '1.13.1' + # linux37: + # imageName: 'ubuntu-16.04' + # python.version: '3.7' + # py_whl: 37 + # numpy.version: '1.14.5' + # linux38: + # imageName: 'ubuntu-16.04' + # python.version: '3.8' + # py_whl: 38 + # numpy.version: '1.14.5' + # mac35: + # imageName: 'macos-10.13' + # python.version: '3.5' + # numpy.version: '1.13.1' mac36: imageName: 'macos-10.13' python.version: '3.6' numpy.version: '1.13.1' - mac37: - imageName: 'macos-10.13' - python.version: '3.7' - numpy.version: '1.14.5' - mac38: - imageName: 'macos-10.13' - python.version: '3.8' - numpy.version: '1.14.5' - win35: - imageName: 'vs2017-win2016' - python.version: '3.5' - numpy.version: '1.13.1' + # mac37: + # imageName: 'macos-10.13' + # python.version: '3.7' + # numpy.version: '1.14.5' + # mac38: + # imageName: 'macos-10.13' + # python.version: '3.8' + # numpy.version: '1.14.5' + # win35: + # imageName: 'vs2017-win2016' + # python.version: '3.5' + # numpy.version: '1.13.1' win36: imageName: 'vs2017-win2016' python.version: '3.6' numpy.version: '1.13.1' - win37: - imageName: 'vs2017-win2016' - python.version: '3.7' - numpy.version: '1.14.5' - win38: - imageName: 'vs2017-win2016' - python.version: '3.8' - numpy.version: '1.14.5' + # win37: + # imageName: 'vs2017-win2016' + # python.version: '3.7' + # numpy.version: '1.14.5' + # win38: + # imageName: 'vs2017-win2016' + # python.version: '3.8' + # numpy.version: '1.14.5' pool: vmImage: $(imageName) @@ -152,7 +152,7 @@ jobs: # pip installation) - script: | $(conda.activate) pycraf-env - conda install --yes --quiet -c conda-forge python=$(python.version) cython h5py matplotlib numpy==$(numpy.version) pip pyproj<2 pyqt>=5 pytest pytest-astropy pytest-doctestplus pytest-qt scipy sgp4 sphinx-astropy twine wheel + conda install --yes --quiet -c conda-forge python=$(python.version) cython h5py matplotlib numpy==$(numpy.version) pip 'pyproj<2' 'pyqt>=5' pytest pytest-astropy pytest-doctestplus pytest-qt scipy sgp4 sphinx-astropy twine wheel displayName: Install Anaconda packages # need to fix cctools and ld64 to slightly older version, otherwise an From c68f007b8dce16847dde50dc78d639ad281d6e19 Mon Sep 17 00:00:00 2001 From: Benjamin Winkel Date: Thu, 9 Jan 2020 18:01:45 +0100 Subject: [PATCH 4/5] pin astropy to <4 for now, as they changed constants (-->many tests fail) --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index efa54d626..469c32532 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -152,7 +152,7 @@ jobs: # pip installation) - script: | $(conda.activate) pycraf-env - conda install --yes --quiet -c conda-forge python=$(python.version) cython h5py matplotlib numpy==$(numpy.version) pip 'pyproj<2' 'pyqt>=5' pytest pytest-astropy pytest-doctestplus pytest-qt scipy sgp4 sphinx-astropy twine wheel + conda install --yes --quiet -c conda-forge python=$(python.version) astropy=3 cython h5py matplotlib numpy==$(numpy.version) pip 'pyproj<2' 'pyqt>=5' pytest pytest-astropy pytest-doctestplus pytest-qt scipy sgp4 sphinx-astropy twine wheel displayName: Install Anaconda packages # need to fix cctools and ld64 to slightly older version, otherwise an From 487b562be9c998ea5a307fdd0a1c775eb6647d20 Mon Sep 17 00:00:00 2001 From: Benjamin Winkel Date: Thu, 9 Jan 2020 18:17:26 +0100 Subject: [PATCH 5/5] work on azure --- azure-pipelines.yml | 183 +++++++++++++++++++++++--------------------- 1 file changed, 96 insertions(+), 87 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 469c32532..b187425af 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -17,7 +17,7 @@ variables: # is.tag: ${{ true }} # publish.wheels: ${{ true }} # why is the following not working? - is.linux: ${{ startsWith(variables['Agent.OS'], 'Linux') }} + is.linux: $[ startsWith(variables['Agent.OS'], 'Linux') ] is.macos: ${{ startsWith(variables['Agent.OS'], 'Darwin') }} is.win: ${{ startsWith(variables['Agent.OS'], 'Windows') }} @@ -34,10 +34,10 @@ jobs: # plat: manylinux1_x86_64 # image: skhep/manylinuxgcc-x86_64 python.architecture: x64 - ${{ if eq(variables['is.win'], true) }}: - srtmdata: ${{ format('{0}\srtm', variables['Agent.BuildDirectory']) }} - ${{ if eq(variables['is.win'], false) }}: + ${{ if not(startsWith(variables['Agent.OS'], 'Windows')) }}: srtmdata: ${{ format('{0}/srtm', variables['Agent.BuildDirectory']) }} + ${{ if startsWith(variables['Agent.OS'], 'Windows') }}: + srtmdata: ${{ format('{0}\srtm', variables['Agent.BuildDirectory']) }} strategy: matrix: @@ -51,6 +51,7 @@ jobs: python.version: '3.6' py_whl: 36 numpy.version: '1.13.1' + astropy.version: '3.0' # docs should only be published by one thread, as they are version- # independent; and only if not on a PR publish.docs: ${{ not(eq(variables['is.pullrequest'], true)) }} @@ -62,11 +63,12 @@ jobs: # independent build.tarball: ${{ true }} publish.tarball: ${{ eq(variables['is.tag'], true) }} - # linux37: - # imageName: 'ubuntu-16.04' - # python.version: '3.7' - # py_whl: 37 - # numpy.version: '1.14.5' + linux37: + imageName: 'ubuntu-16.04' + python.version: '3.7' + py_whl: 37 + numpy.version: '1.16' + astropy.version: '4.0' # linux38: # imageName: 'ubuntu-16.04' # python.version: '3.8' @@ -80,6 +82,7 @@ jobs: imageName: 'macos-10.13' python.version: '3.6' numpy.version: '1.13.1' + astropy.version: '3' # mac37: # imageName: 'macos-10.13' # python.version: '3.7' @@ -96,10 +99,12 @@ jobs: imageName: 'vs2017-win2016' python.version: '3.6' numpy.version: '1.13.1' - # win37: - # imageName: 'vs2017-win2016' - # python.version: '3.7' - # numpy.version: '1.14.5' + astropy.version: '3' + win37: + imageName: 'vs2017-win2016' + python.version: '3.7' + numpy.version: '1.16' + astropy.version: '4.0' # win38: # imageName: 'vs2017-win2016' # python.version: '3.8' @@ -126,7 +131,8 @@ jobs: - script: | echo "Build.SourceBranch" $(Build.SourceBranch) - echo "Agent.OS" $(Agent.OS) "/" ${{ variables['Agent.OS'] }} + echo "Agent.BuildDirectory" $(Agent.BuildDirectory) + echo "Agent.OS" $(Agent.OS) "/" $[ variables['Agent.OS'] ] echo "is.linux" $(is.linux) "/" ${{ variables['is.linux'] }} echo "is.macos" $(is.macos) "/" ${{ variables['is.macos'] }} echo "is.win" $(is.win) "/" ${{ variables['is.win'] }} @@ -140,6 +146,7 @@ jobs: echo "python.version" $(python.version) echo "py_whl" $(py_whl) echo "numpy.version" $(numpy.version) + echo "astropy.version" $(astropy.version) echo "imageName" $(imageName) displayName: Show Vars @@ -152,7 +159,7 @@ jobs: # pip installation) - script: | $(conda.activate) pycraf-env - conda install --yes --quiet -c conda-forge python=$(python.version) astropy=3 cython h5py matplotlib numpy==$(numpy.version) pip 'pyproj<2' 'pyqt>=5' pytest pytest-astropy pytest-doctestplus pytest-qt scipy sgp4 sphinx-astropy twine wheel + conda install --yes --quiet -c conda-forge python=$(python.version) astropy=$(astropy.version) cython h5py matplotlib numpy==$(numpy.version) pip 'pyproj>2' 'pyqt>=5' pytest pytest-astropy pytest-doctestplus pytest-qt scipy sgp4 sphinx-astropy twine wheel displayName: Install Anaconda packages # need to fix cctools and ld64 to slightly older version, otherwise an @@ -169,95 +176,97 @@ jobs: pip install -e . displayName: Building + # pytest -rsx --doctest-rst docs pycraf - script: | $(conda.activate) pycraf-env pip install pytest-azurepipelines - pytest -rsx --doctest-rst docs pycraf + python setup.py test --remote-data=any displayName: Testing + # sphinx-build docs docs/_build/html -W -b html + # conda install --yes --quiet --name pycraf-env -c conda-forge sphinx-astropy - script: | $(conda.activate) pycraf-env - conda install --yes --quiet --name pycraf-env -c conda-forge astropy sphinx-astropy - sphinx-build docs docs/_build/html -W -b html + python setup.py build_docs displayName: Make docs condition: succeeded() - - task: DownloadSecureFile@1 - inputs: - secureFile: ghpages_deploy_key_pycraf - displayName: 'Get the deploy key' - condition: and(succeeded(), eq(variables['publish.docs'], true)) + # - task: DownloadSecureFile@1 + # inputs: + # secureFile: ghpages_deploy_key_pycraf + # displayName: 'Get the deploy key' + # condition: and(succeeded(), eq(variables['publish.docs'], true)) - - bash: | - mkdir ~/.ssh && mv $DOWNLOADSECUREFILE_SECUREFILEPATH ~/.ssh/id_rsa - chmod 700 ~/.ssh && chmod 600 ~/.ssh/id_rsa - ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts - mkdir gh_pages && cd gh_pages - git init - git config --local user.name "Benjamin Winkel" - git config --local user.email "bwinkel@mpifr.de" - git remote add github git@github.com:bwinkel/pycraf.git - git fetch github gh-pages - git checkout --track github/gh-pages - # mkdir -p ./$DOCS_TARGET - rsync -av ../docs/_build/html/ ${DOCS_TARGET}/ - docs_version=$(python -c "import pycraf; print(pycraf.__version__)") - git add -A && git commit -m "Update docs for $docs_version ***NO_CI***" - bash ../retry.sh git push github - displayName: Publish docs - condition: and(succeeded(), eq(variables['publish.docs'], true)) + # - bash: | + # mkdir ~/.ssh && mv $DOWNLOADSECUREFILE_SECUREFILEPATH ~/.ssh/id_rsa + # chmod 700 ~/.ssh && chmod 600 ~/.ssh/id_rsa + # ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts + # mkdir gh_pages && cd gh_pages + # git init + # git config --local user.name "Benjamin Winkel" + # git config --local user.email "bwinkel@mpifr.de" + # git remote add github git@github.com:bwinkel/pycraf.git + # git fetch github gh-pages + # git checkout --track github/gh-pages + # # mkdir -p ./$DOCS_TARGET + # rsync -av ../docs/_build/html/ ${DOCS_TARGET}/ + # docs_version=$(python -c "import pycraf; print(pycraf.__version__)") + # git add -A && git commit -m "Update docs for $docs_version ***NO_CI***" + # bash ../retry.sh git push github + # displayName: Publish docs + # condition: and(succeeded(), eq(variables['publish.docs'], true)) - - task: TwineAuthenticate@1 - inputs: - pythonUploadServiceConnection: pypi - displayName: 'Twine Authenticate' + # - task: TwineAuthenticate@1 + # inputs: + # pythonUploadServiceConnection: pypi + # displayName: 'Twine Authenticate' - - bash: | - docker run -e NPY_NUM_BUILD_JOBS=4 -e PLAT=$(plat) -e package_name=$(package_name) -e py_whl=$(py_whl) --rm -v `pwd`:/io $(image) /io/.ci/build-wheels.sh - ls -lh wheelhouse/ - mkdir -p dist - cp wheelhouse/$(package_name)*.whl dist/. - ls dist - displayName: Build wheels, Linux - condition: and(succeeded(), startsWith(variables['Agent.OS'], 'Linux')) + # - bash: | + # docker run -e NPY_NUM_BUILD_JOBS=4 -e PLAT=$(plat) -e package_name=$(package_name) -e py_whl=$(py_whl) --rm -v `pwd`:/io $(image) /io/.ci/build-wheels.sh + # ls -lh wheelhouse/ + # mkdir -p dist + # cp wheelhouse/$(package_name)*.whl dist/. + # ls dist + # displayName: Build wheels, Linux + # condition: and(succeeded(), startsWith(variables['Agent.OS'], 'Linux')) - - script: | - $(conda.activate) pycraf-env - python setup.py bdist_wheel - displayName: Build wheels, MacOS/Windows - condition: and(succeeded(), not(startsWith(variables['Agent.OS'], 'Linux'))) + # - script: | + # $(conda.activate) pycraf-env + # python setup.py bdist_wheel + # displayName: Build wheels, MacOS/Windows + # condition: and(succeeded(), not(startsWith(variables['Agent.OS'], 'Linux'))) - # twine upload with python 3.5 doesn't work? - # (pkg_resources.DistributionNotFound: The 'readme-renderer>=21.0' distribution was not found) - # will use system python for upload - - task: UsePythonVersion@0 - inputs: - versionSpec: '3.6' + # # twine upload with python 3.5 doesn't work? + # # (pkg_resources.DistributionNotFound: The 'readme-renderer>=21.0' distribution was not found) + # # will use system python for upload + # - task: UsePythonVersion@0 + # inputs: + # versionSpec: '3.6' - - script: | - pip install twine - python -m twine upload -r "pypi" --config-file $(PYPIRC_PATH) dist/*.whl - displayName: Upload wheels, Linux/MacOS - condition: and(succeeded(), eq(variables['publish.wheels'], true), not(startsWith(variables['Agent.OS'], 'Windows'))) + # - script: | + # pip install twine + # python -m twine upload -r "pypi" --config-file $(PYPIRC_PATH) dist/*.whl + # displayName: Upload wheels, Linux/MacOS + # condition: and(succeeded(), eq(variables['publish.wheels'], true), not(startsWith(variables['Agent.OS'], 'Windows'))) - - script: | - pip install twine - python -m twine upload -r "pypi" --config-file %PYPIRC_PATH% dist/*.whl - displayName: Upload wheels, Windows - condition: and(succeeded(), eq(variables['publish.wheels'], true), startsWith(variables['Agent.OS'], 'Windows')) + # - script: | + # pip install twine + # python -m twine upload -r "pypi" --config-file %PYPIRC_PATH% dist/*.whl + # displayName: Upload wheels, Windows + # condition: and(succeeded(), eq(variables['publish.wheels'], true), startsWith(variables['Agent.OS'], 'Windows')) - - script: | - $(conda.activate) pycraf-env - python setup.py sdist - displayName: Build tarball - condition: and(succeeded(), eq(variables['build.tarball'], true)) + # - script: | + # $(conda.activate) pycraf-env + # python setup.py sdist + # displayName: Build tarball + # condition: and(succeeded(), eq(variables['build.tarball'], true)) - - script: | - $(conda.activate) pycraf-env - python -m twine upload -r "pypi" --config-file $(PYPIRC_PATH) dist/*.tar.gz - displayName: Upload tarball - condition: and(succeeded(), eq(variables['publish.tarball'], true)) + # - script: | + # $(conda.activate) pycraf-env + # python -m twine upload -r "pypi" --config-file $(PYPIRC_PATH) dist/*.tar.gz + # displayName: Upload tarball + # condition: and(succeeded(), eq(variables['publish.tarball'], true)) - - script: rm ~/.ssh/id_rsa || true - displayName: 'Cleanup docs deploy key' - condition: and(always(), eq(variables['publish.docs'], true)) + # - script: rm ~/.ssh/id_rsa || true + # displayName: 'Cleanup docs deploy key' + # condition: and(always(), eq(variables['publish.docs'], true))