Revision 132030a1add8addd160e42f2b0a8edf5cf3b5ffe authored by Amos Egel on 25 January 2021, 13:02:29 UTC, committed by Amos Egel on 25 January 2021, 13:02:29 UTC
1 parent 326c6ca
Raw File
.gitlab-ci.yml
image: python:3.7

stages:
  - test
  - build
  - publish
  - postupload

# Run all automatic tests
test:
  stage: test
  script:
    - echo "Testing"
    - apt-get update
    - apt-get install -y gfortran
    - pip3 install -e .
    - pip3 install nose2
    - nose2 -v

# Create binary wheels as well as the source distribution
dist:
  image: quay.io/pypa/manylinux2010_x86_64
  stage: build
  script:
    - chmod +x CI/build-wheel-manylinux.sh
    - CI/build-wheel-manylinux.sh
  artifacts:
    paths:
      - dist/
    expire_in: 1 week
  only:
    - tags

## Upload the contents of the /dist folder to testpypi
#testpypi:
#  stage: publish
#  variables:
#    TWINE_USERNAME: $TESTPYPI_USERNAME
#    TWINE_PASSWORD: $TESTPYPI_PASSWORD
#  script:
#    - pip install twine
#    - echo "Upload to testpypi"
#    - twine upload --repository testpypi --skip-existing dist/*
#  only:
#    - tags

# Upload the contents of the /dist folder to PyPi
pypi:
  stage: publish
  variables:
    TWINE_USERNAME: $PYPI_USERNAME
    TWINE_PASSWORD: $PYPI_PASSWORD
  script:
    - pip install twine
    - echo "Upload to PyPi"
    - twine upload --skip-existing dist/*
  only:
    - tags

whl_test_python36:
  stage: postupload
  image: python:3.6
  script:
    - pip3 install smuthi
    - pip3 install nose2
    - rm -rf smuthi
    - nose2 -v
  only:
    - tags

whl_test_python38:
  stage: postupload
  image: python:3.8
  script:
    - pip3 install smuthi
    - pip3 install nose2
    - rm -rf smuthi
    - nose2 -v
  only:
    - tags

whl_test_ubuntu_focal2004LTS:
  stage: postupload
  image: ubuntu:focal
  script:
    - apt update
    - apt install -y python3-pip
    - pip3 install smuthi
    - pip3 install nose2
    - rm -rf smuthi
    - nose2 -v
  only:
    - tags

whl_test_ubuntu_groovy2010:
  stage: postupload
  image: ubuntu:groovy
  script:
    - apt update
    - apt install -y python3-pip
    - pip3 install smuthi
    - pip3 install nose2
    - rm -rf smuthi
    - nose2 -v
  only:
    - tags

whl_test_centos8:
  stage: postupload
  image: inveniosoftware/centos8-python:3.8
  script:
    - pip3 install smuthi
    - pip3 install nose2
    - rm -rf smuthi
    - nose2 -v
  only:
    - tags

back to top