-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #733 from MPAS-Dev/develop
Merge develop to master for 1.2.8
- Loading branch information
Showing
27 changed files
with
433 additions
and
303 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,210 @@ | ||
|
||
trigger: | ||
branches: | ||
include: | ||
- master | ||
- develop | ||
tags: | ||
include: | ||
- '*' | ||
|
||
pr: | ||
branches: | ||
include: | ||
- master | ||
- develop | ||
|
||
jobs: | ||
- job: | ||
displayName: linux | ||
pool: | ||
vmImage: 'ubuntu-16.04' | ||
strategy: | ||
matrix: | ||
Python36: | ||
python.version: '3.6' | ||
Python37: | ||
python.version: '3.7' | ||
Python38: | ||
python.version: '3.8' | ||
|
||
steps: | ||
- bash: echo "##vso[task.prependpath]$CONDA/bin" | ||
displayName: Add conda to PATH | ||
|
||
- bash: | | ||
conda config --add channels conda-forge | ||
conda config --set channel_priority strict | ||
conda create --yes --quiet --name build python=$PYTHON_VERSION conda conda-build | ||
displayName: Create Anaconda build environment | ||
- bash: | | ||
eval "$(conda shell.bash hook)" | ||
conda activate build | ||
conda build -m "ci/python${PYTHON_VERSION}.yaml" "ci/recipe" | ||
displayName: Build MPAS-Analysis | ||
- bash: | | ||
eval "$(conda shell.bash hook)" | ||
conda create --yes --quiet --name test --use-local python=$PYTHON_VERSION \ | ||
mpas-analysis pytest | ||
displayName: Create Anaconda test environment | ||
- bash: | | ||
eval "$(conda shell.bash hook)" | ||
conda activate test | ||
pytest --pyargs mpas_analysis | ||
displayName: pytest | ||
- bash: | | ||
eval "$(conda shell.bash hook)" | ||
conda create --yes --quiet --name docs --use-local python=$PYTHON_VERSION \ | ||
mpas-analysis sphinx mock sphinx_rtd_theme tabulate m2r | ||
condition: eq(variables['python.version'], '3.8') | ||
displayName: Create Anaconda docs environment | ||
- bash: | | ||
eval "$(conda shell.bash hook)" | ||
conda activate docs | ||
echo "source branch: $(Build.SourceBranch)" | ||
echo "repository: $(Build.Repository.Name)" | ||
tag=$(git describe --tags $(git rev-list --tags --max-count=1)) | ||
echo "tag: $tag" | ||
version=`python -c "import mpas_analysis; print(mpas_analysis.__version__)"` | ||
echo "version: $version" | ||
REPO_PATH=$PWD | ||
if [[ "$(Build.SourceBranch)" == "refs/heads/develop" ]]; then | ||
export DOCS_VERSION="latest" | ||
deploy=True | ||
elif [[ "$(Build.SourceBranch)" == "refs/heads/master" ]]; then | ||
export DOCS_VERSION="stable" | ||
deploy=True | ||
elif [[ "$(Build.SourceBranch)" == refs/tags/* ]]; then | ||
# this is a tag build | ||
export DOCS_VERSION="$tag" | ||
deploy=True | ||
else | ||
DOCS_VERSION="$version" | ||
export DOCS_VERSION | ||
deploy=False | ||
fi | ||
echo "Docs version: $DOCS_VERSION" | ||
echo "Deploy to gh-pages? $deploy" | ||
cd docs || exit 1 | ||
make html | ||
cd "$REPO_PATH" || exit 1 | ||
if [[ "$deploy" == "True" ]]; then | ||
PUBLICATION_BRANCH=gh-pages | ||
# Checkout the branch | ||
pushd $HOME || exit 1 | ||
git clone --branch=$PUBLICATION_BRANCH https://$(GitHubToken)@github.com/$(Build.Repository.Name) publish | ||
cd publish || exit 1 | ||
# Update pages | ||
if [[ -d "$DOCS_VERSION" ]]; then | ||
git rm -rf "$DOCS_VERSION" > /dev/null | ||
fi | ||
mkdir "$DOCS_VERSION" | ||
cp -r "$REPO_PATH"/docs/_build/html/* "$DOCS_VERSION" | ||
# Commit and push latest version | ||
git add . | ||
if git diff-index --quiet HEAD; then | ||
echo "No changes in the docs." | ||
else | ||
git config --local user.name "Azure Pipelines" | ||
git config --local user.email "[email protected]" | ||
git commit -m "[skip ci] Update $DOCS_VERSION" | ||
git push -fq origin $PUBLICATION_BRANCH | ||
fi | ||
popd || exit 1 | ||
fi | ||
condition: eq(variables['python.version'], '3.8') | ||
displayName: build and deploy docs | ||
- job: | ||
displayName: xarray-master | ||
pool: | ||
vmImage: 'ubuntu-16.04' | ||
strategy: | ||
matrix: | ||
Python38: | ||
python.version: '3.8' | ||
|
||
steps: | ||
- bash: echo "##vso[task.prependpath]$CONDA/bin" | ||
displayName: Add conda to PATH | ||
|
||
- bash: | | ||
conda config --add channels conda-forge | ||
conda config --set channel_priority strict | ||
conda create --yes --quiet --name build python=$PYTHON_VERSION conda conda-build | ||
displayName: Create Anaconda build environment | ||
- bash: | | ||
eval "$(conda shell.bash hook)" | ||
conda activate build | ||
conda build -m "ci/python${PYTHON_VERSION}.yaml" "ci/recipe" | ||
displayName: Build MPAS-Analysis | ||
- bash: | | ||
eval "$(conda shell.bash hook)" | ||
conda create --yes --quiet --name test --use-local python=$PYTHON_VERSION \ | ||
mpas-analysis pytest | ||
conda activate test | ||
pip install git+https://github.com/pydata/xarray.git | ||
displayName: Create Anaconda test environment | ||
- bash: | | ||
eval "$(conda shell.bash hook)" | ||
conda activate test | ||
pytest --pyargs mpas_analysis | ||
displayName: pytest | ||
- job: | ||
displayName: osx | ||
pool: | ||
vmImage: 'macOS-10.14' | ||
strategy: | ||
matrix: | ||
Python36: | ||
python.version: '3.6' | ||
Python37: | ||
python.version: '3.7' | ||
Python38: | ||
python.version: '3.8' | ||
|
||
steps: | ||
- bash: echo "##vso[task.prependpath]$CONDA/bin" | ||
displayName: Add conda to PATH | ||
|
||
- bash: | | ||
conda config --add channels conda-forge | ||
conda config --set channel_priority strict | ||
conda create --yes --quiet --name build python=$PYTHON_VERSION conda conda-build | ||
displayName: Create Anaconda build environment | ||
- bash: | | ||
eval "$(conda shell.bash hook)" | ||
conda activate build | ||
conda build -m "ci/python${PYTHON_VERSION}.yaml" "ci/recipe" | ||
displayName: Build MPAS-Analysis | ||
- bash: | | ||
eval "$(conda shell.bash hook)" | ||
conda create --yes --quiet --name test --use-local python=$PYTHON_VERSION \ | ||
mpas-analysis pytest | ||
displayName: Create Anaconda test environment | ||
- bash: | | ||
eval "$(conda shell.bash hook)" | ||
conda activate test | ||
pytest --pyargs mpas_analysis | ||
displayName: pytest |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.