image: kwant/tinyarray-testing stages: - test - deploy python2: script: - python2 setup.py build_ext -i - python2 test_tinyarray.py python3: script: - python3 setup.py build_ext -i - python3 test_tinyarray.py mirror: only: - branches@kwant/tinyarray variables: REPOS: "git@github.com:kwant-project/tinyarray.git git@gitlab.com:kwant/tinyarray.git" before_script: - HOSTS=$(for REPO in $REPOS; do echo ${REPO%:*} | cut -d'@' -f2; done) - mkdir ~/.ssh && chmod 700 ~/.ssh - for HOST in $HOSTS; do ssh-keyscan $HOST >> ~/.ssh/known_hosts; done - echo "$DEPLOY_KEY" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa after_script: - rm -rf ~/.ssh script: - ORIGIN_URL=$(git config --get remote.origin.url) - cd $(mktemp -d); git clone --bare $ORIGIN_URL . - for REPO in $REPOS; do git push --mirror $REPO; done create conda dev package: image: condaforge/linux-anvil stage: deploy only: - master@kwant/tinyarray script: - git clone https://gitlab.kwant-project.org/kwant/conda-recipes.git - conda build -c conda-forge --python 3.4 conda-recipes/tinyarray-dev - conda build -c conda-forge --python 3.5 conda-recipes/tinyarray-dev - conda build -c conda-forge --python 3.6 conda-recipes/tinyarray-dev - mv /opt/conda/conda-bld/linux-64/tinyarray-dev*.tar.bz2 . - anaconda --token=$ANACONDA_TOKEN upload --force tinyarray-dev*tar.bz2 artifacts: paths: - tinyarray-dev*.tar.bz2