.gitlab-ci.yml 1.8 KB
Newer Older
Matt Clarkson's avatar
Matt Clarkson committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
stages:
  - build
  - installer
  - test
  - deploy


build docs:
  stage: build
  script:
    - tox -e docs
  tags:
    - shared-linux
  artifacts:
    paths:
    - doc/
    expire_in: 1 week


build linux installer:
  stage: build
  script:
    - tox -e installer
  tags:
    - shared-linux
  artifacts:
    paths:
    - dist/
    expire_in: 1 week


build mac installer:
  stage: build
  script:
    - tox -e installer
  tags:
    - shared-mac
  artifacts:
    paths:
    - dist/
    expire_in: 1 week


build windows installer:
  stage: build
  script:
    - tox -e installer
  tags:
    - shared-win
  artifacts:
    paths:
    - dist/
    expire_in: 1 week


test Linux:
  stage: test
  script:
      - tox
  tags:
    - shared-linux
  coverage: '/^TOTAL.*\s+(\d+\%)$/'


test macOS:
  stage: test
  script:
      - tox
  tags:
    - shared-mac


test Windows:
  stage: test
  script:
      - tox
  tags:
    - shared-win


deploy docs to staging:
  stage: deploy
  script:
    # Note: the group/username directory must already exist on the server before calling this command
    - rsync -avz -e'ssh -v' --numeric-ids --delete doc/build/html/* staging_docs_rsync:WEISS/SoftwareRepositories/scikit-surgerycore 2>&1
  tags:
    - docs-staging
  environment:
    name: staging
    url: http://weisslab-lin.cs.ucl.ac.uk/staging/WEISS/SoftwareRepositories/scikit-surgerycore
  only:
    - master
  dependencies:
    - build docs


deploy docs to production:
  stage: deploy
  script:
    # Note: the group/username directory must already exist on the server before calling this command
    - rsync -avz -e'ssh -v' --numeric-ids --delete doc/build/html/* production_docs_rsync:WEISS/SoftwareRepositories/scikit-surgerycore 2>&1
  tags:
    - docs-production
  environment:
    name: production
  only:
    - public
  dependencies:
    - build docs