-
Notifications
You must be signed in to change notification settings - Fork 1
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 #21 from CDAT/migrateToCircleCI
Migrate to circle ci
- Loading branch information
Showing
6 changed files
with
87 additions
and
36 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
version: 2 | ||
|
||
checkout: | ||
post: | ||
- ./ci-support/checkout_merge_commit.sh | ||
|
||
aliases: | ||
|
||
- &setup_miniconda | ||
name: setup_miniconda | ||
command: | | ||
mkdir -p workspace | ||
git clone -b validateNightly git@github.com:CDAT/cdat workspace/cdat | ||
ls workspace/cdat | ||
# following will install miniconda3 under $WORKDIR/miniconda/bin | ||
python workspace/cdat/scripts/install_miniconda.py -w $WORKDIR -p 'py3' | ||
- &create_conda_env | ||
name: create_conda_env | ||
command: | | ||
export PATH=$WORKDIR/miniconda/bin:$PATH | ||
conda config --set always_yes yes --set changeps1 no | ||
conda update -y -q conda | ||
conda config --set anaconda_upload no | ||
conda create -n py2 -c cdat/label/nightly -c conda-forge -c cdat cdms2 cdat_info udunits2 nose flake8 "python<3" numpy | ||
conda create -n py3 -c cdat/label/nightly -c conda-forge -c cdat cdms2 nose flake8 "python>3" cdat_info udunits2 numpy | ||
- &setup_genutil | ||
name: setup_genutil | ||
command: | | ||
export PATH=$WORKDIR/miniconda/bin:$PATH | ||
export UVCDAT_ANONYMOUS_LOG=False | ||
source activate py3 | ||
python setup.py install | ||
source activate py2 | ||
rm -rf build | ||
python setup.py install | ||
- &run_genutil_tests | ||
name: run_genutil_tests | ||
command: | | ||
export PATH=$WORKDIR/miniconda/bin:$PATH | ||
export UVCDAT_ANONYMOUS_LOG=False | ||
set -e | ||
source activate py2 | ||
python run_tests.py -H -v2 | ||
PY2_RESULT=$? | ||
echo "*** py2 test result: "${PY2_RESULT} | ||
source activate py3 | ||
python run_tests.py -H -v2 | ||
PY3_RESULT=$? | ||
echo "*** py3 test result: "${PY3_RESULT} | ||
if [ $PY2_RESULT -eq 0 -a $PY3_RESULT -eq 0 -a $CIRCLE_BRANCH == "master" ]; then bash ./ci-support/conda_upload.sh ; fi | ||
if [ $PY2_RESULT -ne 0 -o $PY3_RESULT -ne 0]; then | ||
exit 1 | ||
fi | ||
jobs: | ||
macos_genutil: | ||
macos: | ||
xcode: "9.2.0" | ||
environment: | ||
WORKDIR: "workspace/test_macos_genutil" | ||
steps: | ||
- checkout | ||
- run: *setup_miniconda | ||
- run: *create_conda_env | ||
- run: *setup_genutil | ||
- run: *run_genutil_tests | ||
- store_artifacts: | ||
path: tests_html | ||
destination: tests_html | ||
|
||
workflows: | ||
version: 2 | ||
nightly: | ||
jobs: | ||
- macos_genutil | ||
|
||
|
||
|
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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