forked from mia-jinns/jinns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
85 lines (77 loc) · 1.62 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
image: "registry.gitlab.com/mia_jinns/docker-image-quarto-jax-sphinx:main"
stages:
- linting
- tests
- build
- publish
black:
stage: linting
image: registry.gitlab.com/pipeline-components/black:latest
script:
- black --check --verbose -- .
tags:
- docker
run_tests:
stage: tests
before_script:
- pip install --break-system-packages pytest
script:
- pip install --break-system-packages .
- cd tests
- sh runtests.sh # without GPU on gitlab CI/CD
build_doc:
stage: build
before_script:
- quarto render doc/source/math_pinn.qmd
- quarto render doc/source/param_estim_pinn.qmd
- quarto render doc/source/fokker_planck.qmd
- pip install --break-system-packages sphinx sphinx_rtd_theme
- apt install pandoc
- pip install --break-system-packages nbsphinx pandoc
script:
- pip install --break-system-packages .
- make -C doc clean html
artifacts:
untracked: true
expire_in: 1 week
tags:
- docker
build_package:
stage: build
image: "python:3.9"
before_script:
- pip install build
script:
- rm -rf dist/
- python -m build
artifacts:
untracked: true
expire_in: 1 week
tags:
- docker
publish_package:
stage: publish
image: "python:3.9"
before_script:
- pip install twine
script:
- TWINE_PASSWORD=${PYPI_UPLOAD_TOKEN}
TWINE_USERNAME=__token__
python -m twine upload dist/*
tags:
- docker
only:
- tags
pages:
stage: publish
image: "python:3.9"
script:
- rm -rf public/
- cp -r doc/build/html public/
artifacts:
paths:
- public
tags:
- docker
only:
- main