blob: 45b178793973bffec246145f530b76219125d050 (
plain)
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
|
variables:
GIT_STRATEGY: clone
GIT_SUBMODULE_STRATEGY: recursive
GET_SOURCES_ATTEMPTS: 3
DOCKER_BASE_REPO: docker.oecd-nea.org
stages:
- build
- test
- deploy
# - release
default:
tags:
- podman
.release_rules: &RELEASE_RULES
rules:
# Run this job only when a tag is created
- if: '$CI_COMMIT_TAG =~ /v+\d+\.\d+\.\d+/'
.apt_setup: &APT_SETUP |
sed -i 's|http://archive.ubuntu.com|http://debmirror.nea.fr:9999/archive.ubuntu.com|g' /etc/apt/sources.list
sed -i 's|http://security.ubuntu.com|http://debmirror.nea.fr:9999/security.ubuntu.com|g' /etc/apt/sources.list
apt-get update -o Acquire::ForceIPv4=true
.apt2_setup: &APT2_SETUP |
sed -i 's|http://archive.ubuntu.com|http://debmirror.nea.fr:9999/archive.ubuntu.com|g' /etc/apt/sources.list.d/ubuntu.sources
sed -i 's|http://security.ubuntu.com|http://debmirror.nea.fr:9999/security.ubuntu.com|g' /etc/apt/sources.list.d/ubuntu.sources
apt-get update -o Acquire::ForceIPv4=true
.apt_deb_setup: &APT_DEB_SETUP |
sed -i 's|http://deb.debian.org|http://debmirror.nea.fr:9999/deb.debian.org|g' /etc/apt/sources.list
apt-get update -o Acquire::ForceIPv4=true
.apt_deb2_setup: &APT_DEB2_SETUP |
sed -i 's|http://deb.debian.org|http://debmirror.nea.fr:9999/deb.debian.org|g' /etc/apt/sources.list.d/debian.sources
apt-get update -o Acquire::ForceIPv4=true
.build_with_hdf5: &BUILD_WITH_HDF5 |
cd Donjon
make hdf5=1 openmp=1
cd ../PyGan
make hdf5=1 openmp=1
.build_linux_template:
stage: build
before_script:
- *APT_SETUP
- |
env DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \
make gfortran python3 python3-dev python3-numpy python3-distutils libhdf5-serial-dev libomp-dev
after_script:
- mkdir 5.1
- mv Donjon 5.1/
- mv Dragon 5.1/
- mv Ganlib 5.1/
- mv PyGan 5.1/
- mv Trivac 5.1/
- mv script 5.1/
artifacts:
paths:
- 5.1/**/rdonjon
- 5.1/**/rdragon
- 5.1/**/rganlib
- 5.1/**/rpython
- 5.1/**/rtrivac
- 5.1/**/bin
- 5.1/**/lib
- 5.1/**/data
- 5.1/PyGan/Makefile
- 5.1/script
expire_in: 1 day
when: always
build_ubuntu20:
extends: .build_linux_template
image: docker.oecd-nea.org/dragon/5.1/ubuntu:20.04
script:
- export HDF5_INC=/usr/include/hdf5/serial
- export HDF5_API=/usr/lib/x86_64-linux-gnu/hdf5/serial
- export FORTRANPATH=/usr/lib/gcc/x86_64-linux-gnu/9
- *BUILD_WITH_HDF5
build_ubuntu22:
extends: .build_linux_template
image: docker.oecd-nea.org/dragon/5.1/ubuntu:22.04
script:
- export HDF5_INC=/usr/include/hdf5/serial
- export HDF5_API=/usr/lib/x86_64-linux-gnu/hdf5/serial
- export FORTRANPATH=/usr/lib/gcc/x86_64-linux-gnu/11
- *BUILD_WITH_HDF5
# uses python 3.12
build_ubuntu24:
extends: .build_linux_template
image: docker.oecd-nea.org/dragon/5.1/ubuntu:24.04
before_script:
- *APT2_SETUP
- |
env DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \
make gfortran python3 python3-dev python3-numpy python3-setuptools libhdf5-serial-dev libomp-dev
script:
- export HDF5_INC=/usr/include/hdf5/serial
- export HDF5_API=/usr/lib/x86_64-linux-gnu/hdf5/serial
- export FORTRANPATH=/usr/lib/gcc/x86_64-linux-gnu/13
- *BUILD_WITH_HDF5
.test_template:
stage: test
image: docker.oecd-nea.org/dragon/5.1/ubuntu:22.04
variables:
GIT_STRATEGY: none
needs:
- job: build_ubuntu22
artifacts: true
before_script:
- *APT_SETUP
# Note that the binaries require gfortran (a matching version) at runtime
- |
env DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \
python3 python3-numpy python3-distutils python3-matplotlib libomp-dev \
make gfortran wget libhdf5-serial-dev libomp-dev
- export HDF5_INC=/usr/include/hdf5/serial
- export HDF5_API=/usr/lib/x86_64-linux-gnu/hdf5/serial
- export DRAGON_HOME=$CI_PROJECT_DIR/dragon
- export DRAGON_LIB_DIR=$DRAGON_HOME/libraries/l_endian
- export DRAGON_CODE_DIR=$DRAGON_HOME/5.1
- mkdir -p ${DRAGON_LIB_DIR}
- mv 5.1 ${DRAGON_HOME}/
test_ganlib_ubuntu22:
extends: .test_template
script:
- cd ${DRAGON_CODE_DIR}/Ganlib
- ./rganlib -q testgan1.x2m
- ./rganlib -q testgan2.x2m
- ./rganlib -q testgan3.x2m
- ./rganlib -q testgan4.x2m
test_dragon_ubuntu22:
extends: .test_template
script:
- cd ${DRAGON_LIB_DIR}
# get JEF 2.2 for testing
- wget --no-check-certificate https://git.oecd-nea.org/dragon/libraries/-/raw/main/l_endian/draglibJef2p2.gz
# get JEF 3.1.1 for OpenMP testing
- wget --no-check-certificate https://git.oecd-nea.org/dragon/libraries/-/raw/main/l_endian/draglibJeff3p1p1SHEM295_v5p1.gz
- cd ${DRAGON_CODE_DIR}/Dragon
- ./rdragon -q salmacro.x2m
- ./rdragon -q tdraglib.x2m
- ./rdragon -q pincell_mpo.x2m
- ./rdragon -q -p 8 uo2_295_kec1_openMP.x2m
test_donjon_ubuntu22:
extends: .test_template
script:
- cd ${DRAGON_LIB_DIR}
# get JEF 2.2 for testing
- wget --no-check-certificate https://git.oecd-nea.org/dragon/libraries/-/raw/main/l_endian/draglibJef2p2Apolib99_v5p1.gz
- cd ${DRAGON_CODE_DIR}/Donjon
- ./rdonjon -q rep900_msap.x2m
- ./rdonjon -q Reflector_beavrs_DF-RT_Jef2p2Apolib99.x2m
- ./rdonjon -q Fessenheim.x2m
test_pygan_ubuntu22:
extends: .test_template
script:
- cd ${DRAGON_LIB_DIR}
# get JEF 2.2 for testing
- wget --no-check-certificate https://git.oecd-nea.org/dragon/libraries/-/raw/main/l_endian/draglibJeff3p1p1SHEM295_v5p1.gz
- cd ${DRAGON_CODE_DIR}/PyGan
- make tests hdf5=1 openmp=1
docker_ubuntu24_slim:
stage: deploy
image:
# recommended image for building with kaniko
# https://docs.gitlab.com/ee/ci/docker/using_kaniko.html#building-a-docker-image-with-kaniko
name: ${DOCKER_BASE_REPO}/dragon/5.1/kaniko:v1.23.0-debug
entrypoint: [""]
needs:
- job: test_ganlib_ubuntu22
artifacts: false
- job: test_dragon_ubuntu22
artifacts: false
- job: test_donjon_ubuntu22
artifacts: false
- job: test_pygan_ubuntu22
artifacts: false
script:
- |
cat <<EOF > /kaniko/.docker/config.json
{
"auths": {
"docker.oecd-nea.org": {
"username": "$CI_DEPLOY_USER",
"password": "$CI_DEPLOY_PASSWORD"
}
}
}
EOF
# TODO: change the hardcoded docker tag to use a git tag
- >
/kaniko/executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/.nea/docker/Dockerfile.slim"
--destination "${DOCKER_BASE_REPO}/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}:v5.1.0-slim"
--single-snapshot --cache=false
|