-
Notifications
You must be signed in to change notification settings - Fork 8
/
.gitlab-ci.yml
executable file
·107 lines (99 loc) · 3.11 KB
/
.gitlab-ci.yml
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
stages:
- test.latest
- test.3.10
- test.3.9
- test.3.8
- deploy
default:
before_script:
- apt-get update -qq
- 'which ssh-agent || ( apt-get install -qq -y openssh-client )'
- eval $(ssh-agent -s)
- ssh-add <(echo "$SSH_PRIVATE_KEY")
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- echo -e "${SSH_PRIVATE_KEY@E}" | tr -d '"' > ~/.ssh/id_rsa
- chmod og-rwx ~/.ssh/id_rsa
- scp $CASCOPY ~/
pylatest:
stage: test.latest
image: python:latest
script:
- curl https://bootstrap.pypa.io/get-pip.py | python
- python -m pip install --upgrade pip coverage
- pip install build
- python -m build
- pip install dist/*.whl
- cd tests
- ./test_coverage.sh
py310:
stage: test.3.10
image: python:3.10
script:
- curl https://bootstrap.pypa.io/get-pip.py | python
- python -m pip install --upgrade pip coverage
- pip install build
- python -m build
- pip install dist/*.whl
- cd tests
- ./test_coverage.sh
py39:
stage: test.3.9
image: python:3.9
script:
- curl https://bootstrap.pypa.io/get-pip.py | python
- python -m pip install --upgrade pip coverage
- pip install build
- python -m build
- pip install dist/*.whl
- cd tests
- ./test_coverage.sh
py38:
stage: test.3.8
image: python:3.8
script:
- curl https://bootstrap.pypa.io/get-pip.py | python
- python -m pip install --upgrade pip coverage
- pip install build
- python -m build
- pip install dist/*.whl
- cd tests
- ./test_coverage.sh
push_to_pypi:
image: python:latest
stage: deploy
before_script:
- apt-get update -qq
script:
- python -m pip install --upgrade setuptools wheel
- python setup.py sdist bdist_wheel
- python -m pip install --upgrade twine
- echo $PYPI_URL
- python -m twine upload --skip-existing -u __token__ -p $PYPI_TOKEN --repository-url $PYPI_URL dist/*
when: manual
push_to_conda:
image: python:latest
stage: deploy
before_script:
- apt-get update -qq
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- PATH=$PATH:$HOME/miniconda/bin
- conda config --set always_yes yes
- conda config --add channels conda-forge
- conda config --add channels sas-institute
- conda install conda-build
- conda update -n base -c defaults conda
- conda install anaconda-client
- conda install conda-verify
- mkdir build
script:
- conda build -c conda-forge -c sas-institute --output-folder build/ conda/
- cd build
- conda convert -p all `ls linux-64/*-py3*.tar.bz2`
- anaconda -t $ANACONDA_TOKEN upload -u sas-institute --force `ls linux-64/*-py3*.tar.bz2`
- anaconda -t $ANACONDA_TOKEN upload -u sas-institute --force `ls linux-32/*-py3*.tar.bz2`
- anaconda -t $ANACONDA_TOKEN upload -u sas-institute --force `ls win-32/*-py3*.tar.bz2`
- anaconda -t $ANACONDA_TOKEN upload -u sas-institute --force `ls win-64/*-py3*.tar.bz2`
- anaconda -t $ANACONDA_TOKEN upload -u sas-institute --force `ls osx-64/*-py3*.tar.bz2`
when: manual