Merge branch 'wip/pwithnall/ci-cleanups' into 'main'

ci: Various cleanups and moving Android API 21 and FreeBSD 12 to scheduled run

See merge request GNOME/glib!2514
This commit is contained in:
Nirbheek Chauhan 2022-02-21 15:31:41 +00:00
commit 94f3bb7074
3 changed files with 52 additions and 55 deletions

View File

@ -26,19 +26,29 @@ variables:
except:
- tags
.build:
extends: .only-default
before_script:
- bash .gitlab-ci/show-execution-environment.sh
- cp -r $HOME/subprojects/* subprojects/
# Some jobs run on CI runners which dont have good isolation between CI jobs,
# and dont have much available resource. Limit those jobs to only ones on the
# origin repository (GNOME/glib), rather than peoples forks. Code in the origin
# repository can be trusted.
.only-origin:
only:
- branches@GNOME/glib
except:
- tags
# Some jobs take a long time and are unlikely to find failures (or will find
# failures which are not merge-blockers to fix), so theyre executed on a weekly
# schedule in order to save CI resources and speed up branch pipelines.
.build-only-schedules:
extends: .build
.only-schedules:
only:
- schedules
except:
- tags
.build-linux:
before_script:
- bash .gitlab-ci/show-execution-environment.sh
- cp -r $HOME/subprojects/* subprojects/
style-check-diff:
extends: .only-default
@ -60,7 +70,9 @@ check-todos:
- .gitlab-ci/run-check-todos.sh
fedora-x86_64:
extends: .build
extends:
- .build-linux
- .only-default
image: $FEDORA_IMAGE
stage: build
needs: []
@ -109,7 +121,9 @@ fedora-x86_64:
- "_coverage"
debian-stable-x86_64:
extends: .build
extends:
- .build-linux
- .only-default
image: $DEBIAN_IMAGE
stage: build
needs: []
@ -139,7 +153,9 @@ debian-stable-x86_64:
- "_build/${CI_JOB_NAME}-report.xml"
installed-tests:
extends: .build-only-schedules
extends:
- .build-linux
- .only-schedules
image: $FEDORA_IMAGE
stage: build
needs: []
@ -175,7 +191,9 @@ installed-tests:
- "_build/installed-tests-report/"
G_DISABLE_ASSERT:
extends: .build-only-schedules
extends:
- .build-linux
- .only-schedules
image: $FEDORA_IMAGE
stage: build
needs: []
@ -202,7 +220,9 @@ G_DISABLE_ASSERT:
- "_build/${CI_JOB_NAME}-report.xml"
valgrind:
extends: .build-only-schedules
extends:
- .build-linux
- .only-schedules
image: $FEDORA_IMAGE
stage: analysis
needs: []
@ -235,8 +255,8 @@ valgrind:
- "_build/glib/glibconfig.h"
- "_build/meson-logs"
.cross-template: &cross-template
extends: .build
.cross-build-linux:
extends: .build-linux
stage: build
needs: []
artifacts:
@ -245,18 +265,10 @@ valgrind:
paths:
- "_build/meson-logs"
cross-android_api21_arm64:
<<: *cross-template
image: $ANDROID_IMAGE
script:
# FIXME: add --werror
# We use -Diconv=auto to test that we successfully detect that iconv is not
# provided by android api 21, and detect the external iconv instead.
- meson ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_android_arm64_21.txt -Diconv=auto _build
- ninja -C _build
cross-android_api28_arm64:
<<: *cross-template
extends:
- .cross-build-linux
- .only-default
image: $ANDROID_IMAGE
script:
# FIXME: add --werror
@ -264,7 +276,9 @@ cross-android_api28_arm64:
- ninja -C _build
cross-mingw64:
<<: *cross-template
extends:
- .cross-build-linux
- .only-default
image: $MINGW_IMAGE
script:
# FIXME: Add --werror
@ -351,9 +365,11 @@ vs2017-x64-static:
- "_build/${env:CI_JOB_NAME}-report.xml"
freebsd-12-x86_64:
# The FreeBSD 13 build is run on each commit, so the FreeBSD 12 build can be
# run less regularly to save CI resources. The chance of a regression on
# FreeBSD 12 and not FreeBSD 13 is tiny.
extends: .only-schedules
stage: build
only:
- branches@GNOME/glib
tags:
# To run a FreeBSD builder, install gitlab-runner package and start both
# gitlab-runner and dbus service because we need /var/lib/dbus/machine-id.
@ -382,8 +398,6 @@ freebsd-12-x86_64:
- meson ${MESON_COMMON_OPTIONS} --localstatedir=/var -Db_lundef=false -Diconv=external -Dxattr=false _build
- ninja -C _build
- bash -x ./.gitlab-ci/run-tests.sh
except:
- tags
artifacts:
reports:
junit: "_build/${CI_JOB_NAME}-report.xml"
@ -396,9 +410,8 @@ freebsd-12-x86_64:
- "_build/${CI_JOB_NAME}-report.xml"
freebsd-13-x86_64:
extends: .only-origin
stage: build
only:
- branches@GNOME/glib
tags:
- freebsd-13
needs: []
@ -412,8 +425,6 @@ freebsd-13-x86_64:
- meson ${MESON_COMMON_OPTIONS} --localstatedir=/var -Db_lundef=false -Diconv=external -Dxattr=false _build
- ninja -C _build
- bash -x ./.gitlab-ci/run-tests.sh
except:
- tags
artifacts:
reports:
junit: "_build/${CI_JOB_NAME}-report.xml"
@ -426,10 +437,8 @@ freebsd-13-x86_64:
- "_build/${CI_JOB_NAME}-report.xml"
macos:
extends: .only-default
extends: .only-origin
stage: build
only:
- branches@GNOME/glib
tags:
- macos
needs: []
@ -478,7 +487,9 @@ coverage:
coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
scan-build:
extends: .build-only-schedules
extends:
- .build-linux
- .only-schedules
image: $FEDORA_IMAGE
stage: analysis
needs: []
@ -502,7 +513,9 @@ scan-build:
- "_scan_build/meson-logs/scanbuild"
coverity:
extends: .build-only-schedules
extends:
- .build-linux
- .only-schedules
image: $COVERITY_IMAGE
stage: analysis
needs: []

View File

@ -60,7 +60,6 @@ ENV ANDROID_NDK_PATH /opt/android-ndk
COPY android-download-ndk.sh .
RUN ./android-download-ndk.sh
COPY android-setup-env.sh .
RUN ./android-setup-env.sh arm64 21
RUN ./android-setup-env.sh arm64 28
RUN rm -rf $ANDROID_NDK_PATH

View File

@ -38,21 +38,6 @@ export LD=$target_host-ld
export STRIP=$target_host-strip
export PATH=$PATH:$toolchain_path/bin
# Cross build libiconv when using API level <= 28.
# Newer Android has it in its libc already.
if [ "$api" -lt "28" ]; then
wget --quiet http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz
echo "1233fe3ca09341b53354fd4bfe342a7589181145a1232c9919583a8c9979636855839049f3406f253a9d9829908816bb71fd6d34dd544ba290d6f04251376b1a libiconv-1.15.tar.gz" | sha512sum -c
tar xzf libiconv-1.15.tar.gz
pushd libiconv-1.15
./configure --host="${target_host}" --prefix="${prefix_path}" --libdir="${prefix_path}/lib64"
make
make install
popd
rm libiconv-1.15.tar.gz
rm -r libiconv-1.15
fi
# Cross build libffi
wget --quiet https://github.com/libffi/libffi/releases/download/v3.3-rc0/libffi-3.3-rc0.tar.gz
echo "e6e695d32cd6eb7d65983f32986fccdfc786a593d2ea18af30ce741f58cfa1eb264b1a8d09df5084cb916001aea15187b005c2149a0620a44397a4453b6137d4 libffi-3.3-rc0.tar.gz" | sha512sum -c