Revision 592bfc4ccd6b11d1b03341d62b30186c74a12896 authored by Konstantin Ladutenko on 29 March 2023, 13:40:36 UTC, committed by Konstantin Ladutenko on 29 March 2023, 13:40:36 UTC
1 parent b1e978f
Raw File
.gitlab-ci.yml
image: python:3.9

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 setuptools
    - pip3 install .
    - rm -rf smuthi
    - 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