@@ -2,28 +2,54 @@ include:
2
2
- remote : ' https://gitlab.com/cscs-ci/recipes/-/raw/master/templates/v2/.ci-ext.yml'
3
3
4
4
stages :
5
+ - build
5
6
- test
6
7
7
- test_job :
8
+ build :
9
+ stage : build
10
+ extends : .container-builder-cscs-gh200
11
+ before_script :
12
+ - TAG_DOCKERFILE=`sha256sum $DOCKERFILE | head -c 8`
13
+ - TAG=${TAG_DOCKERFILE}
14
+ - export PERSIST_IMAGE_NAME=$CSCS_REGISTRY_PATH/base/mtt-base:$TAG
15
+ - echo "BASE_IMAGE=$PERSIST_IMAGE_NAME" > build.env
16
+ - ' echo "INFO: Building image $PERSIST_IMAGE_NAME"'
17
+ artifacts :
18
+ reports :
19
+ dotenv : build.env
20
+ variables :
21
+ DOCKERFILE : ci/containers/Containerfile
22
+
23
+ test tox :
8
24
stage : test
9
25
extends : .container-runner-daint-gh200
10
- image : nvcr.io/nvidia/pytorch:24.12-py3
11
- timeout : 2h
26
+ image : $BASE_IMAGE
27
+ timeout : 1h
12
28
script :
13
- - export CUDA_HOME="/usr/local/cuda"
14
- - python3 -m pip install --upgrade pip
15
- - python3 -m pip install tox
16
- - tox
17
- - export Torch_DIR=/usr/local/lib/python3.12/dist-packages/torch/share/cmake/Torch/
18
- - mkdir buildcpp
19
- - cd buildcpp
20
- - cmake .. -DSPHERICART_BUILD_TESTS=ON -DSPHERICART_OPENMP=ON -DSPHERICART_BUILD_EXAMPLES=ON -DSPHERICART_ENABLE_CUDA=ON -DSPHERICART_BUILD_TORCH=ON
21
- - cmake --build . --parallel
22
- - ctest
29
+ - tox -vv -e tests
30
+ - tox -vv -e torch-tests
31
+ - LD_LIBRARY_PATH=$CUDA_HOME/lib64/:$LD_LIBRARY_PATH tox -vv -e jax-tests
32
+ - tox -vv -e examples
33
+ variables :
34
+ SLURM_JOB_NUM_NODES : 1
35
+ SLURM_PARTITION : normal
36
+ SLURM_NTASKS : 1
37
+ SLURM_TIMELIMIT : ' 00:30:00 '
38
+ GIT_STRATEGY : fetch
23
39
40
+ test cpp :
41
+ stage : test
42
+ extends : .container-runner-daint-gh200
43
+ image : $BASE_IMAGE
44
+ timeout : 1h
45
+ script :
46
+ - mkdir buildcpp
47
+ - cmake -B buildcpp -S . -DSPHERICART_BUILD_TESTS=ON -DSPHERICART_OPENMP=ON -DSPHERICART_BUILD_EXAMPLES=ON -DSPHERICART_ENABLE_CUDA=ON -DSPHERICART_BUILD_TORCH=ON
48
+ - cmake --build buildcpp --parallel
49
+ - ctest --test-dir buildcpp --output-on-failure
24
50
variables :
25
51
SLURM_JOB_NUM_NODES : 1
26
52
SLURM_PARTITION : normal
27
53
SLURM_NTASKS : 1
28
- SLURM_TIMELIMIT : ' 02:30 :00'
54
+ SLURM_TIMELIMIT : ' 00:10 :00'
29
55
GIT_STRATEGY : fetch
0 commit comments