-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
131 lines (124 loc) · 7.47 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
stages:
- test
- deploy
tests-on-ubuntu-20.04-with-apt: # MG20250117: This leads to seg fault while manipulating vtk objects…
stage: test
when: manual
tags:
- ci.inria.fr
- large
image: ubuntu:20.04
# image: registry.gitlab.inria.fr/inria-ci/docker/ubuntu:20.04
# image: quay.io/fenicsproject/stable:latest # MG20211221: somehow this does not work
# image: python $ MG20211221: this seems to be debian not ubuntu, which is necessary for ppa install
script:
- apt update; apt upgrade -y
- apt update; DEBIAN_FRONTEND=noninteractive TZ=Europe/Paris apt install -y git gnuplot python3-matplotlib python3-numpy python3-pandas python3-pip python-is-python3 # MG20220814: environment variables are needed to prevent tzdata installation hanging while waiting timezone info, cf. https://anonoz.github.io/tech/2020/04/24/docker-build-stuck-tzdata.html
- apt update; apt install -y software-properties-common; add-apt-repository -y ppa:fenics-packages/fenics; apt update; apt install -y fenics; export DISPLAY=0:0
# - apt update; apt install -y libopenblas-base; export OMP_NUM_THREADS="1" # MG20221201: This seems to fail in ubuntu 20.04
- apt update; apt install -y libvtk7-dev python3-vtk7; export CPATH="/usr/include/vtk-7.1":$CPATH
# - apt update; apt install -y libgl1-mesa-dev libglu1-mesa-dev libxcursor-dev libxft-dev libxinerama1 gcc-multilib xvfb gmsh; pip install gmsh
- pip install gmsh
- apt update; apt install -y python3-h5py; pip install meshio; pip install --upgrade numpy # MG20220814: meshio needs latest numpy apparently
- pip install numpy==1.23.5 # MG20230103: apparently numpy >= 1.24 does not work anymore with the old version of pandas (and probably other stuff) present in Ubuntu 20.04 apt repo, cf. https://stackoverflow.com/a/74975994
- pip install git+https://gitlab.inria.fr/mgenet/myPythonLibrary.git
- pip install git+https://gitlab.inria.fr/mgenet/myVTKPythonLibrary.git
- cd Tests; ln -s ../dolfin_mech; make
tests-on-ubuntu-22.04-with-apt:
stage: test
when: manual
tags:
- ci.inria.fr
- large
image: ubuntu:22.04
script:
- apt update; apt upgrade -y
- apt update; DEBIAN_FRONTEND=noninteractive TZ=Europe/Paris apt install -y git gnuplot python3-matplotlib python3-numpy python3-pandas python3-pip python-is-python3 # MG20220814: environment variables are needed to prevent tzdata installation hanging while waiting timezone info, cf. https://anonoz.github.io/tech/2020/04/24/docker-build-stuck-tzdata.html
- apt update; apt install -y software-properties-common; add-apt-repository -y ppa:fenics-packages/fenics; apt update; apt install -y fenics; export DISPLAY=0:0
- apt update; apt install -y libopenblas-base; export OMP_NUM_THREADS="1"
- apt update; apt install -y libvtk9-dev python3-vtk9; export CPATH="/usr/include/vtk-9.1":$CPATH
# - apt update; apt install -y libgl1-mesa-dev libglu1-mesa-dev libxcursor-dev libxft-dev libxinerama1 gcc-multilib xvfb gmsh; pip install gmsh
- pip install gmsh
- apt update; apt install -y python3-h5py; pip install meshio; pip install --upgrade numpy # MG20220814: meshio needs latest numpy apparently
- pip install numpy==1.24.3 # MG20230103: apparently numpy >= 1.25 does not work anymore with the old version of scipy (and probably other stuff) present in Ubuntu 22.04 apt repo
- pip install git+https://gitlab.inria.fr/mgenet/myPythonLibrary.git
- pip install git+https://gitlab.inria.fr/mgenet/myVTKPythonLibrary.git
- cd Tests; ln -s ../dolfin_mech; make
tests-on-ubuntu-20.04:
stage: test
only:
- devel
- /^devel-.*/
tags:
- ci.inria.fr
- large
image: ubuntu:20.04
script:
- apt update; DEBIAN_FRONTEND=noninteractive TZ=Europe/Paris apt upgrade -y
- apt update; DEBIAN_FRONTEND=noninteractive TZ=Europe/Paris apt install -y build-essential gcc-multilib git gnuplot libgl1-mesa-dev libglu1-mesa-dev libxcursor-dev libxinerama1 libxft-dev wget xvfb
# - apt update; DEBIAN_FRONTEND=noninteractive TZ=Europe/Paris apt install -y libopenblas-base; export OMP_NUM_THREADS="1" # MG20221201: This seems to fail in Ubuntu 20.04
- wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh; bash Miniconda3-latest-Linux-x86_64.sh -b -p /root/miniconda; eval "$(/root/miniconda/bin/conda shell.bash hook)"; conda init
- conda create -y -c conda-forge -n dolfin_mech fenics=2019.1.0 meshio=5.3 mpi4py=3.1.3 numpy=1.24 pandas=1.3 pip python=3.10; conda activate dolfin_mech
- pip install gmsh git+https://gitlab.inria.fr/mgenet/myPythonLibrary.git git+https://gitlab.inria.fr/mgenet/myVTKPythonLibrary.git
- cd Tests; ln -s ../dolfin_mech; make
tests-on-ubuntu-22.04:
stage: test
only:
- devel
- /^devel-.*/
tags:
- ci.inria.fr
- large
image: ubuntu:22.04
script:
- apt update; DEBIAN_FRONTEND=noninteractive TZ=Europe/Paris apt upgrade -y
- apt update; DEBIAN_FRONTEND=noninteractive TZ=Europe/Paris apt install -y build-essential gcc-multilib git gnuplot libgl1-mesa-dev libglu1-mesa-dev libxcursor-dev libxinerama1 libxft-dev wget xvfb
- apt update; DEBIAN_FRONTEND=noninteractive TZ=Europe/Paris apt install -y libopenblas-base; export OMP_NUM_THREADS="1"
- wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh; bash Miniconda3-latest-Linux-x86_64.sh -b -p /root/miniconda; eval "$(/root/miniconda/bin/conda shell.bash hook)"; conda init
- conda create -y -c conda-forge -n dolfin_mech fenics=2019.1.0 meshio=5.3 mpi4py=3.1.3 numpy=1.24 pandas=1.3 pip python=3.10; conda activate dolfin_mech
- pip install gmsh git+https://gitlab.inria.fr/mgenet/myPythonLibrary.git git+https://gitlab.inria.fr/mgenet/myVTKPythonLibrary.git
- cd Tests; ln -s ../dolfin_mech; make
tests-on-ubuntu-24.04:
stage: test
only:
- devel
- /^devel-.*/
tags:
- ci.inria.fr
- large
image: ubuntu:24.04
script:
- apt update; DEBIAN_FRONTEND=noninteractive TZ=Europe/Paris apt upgrade -y
- apt update; DEBIAN_FRONTEND=noninteractive TZ=Europe/Paris apt install -y build-essential gcc-multilib git gnuplot libgl1-mesa-dev libglu1-mesa-dev libxcursor-dev libxinerama1 libxft-dev wget xvfb
# - apt update; DEBIAN_FRONTEND=noninteractive TZ=Europe/Paris apt install -y libopenblas-base; export OMP_NUM_THREADS="1" # MG20241017: Not present in Ubuntu 24.04
- wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh; bash Miniconda3-latest-Linux-x86_64.sh -b -p /root/miniconda; eval "$(/root/miniconda/bin/conda shell.bash hook)"; conda init
- conda create -y -c conda-forge -n dolfin_mech fenics=2019.1.0 meshio=5.3 mpi4py=3.1.3 numpy=1.24 pandas=1.3 pip python=3.10; conda activate dolfin_mech
- pip install gmsh git+https://gitlab.inria.fr/mgenet/myPythonLibrary.git git+https://gitlab.inria.fr/mgenet/myVTKPythonLibrary.git
- cd Tests; ln -s ../dolfin_mech; make
pypi:
stage: deploy
only:
- master
tags:
- ci.inria.fr
- small
image: python
variables:
TWINE_USERNAME: $PYPI_USER
TWINE_PASSWORD: $PYPI_PASS
script:
- pip install -U setuptools twine
- python setup.py sdist bdist_wheel
- twine upload dist/*
gitlab:
stage: deploy
only:
- master
tags:
- ci.inria.fr
- small
image: python
script:
- pip install -U setuptools twine
- python setup.py sdist bdist_wheel
- TWINE_USERNAME=gitlab-ci-token TWINE_PASSWORD=${CI_JOB_TOKEN} twine upload --verbose --skip-existing --repository-url https://gitlab.inria.fr/api/v4/projects/${CI_PROJECT_ID}/packages/pypi dist/*