]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
.gitlab-ci.yml: added cross compilation and tests on mips/aarch64/arm
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Tue, 10 Jul 2018 18:58:36 +0000 (20:58 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Thu, 12 Jul 2018 08:35:27 +0000 (10:35 +0200)
This utilizes the qemu-user system used by gnutls. This also
deprecates the previous aarch64 build.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
.gitlab-ci.yml

index 52f41c74e54e1a322aa0cb158bd02a2c61c88fa2..166de71be8d85b38a47c22d7dc3d9e3107519368 100644 (file)
@@ -1,5 +1,6 @@
 variables:
   BUILD_IMAGES_PROJECT: gnutls/build-images
+  DEBIAN_CROSS_BUILD: buildenv-debian-cross
   FEDORA_BUILD: buildenv-f28
   FEDORA_X86_BUILD: buildenv-f28-x86
   GET_SOURCES_ATTEMPTS: "3"
@@ -29,19 +30,6 @@ build/x86:
   - shared
   except:
   - tags
-build/aarch64:
-  before_script:
-  - /bin/true
-  script:
-  - ./.bootstrap &&
-    ./configure --enable-fat --disable-documentation && make -j4 &&
-    make check -j4
-  tags:
-  - aarch64
-  only:
-  - branches@gnutls/nettle
-  except:
-  - tags
 build/mini-gmp:
   image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
   script:
@@ -110,3 +98,30 @@ build/gnutls:
       - gnutls-git/*.log
       - gnutls-git/tests/*/*.log
       - gnutls-git/tests/suite/*/*.log
+.Debian.cross.template: &Debian_cross_template
+  image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$DEBIAN_CROSS_BUILD
+  before_script:
+  # remove any previously installed nettle headers to avoid conflicts
+  - for arch in armhf mips arm64;do apt-get remove -y nettle-dev:$arch;done
+  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 --enable-fat --disable-documentation --build=$build --host=$host
+  - make -j$(nproc)
+  - make -j$(nproc) check
+  tags:
+  - shared
+  except:
+  - tags
+Debian.cross.arm-linux-gnueabihf:
+  <<: *Debian_cross_template
+Debian.cross.mips-linux-gnu:
+  <<: *Debian_cross_template
+Debian.cross.aarch64-linux-gnu:
+  <<: *Debian_cross_template