.gitlab-ci.yml 1.5 KB
Newer Older
1
2
3
4
5
6
image: kwant/tinyarray-testing

stages:
  - test
  - deploy

Joseph Weston's avatar
Joseph Weston committed
7
8
9
10
python2:
    script:
        - python2 setup.py build_ext -i
        - python2 test_tinyarray.py
11

Joseph Weston's avatar
Joseph Weston committed
12
13
14
15
python3:
    script:
        - python3 setup.py build_ext -i
        - python3 test_tinyarray.py
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

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
33
34
35
36
37

create conda dev package:
  image: condaforge/linux-anvil
  stage: deploy
  only:
38
    - master@kwant/tinyarray
39
40
41
42
43
44
45
46
47
48
  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