Commit 96ab033e authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Merge branch 'master' of gitlab.tiker.net:inducer/ci-support

parents f4977bb6 0418edcb
Loading
Loading
Loading
Loading
+17 −11
Original line number Diff line number Diff line
curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-py-project-within-miniconda.sh
source build-py-project-within-miniconda.sh

pip install asv
# Use a stable release once https://github.com/airspeed-velocity/asv/pull/721 is released
pip install git+https://github.com/airspeed-velocity/asv#egg=asv

conda list

PY_EXE=python

if [[ ! -z "$PROJECT" ]]; then
if [[ -z "$PROJECT" ]]; then
    echo "PROJECT env var not set"
    exit 1
fi

mkdir -p ~/.$PROJECT/asv
if [[ -z "$PYOPENCL_TEST" ]]; then
    echo "PYOPENCL_TEST env var not set"
    exit 1
fi

mkdir -p ~/.$PROJECT/asv/results

if [[ ! -z "$CI" ]]; then
  mkdir -p .asv/env
  if [[ "$CI_PROJECT_NAMESPACE" == "inducer" ]]; then
    ln -s ~/.$PROJECT/asv .asv
    ln -s ~/.$PROJECT/asv/results .asv/results
  else
    # Copy, so that the original folder is not changed.
    cp -r ~/.$PROJECT/asv .asv
    cp -r ~/.$PROJECT/asv/results .asv/results
  fi
  rm -rf .asv/env
fi

if [[ ! -f ~/.asv-machine.json ]]; then
  asv machine --yes
asv setup --verbose
fi

master_commit=`git rev-parse master`
test_commit=`git rev-parse HEAD`

export PYOPENCL_CTX=port

asv run $master_commit...$master_commit~ --skip-existing --verbose
asv run $test_commit...$test_commit~ --skip-existing --verbose

+3 −0
Original line number Diff line number Diff line
@@ -34,6 +34,9 @@ ${PY_EXE} -m venv .env

${PY_EXE} -m ensurepip

# Avoid UnicodeDecodeError: https://github.com/pypa/pip/issues/4825
pip install --upgrade pip

# }}}

if test "$EXTRA_INSTALL" != ""; then
+16 −0
Original line number Diff line number Diff line
@@ -11,6 +11,22 @@ echo "git status:"
git status -s
echo "-----------------------------------------------"

# {{{ clean up

rm -Rf .env
rm -Rf build
find . -name '*.pyc' -delete

rm -Rf env
git clean -fdx -e siteconf.py -e boost-numeric-bindings $GIT_CLEAN_EXCLUDE

if test `find "siteconf.py" -mmin +1`; then
  echo "siteconf.py older than a minute, assumed stale, deleted"
  rm -f siteconf.py
fi

# }}}

if [ "$(uname)" = "Darwin" ]; then
  PLATFORM=MacOSX
else