Skip to content

Commit 09a7a8e

Browse files
Add CI for GITLAB
1 parent a9d2166 commit 09a7a8e

19 files changed

+182
-7
lines changed

.gitlab-ci.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
default:
2+
interruptible: true
3+
4+
before_script:
5+
- echo "Pipeline Source - ${CI_PIPELINE_SOURCE}"
6+
- git submodule update --init --recursive
7+
8+
stages:
9+
- build
10+
11+
12+
linux:
13+
stage: build
14+
image: ${CI_REGISTRY_IMAGE}/${OS}:${OSVERSION}
15+
needs: []
16+
parallel:
17+
matrix:
18+
- OS: [ "ubuntu" ]
19+
OSVERSION: [ 'focal', 'jammy']
20+
- OS: [ "ubuntu" ]
21+
OSVERSION: [ 'noble' ]
22+
INTEGER8: [ 'INTEGER8_ON', 'INTEGER8_OFF' ]
23+
- OS: [ "ubuntu" ]
24+
OSVERSION: [ 'noble' ]
25+
CC: "clang"
26+
FC: "flang-new"
27+
- OS: [ "fedora" ]
28+
OSVERSION: [ '40', '41', '42', 'rawhide' ]
29+
- OS: [ "almalinux" ]
30+
OSVERSION: [ '8', '9' ]
31+
32+
33+
script:
34+
- export INTEGER8=${INTEGER8##INTEGER8_}
35+
- export INTEGER8=${INTEGER8:-OFF};
36+
- cmake -S . -B build-dir -DINTEGER8=${INTEGER8} -DCMAKE_BUILD_TYPE=RelWithDebInfo
37+
- cmake --build build-dir 2>&1 | tee build.log
38+
- cmake --build build-dir --target install
39+
- (cd build-dir; OMP_NUM_THREADS=1 ctest --output-on-failure)
40+
- cat build.log | grep -- \\[-W | sed 's/.*\[//; s/\]//' | sort | uniq -c | sort -nr
41+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM almalinux:8
2+
RUN dnf update -y ; \
3+
dnf install -y epel-release;\
4+
dnf install -y dnf-plugins-core ;\
5+
dnf config-manager --set-enabled powertools
6+
7+
RUN dnf install -y bash mock git git-core fedora-packager rpmdevtools gcc ; \
8+
dnf install -y cmake blas-devel lapack-devel; \
9+
dnf install -y gcc-gfortran
10+
11+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM almalinux:9
2+
RUN dnf update -y ; \
3+
dnf install -y epel-release; \
4+
dnf install -y dnf-plugins-core; \
5+
dnf config-manager --set-enabled crb ;\
6+
dnf install -y elrepo-release ;\
7+
dnf install -y almalinux-release-devel
8+
9+
RUN dnf install -y bash mock git fedora-packager rpmdevtools gcc; \
10+
dnf install -y cmake flexiblas-devel ;\
11+
dnf install -y gcc-gfortran
12+
13+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
3+
for i in Dockerfile.*
4+
do
5+
echo $i
6+
v=${i#Dockerfile.}
7+
docker build -f "$i" -t gitlab.mpi-magdeburg.mpg.de/software/slicot/almalinux:$v .
8+
docker push gitlab.mpi-magdeburg.mpg.de/software/slicot/almalinux:$v
9+
done
10+

.gitlab/docker/build-all.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/sh
2+
3+
ldir=$(pwd)
4+
for i in *
5+
do
6+
if [ ! -d "$i" ]; then
7+
continue
8+
fi
9+
cd "$i"
10+
sh ./build.sh
11+
cd "$ldir"
12+
done
13+
14+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM fedora:40
2+
RUN dnf update -y ; \
3+
dnf install -y bash mock git fedora-packager rpmdevtools gcc gcc-fortran ; \
4+
dnf install -y cmake flexiblas-devel git
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM fedora:41
2+
RUN dnf update -y ; \
3+
dnf install -y bash mock git fedora-packager rpmdevtools gcc gcc-fortran ; \
4+
dnf install -y cmake flexiblas-devel git
5+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM fedora:42
2+
RUN dnf update -y
3+
RUN dnf upgrade -y
4+
RUN dnf install -y bash mock git fedora-packager rpmdevtools gcc gcc-fortran ; \
5+
dnf install -y cmake flexiblas-devel git
6+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM fedora:rawhide
2+
3+
RUN dnf install -y bash mock git fedora-packager rpmdevtools gcc gcc-fortran ; \
4+
dnf install -y cmake flexiblas-devel git
5+
6+
ENV CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer '
7+
ENV CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer '
8+
ENV FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules '
9+
ENV FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules '
10+
ENV VALAFLAGS=-g
11+
ENV RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-specs=/usr/lib/rpm/redhat/redhat-package-notes --cap-lints=warn'
12+
ENV LDFLAGS='-Wl,-z,relro -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes '
13+
ENV LT_SYS_LIBRARY_PATH=/usr/lib64:
14+
ENV CC=gcc
15+
ENV CXX=g++
16+
ENV RPM_ARCH=x86_64
17+
ENV RPM_PACKAGE_RELEASE=""
18+
ENV RPM_PACKAGE_VERSION=""
19+
ENV RPM_PACKAGE_NAME=""
20+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
3+
for i in Dockerfile.*
4+
do
5+
echo $i
6+
v=${i#Dockerfile.fc}
7+
echo "Build $v"
8+
docker build -f "$i" -t gitlab.mpi-magdeburg.mpg.de/software/slicot/fedora:$v .
9+
docker push gitlab.mpi-magdeburg.mpg.de/software/slicot/fedora:$v
10+
done
11+

0 commit comments

Comments
 (0)