-
Notifications
You must be signed in to change notification settings - Fork 8
/
.gitlab-ci.yml
159 lines (152 loc) · 4.63 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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
test_gcc13_py3_linux:
image: gitlab-registry.mpcdf.mpg.de/mpcdf/ci-module-image/gcc_13:2024
tags:
- docker
variables:
BIOEN_OPENMP: 1
BIOEN_FAST_CFLAGS: 1
before_script:
- module purge
- module load git
- module load gcc
- module load anaconda
- module list
- export CC=`which gcc`
- export CXX=`which g++`
- pushd third-party
- ./install_dependencies.sh
- popd
- export PATH=${HOME}/.local/bin:${PATH}
- pip install . --user
script:
# run the test cases
- pushd test/optimize
- for NT in 1 2 4; do OMP_NUM_THREADS=$NT py.test -sv; done
- popd
- pushd test/deer
- ./run_bioen_deer.sh
- popd
- pushd test/generic
- ./run_bioen.sh
- popd
- pushd test/scattering
- ./run_bioen_saxs.sh
- popd
test_clang_py3_linux:
image: gitlab-registry.mpcdf.mpg.de/mpcdf/ci-module-image/gcc_13:2024
tags:
- docker
variables:
BIOEN_OPENMP: 0
BIOEN_FAST_CFLAGS: 0
before_script:
- module purge
- module load git
- module load gcc
- module load clang
- module load anaconda
- module list
- export CC=`which clang`
- export CXX=`which clang++`
- pushd third-party
- ./install_dependencies.sh
- popd
- export PATH=${HOME}/.local/bin:${PATH}
- pip install . --user
script:
# run the test cases
- pushd test/optimize
- for NT in 1 2 4; do OMP_NUM_THREADS=$NT py.test -sv; done
- popd
- pushd test/deer
- ./run_bioen_deer.sh
- popd
- pushd test/generic
- ./run_bioen.sh
- popd
- pushd test/scattering
- ./run_bioen_saxs.sh
- popd
build_wheels_manylinux2014_x86_64:
image: quay.io/pypa/manylinux2014_x86_64
tags:
- docker
#rules:
# - if: '$CI_COMMIT_BRANCH == "extended_tests"'
# (gitlab runner cache) avoid downloading required packages again and again
cache:
# one would need to change the following key to discard the cache upon the next run
key: "$CI_COMMIT_REF_SLUG"
paths:
- .cache/pip
variables:
#CPYTHONS: "cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310"
#CPYTHONS: "cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39"
CPYTHONS: "cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311 cp312-cp312"
PLAT: "manylinux2014_x86_64"
CFLAGS: "-O3 -march=nehalem -mtune=haswell -Wno-unknown-pragmas -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -ffunction-sections -pipe"
BIOEN_CFLAGS: "$CFLAGS"
BIOEN_OPENMP: "1"
BIOEN_RPATH: "0"
#BIOEN_USE_DEFAULT_GSL: "True"
#BIOEN_USE_DEFAULT_LBFGS: "True"
# (gitlab runner cache) avoid downloading required packages again and again
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
before_script:
- mkdir -p ${PIP_CACHE_DIR}
script:
# --- build GSL and liblbfgs
- pushd third-party
- ./install_dependencies.sh
- popd
# --- build sdist and wheels, ready to be uploaded to pypi
- mkdir packages
- scripts/build_packages.sh
- mv -v dist/* packages/
- mv -v wheelhouse/* packages/
- rmdir dist
- rmdir wheelhouse
only:
- master
- develop
artifacts:
paths:
- packages/
expire_in: 2 days
test_mac_arm64_homebrew:
tags:
- mac_arm64
rules:
- if: '$CI_COMMIT_BRANCH == "extended_tests"'
variables:
# TODO: fix openmp
BIOEN_OPENMP: 0
BIOEN_FAST_CFLAGS: 1
before_script:
- export PATH="/opt/anaconda/2022.05/bin:$PATH"
- export PATH="/opt/homebrew/bin:$PATH"
- export CC=`which gcc-12`
- export CXX=`which g++-12`
# manually clean up potential remnants
- rm -vrf "${HOME}/.local" "${HOME}/Library/Caches/pip"
# build gsl and liblbfgs
- pushd third-party
- ./install_dependencies.sh
- popd
- export PATH=${HOME}/.local/bin:${PATH}
- pip install . --user
script:
# run the test cases
- pushd test/optimize
# TODO: fix openmp
- for NT in 1; do OMP_NUM_THREADS=$NT py.test -sv; done
- popd
- pushd test/deer
- ./run_bioen_deer.sh
- popd
- pushd test/generic
- ./run_bioen.sh
- popd
- pushd test/scattering
- ./run_bioen_saxs.sh
- popd