forked from PyORBIT-Collaboration/PyORBIT3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
57 lines (53 loc) · 1.94 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
include:
- remote: "https://gitlab.esss.lu.se/ics-infrastructure/gitlab-ci-yml/raw/master/PreCommit.gitlab-ci.yml"
- remote: "https://gitlab.esss.lu.se/ics-infrastructure/gitlab-ci-yml/raw/master/ArtifactoryPyPI.gitlab-ci.yml"
- remote: "https://gitlab.esss.lu.se/ics-infrastructure/gitlab-ci-yml/raw/master/SonarScanner.gitlab-ci.yml"
variables:
CC: "mpicc"
CXX: "mpic++"
run-tests:
tags:
- docker
stage: test
image: continuumio/miniconda3:24.7.1-0
before_script:
- conda env create -y -n po3 --file environment.yml
- conda init bash
- source ~/.bashrc
- conda activate po3
- conda install -y -c conda-forge gcc gxx mpich mpich-mpicc mpich-mpicxx pytest pytest-cov coverage numpy scipy matplotlib
- pip install .
script:
- pytest tests --junitxml=junit.xml --cov-report xml --cov-report term --cov orbit
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
artifacts:
paths:
- junit.xml
- coverage.xml
reports:
junit: junit.xml
coverage_report:
coverage_format: cobertura
path: coverage.xml
build-pypi-package-py310:
extends: build-pypi-package
image: continuumio/miniconda3:24.7.1-0
before_script:
- conda update -y -n base -c defaults conda
- conda env create -y -n python310 --file environment.yml
- conda init bash
- source ~/.bashrc
- conda activate python310
- conda install -y -c conda-forge python=3.10 build gcc gxx git mpich mpich-mpicc mpich-mpicxx
build-pypi-package:
image: continuumio/miniconda3:24.7.1-0
script:
- git config --global --add safe.directory /builds/ess-crs/pyorbit3
- python -m build
before_script:
- conda update -y -n base -c defaults conda
- conda env create -y -n python311 --file environment.yml
- conda init bash
- source ~/.bashrc
- conda activate python311
- conda install -y -c conda-forge python=3.11 build gcc gxx git git-lfs mpich mpich-mpicc mpich-mpicxx