.gitlab-ci.yml 867 Bytes
Newer Older
Joseph Weston's avatar
Joseph Weston committed
1
2
3
4
5
6
7
8
python2:
    script:
        - python2 setup.py build_ext -i
        - python2 test_tinyarray.py
python3:
    script:
        - python3 setup.py build_ext -i
        - python3 test_tinyarray.py
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

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