-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
86 lines (80 loc) · 2.43 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
stages:
- test
- examples
- deploy_test
- test_install
- deploy_prod
- prod_install
test_docker:
stage: test
image: ubuntu:rolling
tags:
- docker.meteo.physik.lmu.de
# Since enstools is a dependency, we still need to install all these libraries.
before_script:
- apt update
- export DEBIAN_FRONTEND=noninteractive
- apt-get install -y libproj-dev proj-data proj-bin
- apt-get install -y libgeos-dev
- apt-get install -y libeccodes-dev
- apt install -yq git python3 python3-pip python3-venv
script: ./run_tests.sh
deploy-to-testpypi:
stage: deploy_test
image: python:3.10
tags:
- docker.meteo.physik.lmu.de
only:
- tags
script:
- pip install twine
- python setup.py sdist bdist_wheel
- twine upload -u "__token__" -p "$PYPI_TEST_PASSWORD" --repository-url https://test.pypi.org/legacy/ --skip-existing dist/*
install-from-testpypi:
stage: test_install
image: ubuntu:rolling
tags:
- docker.meteo.physik.lmu.de
only:
- tags
needs: ["deploy-to-testpypi"]
before_script:
- apt update
- export DEBIAN_FRONTEND=noninteractive
- apt-get install -y libproj-dev proj-data proj-bin
- apt-get install -y libgeos-dev
- apt-get install -y libeccodes-dev
- apt install -yq git vim python3 python3-pip python3-venv
script:
- pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ enstools-compression --break-system-packages
- python3 -c "from enstools.compression import api"
deploy-to-pypi:
stage: deploy_prod
image: python:3.10
only:
- tags
tags:
- docker.meteo.physik.lmu.de
needs: ["install-from-testpypi"]
script:
- pip install twine
- python setup.py sdist bdist_wheel
- twine upload -u "__token__" -p "$PYPI_PASSWORD" --skip-existing dist/*
install-from-pypi:
stage: prod_install
image: ubuntu:rolling
tags:
- docker.meteo.physik.lmu.de
only:
- tags
needs: ["deploy-to-pypi"]
before_script:
- apt update
- export DEBIAN_FRONTEND=noninteractive
- apt-get install -y libproj-dev proj-data proj-bin
- apt-get install -y libgeos-dev
- apt-get install -y libeccodes-dev
- apt install -yq git vim python3 python3-pip python3-venv
script:
- pip install enstools-compression --break-system-packages
- python3 -c "from enstools.compression import api"