-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy path.gitlab-ci.hpc-spack.yml
89 lines (81 loc) · 2.7 KB
/
.gitlab-ci.hpc-spack.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
include:
- project: hpc/gitlab-pipelines
file: spack-build-components.gitlab-ci.yml
variables:
BRAYNS_COMMIT: ${CI_COMMIT_SHA}
bb5_account: proj3
bb5_duration: "2:00:00"
DATADIR: /tmp
SALLOC_ACCOUNT: proj3
SBATCH_ACCOUNT: proj3
SLURM_ACCOUNT: proj3
SLURM_CPUS_PER_TASK: 72
SPACK_PACKAGE: brayns
SPACK_PACKAGE_NAME: brayns
SPACK_PACKAGE_COMPILER: gcc
SPACK_PACKAGE_REF: ""
spack_setup:
extends: .spack_setup_ccache
timeout: 2h
brayns-spack-build:
extends: .spack_build
stage: test
timeout: 2h
brayns-spack-test:
extends: .spack_test
needs: ["brayns-spack-build"]
timeout: 2h
script:
- export BRAYNS_TMP_DIR=$SHMDIR
- cd ${SPACK_BUILD_DIR}
- spack build-env ${SPACK_FULL_SPEC} -- ninja tests
brayns-python-venv:
extends: .spack_test
needs: ["brayns-spack-build"]
timeout: 10 minutes
script:
- cd ${SPACK_SOURCE_DIR}/python
- module load unstable python
- python -m venv pythonvenv
- source pythonvenv/bin/activate
- pip install -r requirements.txt
- python setup.py sdist
- pip install dist/*
- deactivate
brayns-python-test:
extends: .spack_test
needs: ["brayns-spack-build", "brayns-python-venv"]
timeout: 10 minutes
script:
- cd ${SPACK_SOURCE_DIR}/python
- source pythonvenv/bin/activate
- python -m unittest discover -v --locals -s tests -p test_*.py
- deactivate
brayns-python-format-check:
extends: .spack_test
needs: ["brayns-spack-build", "brayns-python-venv"]
timeout: 10 minutes
script:
- cd ${SPACK_SOURCE_DIR}/python
- source pythonvenv/bin/activate
- TARGETS="brayns doc samples scripts testapi tests setup.py"
- pyright --warnings $TARGETS
- flake8 $TARGETS
- black --check $TARGETS
- deactivate
brayns-python-testapi:
extends: .spack_test
needs: ["brayns-spack-build", "brayns-python-venv"]
timeout: 30 minutes
script:
- module load unstable ffmpeg
- cd ${SPACK_SOURCE_DIR}/python
- source pythonvenv/bin/activate
- export BRAYNS_TEST_EXECUTABLE=${SPACK_BUILD_DIR}/bin/braynsService
- export BRAYNS_TEST_BBP_CIRCUIT=/gpfs/bbp.cscs.ch/project/proj3/TestData/install/share/BBPTestData/circuitBuilding_1000neurons/BlueConfig
- export BRAYNS_TEST_SONATA_CIRCUIT=/gpfs/bbp.cscs.ch/project/proj3/cloned_circuits/GeneratedTest/simulation_config.json
- export BRAYNS_TEST_MORPHOLOGY=/gpfs/bbp.cscs.ch/project/proj3/cloned_circuits/test_morphology.h5
- export BRAYNS_TEST_DTI_FILE=/gpfs/bbp.cscs.ch/project/proj3/TestData/install/share/BBPTestData/DTI/dtitest.json
- export BRAYNS_TEST_NRRD_FOLDER=/gpfs/bbp.cscs.ch/project/proj3/TestData/install/share/BBPTestData/nrrd
- python -m unittest discover -s testapi -p test_*.py
- deactivate