Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
nettle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Norbert Pócs
nettle
Commits
8b5fb839
Commit
8b5fb839
authored
1 year ago
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
ci: Switch to nettle-build-images, fixes cross builds.
parent
3e24c764
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+69
-56
69 additions, 56 deletions
.gitlab-ci.yml
with
69 additions
and
56 deletions
.gitlab-ci.yml
+
69
−
56
View file @
8b5fb839
variables
:
BUILDENV_NATIVE_IMAGE
:
gnutls/nettle-build-images:buildenv-native
BUILDENV_CLANG_IMAGE
:
gnutls/nettle-build-images:buildenv-clang
BUILDENV_CROSS_IMAGE
:
gnutls/nettle-build-images:buildenv-cross
BUILD_IMAGES_PROJECT
:
gnutls/build-images
DEBIAN_CROSS_BUILD
:
buildenv-debian-cross
FEDORA_BUILD
:
buildenv-fedora31
DEBIAN_X86_CROSS_BUILD
:
buildenv-debian-x86-cross
GET_SOURCES_ATTEMPTS
:
"
3"
# remove any pre-installed headers from nettle
before_script
:
-
yum remove -y nettle-devel
# See http://doc.gitlab.com/ce/ci/yaml/ for documentation.
build/x86-64
:
image
:
$CI_REGISTRY/$BUILD
_IMAGES_PROJECT:$FEDORA_BUILD
image
:
$CI_REGISTRY/$BUILD
ENV_NATIVE_IMAGE
script
:
-
./.bootstrap &&
./configure --disable-static --disable-documentation && make -j4 &&
...
...
@@ -23,7 +20,7 @@ build/x86-64:
except
:
-
tags
build/mini-gmp
:
image
:
$CI_REGISTRY/$BUILD
_IMAGES_PROJECT:$FEDORA_BUILD
image
:
$CI_REGISTRY/$BUILD
ENV_NATIVE_IMAGE
script
:
-
./.bootstrap &&
./configure --disable-documentation --disable-fat --enable-mini-gmp && make -j4 &&
...
...
@@ -34,7 +31,7 @@ build/mini-gmp:
except
:
-
tags
build/c89
:
image
:
$CI_REGISTRY/$BUILD
_IMAGES_PROJECT:$FEDORA_BUILD
image
:
$CI_REGISTRY/$BUILD
ENV_NATIVE_IMAGE
script
:
-
./.bootstrap &&
./configure CC='gcc -std=c89' --disable-static --disable-assembler --disable-documentation && make -j4 &&
...
...
@@ -45,7 +42,7 @@ build/c89:
except
:
-
tags
build/ndebug
:
image
:
$CI_REGISTRY/$BUILD
_IMAGES_PROJECT:$FEDORA_BUILD
image
:
$CI_REGISTRY/$BUILD
ENV_NATIVE_IMAGE
script
:
-
./.bootstrap &&
./configure CPPFLAGS='-DNDEBUG' --disable-static --disable-assembler --disable-documentation && make -j4 &&
...
...
@@ -56,7 +53,7 @@ build/ndebug:
except
:
-
tags
build/ubsan
:
image
:
$CI_REGISTRY/$BUILD
_IMAGES_PROJECT:$FEDORA_BUILD
image
:
$CI_REGISTRY/$BUILD
ENV_NATIVE_IMAGE
script
:
-
./.bootstrap &&
CXXFLAGS="-fsanitize=undefined -fno-sanitize-recover -g -O2" CFLAGS="-fsanitize=undefined -fno-sanitize-recover -g -O2" ./configure --disable-assembler
...
...
@@ -67,7 +64,7 @@ build/ubsan:
except
:
-
tags
build/asan
:
image
:
$CI_REGISTRY/$BUILD
_IMAGES_PROJECT:$FEDORA_BUILD
image
:
$CI_REGISTRY/$BUILD
ENV_NATIVE_IMAGE
script
:
-
./.bootstrap &&
-
CXXFLAGS="-fsanitize=address -g -O2" CFLAGS="-fsanitize=address -g -O2" ./configure --disable-documentation --disable-assembler &&
...
...
@@ -78,7 +75,7 @@ build/asan:
except
:
-
tags
build/static-analyzers
:
image
:
$CI_REGISTRY/$BUILD
_IMAGES_PROJECT:$FEDORA_BUILD
image
:
$CI_REGISTRY/$BUILD
ENV_CLANG_IMAGE
script
:
-
./.bootstrap
-
scan-build ./configure --disable-documentation --disable-assembler
...
...
@@ -94,7 +91,7 @@ build/static-analyzers:
paths
:
-
scan-build-lib/*
build/gnutls
:
image
:
$CI_REGISTRY/$BUILD
_IMAGES_PROJECT:$FEDORA_BUILD
image
:
$CI_REGISTRY/$BUILD
ENV_NATIVE_IMAGE
script
:
-
./.bootstrap &&
./configure --disable-documentation --prefix="$(pwd)/local" --libdir="$(pwd)/local/lib" &&
...
...
@@ -102,7 +99,8 @@ build/gnutls:
-
git clone --depth 1 --branch master https://gitlab.com/gnutls/gnutls.git gnutls-git
-
cd gnutls-git && git submodule update --init && ./bootstrap &&
./configure PKG_CONFIG_PATH="$(pwd)/../local/lib/pkgconfig" CPPFLAGS="-I$(pwd)/../local/include"
LDFLAGS="-L$(pwd)/../local/lib -Wl,-rpath,$(pwd)/../local/lib" --disable-cxx --disable-guile --disable-doc &&
LDFLAGS="-L$(pwd)/../local/lib -Wl,-rpath,$(pwd)/../local/lib"
--disable-cxx --disable-guile --without-p11-kit --disable-doc &&
make -j$(nproc) && make -j $(nproc) check
tags
:
-
shared
...
...
@@ -135,49 +133,9 @@ Debian.cross.x86:
-
linux
except
:
-
tags
.Debian.cross.template
:
&Debian_cross_template
image
:
$CI_REGISTRY/$BUILD_IMAGES_PROJECT:$DEBIAN_CROSS_BUILD
before_script
:
-
host="${CI_JOB_NAME#*.cross.}"
-
dpkg --add-architecture ppc64el
-
dpkg --add-architecture s390x
-
apt-get update -q
# remove any previously installed nettle headers to avoid conflicts
-
for arch in armhf arm64 ppc64el;do apt-get remove -y nettle-dev:$arch;done
-
if [ "$host" == "powerpc64-linux-gnu" ];then apt-get install -y software-properties-common && add-apt-repository "deb http://deb.debian.org/debian bullseye-backports main" && apt-get update && apt-get install -y -t bullseye-backports binfmt-support qemu-user && apt-get install -y gcc-$host g++-$host && export QEMU_LD_PREFIX=/usr/$host EXTRA_CONFIGURE_FLAGS='--enable-mini-gmp';fi
-
if [ "$host" == "powerpc64le-linux-gnu" ];then apt-get install -y software-properties-common && add-apt-repository "deb http://deb.debian.org/debian bullseye-backports main" && apt-get update && apt-get install -y -t bullseye-backports binfmt-support qemu-user && apt-get install -y gcc-$host g++-$host libgmp-dev:ppc64el && export QEMU_LD_PREFIX=/usr/$host;fi
-
if [ "$host" == "s390x-linux-gnu" ];then apt-get update && apt-get install -y gcc-$host g++-$host libgmp-dev:s390x && export EXTRA_CONFIGURE_FLAGS='--disable-assembler';fi
script
:
-
build=$(dpkg-architecture -qDEB_HOST_GNU_TYPE)
-
host="${CI_JOB_NAME#*.cross.}"
# not setting CC_FOR_BUILD paired with qemu-user/binfmt somehow causes
# config.guess to detect the target as the build platform and not activate
# cross-compile mode even though --build is given
-
export CC_FOR_BUILD="gcc"
-
export CC="$host-gcc"
-
./.bootstrap
-
./configure --disable-static --disable-documentation $EXTRA_CONFIGURE_FLAGS --build=$build --host=$host
-
make -j$(nproc)
-
NETTLE_TEST_SEED=0 make -j$(nproc) check
-
NETTLE_TEST_SEED=0 make -j$(nproc) check-fat
tags
:
-
shared
-
linux
except
:
-
tags
Debian.cross.arm-linux-gnueabihf
:
<<
:
*Debian_cross_template
Debian.cross.aarch64-linux-gnu
:
<<
:
*Debian_cross_template
Debian.cross.powerpc64-linux-gnu
:
<<
:
*Debian_cross_template
Debian.cross.powerpc64le-linux-gnu
:
<<
:
*Debian_cross_template
Debian.cross.s390x-linux-gnu
:
<<
:
*Debian_cross_template
remote/s390x
:
image
:
$CI_REGISTRY/$BUILD
_IMAGES_PROJECT:$FEDORA_BUILD
image
:
$CI_REGISTRY/$BUILD
ENV_NATIVE_IMAGE
before_script
:
# File created as world-readable by gitlab ci machinery.
-
chmod 0600 $SSH_PRIVATE_KEY
...
...
@@ -209,3 +167,58 @@ remote/s390x:
-
linux
except
:
-
tags
.cross-build
:
&cross-build
image
:
$CI_REGISTRY/$BUILDENV_CROSS_IMAGE
script
:
-
build=$(dpkg-architecture -qDEB_HOST_GNU_TYPE)
-
host="${CI_JOB_NAME#cross/}"
# Not setting CC_FOR_BUILD paired with qemu-user/binfmt somehow causes
# config.guess to detect the target as the build platform and not activate
# cross-compile mode, even though --build is given.
-
export CC_FOR_BUILD="gcc"
-
export CC="$host-gcc"
# Disable C++, to not depend on cross g++.
-
export CXX=/bin/false
-
./.bootstrap
-
./configure --disable-documentation $EXTRA_CONFIGURE_ARGS --build=$build --host=$host
-
make -j$(nproc)
-
NETTLE_TEST_SEED=0 make EMULATOR=${EMULATOR} -j$(nproc) check
-
NETTLE_TEST_SEED=0 make EMULATOR=${EMULATOR} -j$(nproc) check-fat
tags
:
-
shared
-
linux
except
:
-
tags
cross/arm-linux-gnueabihf
:
extends
:
.cross-build
variables
:
EMULATOR
:
qemu-arm
cross/aarch64-linux-gnu
:
extends
:
.cross-build
variables
:
EMULATOR
:
qemu-aarch64
# Setting QEMU_LD_PREFIX works around the error "qemu-ppc64: Could not
# open '/lib64/ld64.so.1".
cross/powerpc64-linux-gnu
:
extends
:
.cross-build
variables
:
EXTRA_CONFIGURE_ARGS
:
'
--enable-mini-gmp'
QEMU_LD_PREFIX
:
/usr/powerpc64-linux-gnu
EMULATOR
:
qemu-ppc64
cross/powerpc64le-linux-gnu
:
extends
:
.cross-build
variables
:
EMULATOR
:
qemu-ppc64le
# Disable assembly files, because current qemu doesn't support all
# needed instructions.
cross/s390x-linux-gnu
:
extends
:
.cross-build
variables
:
EXTRA_CONFIGURE_ARGS
:
'
--disable-assembler'
EMULATOR
:
qemu-s390x
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment