-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
135 lines (119 loc) · 3.21 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
stages:
- pixi
- image
- lint
- test
- report
- test-release
- doc
variables:
CODECOV_TOKEN: 4ebf45ff-904a-4a74-aa03-d9fba26cc145
COVERAGE_DIR: .coverage_$CI_COMMIT_SHA
DOCKER_IMAGE_PATH: registry.heptapod.net:443/fluiddyn/fluidfft/ci/default
image: $DOCKER_IMAGE_PATH:stable
# ugly workaround https://gitlab.com/gitlab-org/gitlab/-/issues/370052#note_1207556577
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
when: never
- if: $CI_COMMIT_BRANCH
- if: $CI_COMMIT_TAG
pixi-test:
stage: pixi
image: registry.heptapod.net:443/fluiddyn/fluiddyn/ci/default:pixi
script:
- pixi info
- pixi run install-editable
- pixi run pip install plugins/fluidfft-fftw -v --no-build-isolation --no-deps
- pixi run pytest -v tests
- pixi run pytest -v plugins/fluidfft-fftw
pixi-test-mpi:
stage: pixi
image: registry.heptapod.net:443/fluiddyn/fluiddyn/ci/default:pixi
needs: []
variables:
OMPI_MCA_plm_rsh_agent: ""
script:
- cd plugins
- pixi run install-editable-mpi_with_fftw
- pixi run test-mpi_with_fftw
- pixi run install-editable-fftwmpi
- pixi run test-fftwmpi
# Build an image for the other tasks; this should be a scheduled job, as
# it is quite unnecessary to run on every invocation.
image:build:
stage: image
needs: []
tags:
- container-registry-push
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
- if: '$CI_BUILD_IMAGES == "1"'
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [ "" ]
before_script:
- ""
script:
- |
cat > /kaniko/.docker/config.json <<EOF
{
"auths": {
"$CI_REGISTRY": {
"username": "$CI_REGISTRY_USER",
"password": "$CI_REGISTRY_PASSWORD"
}
}
}
EOF
- >
/kaniko/executor --context $CI_PROJECT_DIR
--dockerfile $CI_PROJECT_DIR/docker/Dockerfile
--single-snapshot
--cleanup
--destination $DOCKER_IMAGE_PATH:stable
validate_code:
stage: lint
needs:
- job: "image:build"
optional: true
script:
- echo "CI_COMMIT_HG_BRANCH $CI_COMMIT_HG_BRANCH"
- echo "CI_COMMIT_BRANCH $CI_COMMIT_BRANCH"
- nox -s validate_code
tests_seq:
stage: test
needs:
- job: "image:build"
optional: true
script:
- nox -s "tests(with_cov=True, with_mpi=False)"
tests_mpi:
stage: test
needs:
- job: "image:build"
optional: true
script:
- nox -s "tests(with_cov=True, with_mpi=True)" -- --with-pfft --with-p3dfft
pages:
stage: doc
needs:
- job: "image:build"
optional: true
script:
- nox -s doc
- mkdir -p public/$CI_COMMIT_REF_NAME
- rsync -rvc --delete doc/_build/html/* public/$CI_COMMIT_REF_NAME/
# This directory can become too large leading to error.
# It can be purged with the botton "Clear runner caches"
# in https://foss.heptapod.net/fluiddyn/fluidfft/-/pipelines
- ls public
- echo "CI_COMMIT_REF_NAME="$CI_COMMIT_REF_NAME
- echo See https://fluiddyn.pages.heptapod.net/fluidfft/$CI_COMMIT_REF_NAME
artifacts:
name: "$CI_COMMIT_REF_NAME"
paths:
- public
expire_in: 5 days
when: always