Skip to content

Commit d8b7c00

Browse files
committed
Use diffpy channel for conda build in travis.
- also execute travis tests from an empty directory - use umask to disable group-write permissions on Ubuntu - ensure full git clone even with an older git client
1 parent 77c15eb commit d8b7c00

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

.travis.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,16 @@ matrix:
1818
- os: osx
1919
env: MYUSEMC=false
2020

21+
git:
22+
depth: 999999
23+
2124
branches:
2225
except:
2326
- /^v[0-9]/
2427

2528
before_install:
26-
- git fetch origin --unshallow --tags
29+
- umask 022
30+
- git fetch origin --tags
2731
- if ${MYUSEMC}; then
2832
NOAPT=true; NOMC=false;
2933
else
@@ -42,17 +46,17 @@ before_install:
4246
esac
4347

4448
- mkdir -p ~/pkgs/
49+
- mkdir -p ~/rundir/
4550

4651
- $NOMC || pushd ~/pkgs/
4752
- $NOMC || wget --timestamping ${MYMCREPO}/${MYMCBUNDLE}
4853
- $NOMC || test -x ~/mc/bin/conda || bash ${MYMCBUNDLE} -b -f -p ~/mc
4954
- $NOMC || popd
5055
- $NOMC || export PATH="${HOME}/mc/bin:${PATH}"
51-
- $NOMC || conda update conda --yes
52-
- $NOMC || conda install --yes python=${MYPYTHON_VERSION} conda-build jinja2
56+
- $NOMC || conda update --yes conda
57+
- $NOMC || conda install --yes conda-build jinja2
5358
- $NOMC || conda create --name=testenv --yes python=${MYPYTHON_VERSION} coverage
54-
- $NOMC || conda config --add channels pavoljuhas/channel/dev
55-
- $NOMC || conda config --add channels pavoljuhas
59+
- $NOMC || conda config --add channels diffpy
5660

5761
- $NOAPT || test "${TRAVIS_OS_NAME}" = "linux" || exit $?
5862
- $NOAPT || sudo apt-get update -qq
@@ -69,7 +73,7 @@ before_install:
6973

7074

7175
install:
72-
- $NOMC || conda build conda-recipe
76+
- $NOMC || CONDA_PY=${MYPYTHON_VERSION} conda build conda-recipe
7377
- $NOMC || conda list --name=_test --export diffpy.srreal > /tmp/mypackage.txt
7478
- $NOMC || source activate testenv
7579
- $NOMC || conda install --yes --use-local --file=/tmp/mypackage.txt
@@ -86,16 +90,13 @@ install:
8690
- $NOAPT || sudo scons -C ~/pkgs/libdiffpy install
8791
- $NOAPT || easy_install --user "${MYTARBUNDLE}"
8892

89-
- cd
93+
- cd ~/rundir
9094
- MYGIT_REV=$(python -c "import diffpy.srreal.version as v; print(v.__gitsha__)")
9195
- if [[ "${TRAVIS_COMMIT}" != "${MYGIT_REV}" ]]; then
9296
echo "Version mismatch ${TRAVIS_COMMIT} vs ${MYGIT_REV}.";
9397
exit 1;
9498
fi
9599

96-
before_script:
97-
- cd
98-
99100
script:
100101
- coverage run --source diffpy.srreal -m diffpy.srreal.tests.run
101102

0 commit comments

Comments
 (0)