parent
e0f44326cb
commit
966ab23a99
285
.gitlab-ci.yml
285
.gitlab-ci.yml
|
@ -17,14 +17,20 @@ include:
|
||||||
- project: 'freedesktop/ci-templates'
|
- project: 'freedesktop/ci-templates'
|
||||||
ref: *template_sha
|
ref: *template_sha
|
||||||
file: '/templates/fedora.yml'
|
file: '/templates/fedora.yml'
|
||||||
|
# Freebsd container builder template
|
||||||
|
- project: 'freedesktop/ci-templates'
|
||||||
|
ref: *template_sha
|
||||||
|
file: '/templates/freebsd.yml'
|
||||||
- project: 'freedesktop/ci-templates'
|
- project: 'freedesktop/ci-templates'
|
||||||
ref: *template_sha
|
ref: *template_sha
|
||||||
file: '/templates/ci-fairy.yml'
|
file: '/templates/ci-fairy.yml'
|
||||||
- local: '.gitlab-ci/other.yml'
|
- local: '.gitlab-ci/other.yml'
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
|
- sanity check
|
||||||
- prep
|
- prep
|
||||||
- test
|
- test
|
||||||
|
- deploy
|
||||||
- container_clean
|
- container_clean
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
|
@ -35,9 +41,45 @@ variables:
|
||||||
# changing these will force rebuilding the associated image
|
# changing these will force rebuilding the associated image
|
||||||
# Note: these tags have no meaning and are not tied to a particular
|
# Note: these tags have no meaning and are not tied to a particular
|
||||||
# fontconfig version
|
# fontconfig version
|
||||||
FEDORA_TAG: '2023-12-05.0-e56dbdc02823'
|
FEDORA_TAG: '2023-12-05.1-7b7a4d882550'
|
||||||
|
FREEBSD_TAG: '2023-12-05.1-9e4cd5a85377'
|
||||||
|
|
||||||
FEDORA_EXEC: 'bash .gitlab-ci/fedora-install.sh'
|
FEDORA_EXEC: 'bash .gitlab-ci/fedora-install.sh'
|
||||||
|
FREEBSD_EXEC: 'bash .gitlab-ci/freebsd-install.sh'
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# #
|
||||||
|
# sanity check #
|
||||||
|
# #
|
||||||
|
#######################################
|
||||||
|
|
||||||
|
fail-if-fork-is-not-public:
|
||||||
|
stage: sanity check
|
||||||
|
script:
|
||||||
|
- |
|
||||||
|
if [ $CI_PROJECT_VISIBILITY != "public" ]; then
|
||||||
|
echo "*************************************************************************************"
|
||||||
|
echo "Project visibility must be set to 'public'."
|
||||||
|
echo "Change this in $CI_PROJECT_URL/edit under 'Visibility, project features, permissions'"
|
||||||
|
echo "*************************************************************************************"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
except:
|
||||||
|
- main@fontconfig/fontconfig
|
||||||
|
|
||||||
|
check-ci-script:
|
||||||
|
extends:
|
||||||
|
- .fdo.ci-fairy
|
||||||
|
stage: sanity check
|
||||||
|
script:
|
||||||
|
- ci-fairy generate-template --verify && exit 0 || true
|
||||||
|
- >
|
||||||
|
printf "%s\n" \
|
||||||
|
"Committed gitlab-ci.yml differs from generated gitlab-ci.yml." \
|
||||||
|
"To change the gitlab CI, edit .gitlab-ci/ci.template and/or .gitlab-ci/config.yml" \
|
||||||
|
" and run ci-fairy generate-template. For details, see " \
|
||||||
|
"https://freedesktop.pages.freedesktop.org/ci-templates/ci-fairy.html#templating-gitlab-ci-yml"
|
||||||
|
- exit 1
|
||||||
|
|
||||||
#######################################
|
#######################################
|
||||||
# #
|
# #
|
||||||
|
@ -78,6 +120,30 @@ fedora:38@container-prep:
|
||||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||||
FDO_DISTRIBUTION_EXEC: $FEDORA_EXEC
|
FDO_DISTRIBUTION_EXEC: $FEDORA_EXEC
|
||||||
|
|
||||||
|
freebsd:14.0@container-prep:
|
||||||
|
extends: .fdo.qemu-build@freebsd
|
||||||
|
tags:
|
||||||
|
- kvm
|
||||||
|
stage: prep
|
||||||
|
variables:
|
||||||
|
GIT_STRATEGY: none
|
||||||
|
FDO_DISTRIBUTION_VERSION: '14.0'
|
||||||
|
FDO_DISTRIBUTION_PACKAGES: 'gcc autoconf automake libtool gettext gperf expat libxml2 freetype2 json-c git ninja wget python3 py39-pip pkgconf gmake'
|
||||||
|
FDO_DISTRIBUTION_TAG: $FREEBSD_TAG
|
||||||
|
FDO_DISTRIBUTION_EXEC: $FREEBSD_EXEC
|
||||||
|
|
||||||
|
freebsd:13.2@container-prep:
|
||||||
|
extends: .fdo.qemu-build@freebsd
|
||||||
|
tags:
|
||||||
|
- kvm
|
||||||
|
stage: prep
|
||||||
|
variables:
|
||||||
|
GIT_STRATEGY: none
|
||||||
|
FDO_DISTRIBUTION_VERSION: '13.2'
|
||||||
|
FDO_DISTRIBUTION_PACKAGES: 'gcc autoconf automake libtool gettext gperf expat libxml2 freetype2 json-c git ninja wget python3 py39-pip pkgconf gmake'
|
||||||
|
FDO_DISTRIBUTION_TAG: $FREEBSD_TAG
|
||||||
|
FDO_DISTRIBUTION_EXEC: $FREEBSD_EXEC
|
||||||
|
|
||||||
#######################################
|
#######################################
|
||||||
# #
|
# #
|
||||||
# container clean stage #
|
# container clean stage #
|
||||||
|
@ -138,6 +204,24 @@ fedora:38@container-clean:
|
||||||
FDO_DISTRIBUTION_VERSION: '38'
|
FDO_DISTRIBUTION_VERSION: '38'
|
||||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||||
|
|
||||||
|
freebsd:14.0@container-clean:
|
||||||
|
extends:
|
||||||
|
- .container-clean
|
||||||
|
variables:
|
||||||
|
GIT_STRATEGY: none
|
||||||
|
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/freebsd/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||||
|
FDO_DISTRIBUTION_VERSION: '14.0'
|
||||||
|
FDO_DISTRIBUTION_TAG: $FREEBSD_TAG
|
||||||
|
|
||||||
|
freebsd:13.2@container-clean:
|
||||||
|
extends:
|
||||||
|
- .container-clean
|
||||||
|
variables:
|
||||||
|
GIT_STRATEGY: none
|
||||||
|
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/freebsd/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||||
|
FDO_DISTRIBUTION_VERSION: '13.2'
|
||||||
|
FDO_DISTRIBUTION_TAG: $FREEBSD_TAG
|
||||||
|
|
||||||
|
|
||||||
#######################################
|
#######################################
|
||||||
# #
|
# #
|
||||||
|
@ -145,9 +229,68 @@ fedora:38@container-clean:
|
||||||
# #
|
# #
|
||||||
#######################################
|
#######################################
|
||||||
|
|
||||||
|
.check_tainted: &check_tainted |
|
||||||
|
# make sure the kernel is not tainted
|
||||||
|
if [[ "$(ssh localhost -p 5555 cat /proc/sys/kernel/tainted)" -gt 0 ]];
|
||||||
|
then
|
||||||
|
echo tainted kernel ;
|
||||||
|
exit 1 ;
|
||||||
|
fi
|
||||||
|
|
||||||
|
.build-in-qemu@template:
|
||||||
|
tags:
|
||||||
|
- kvm
|
||||||
|
script:
|
||||||
|
- /app/vmctl start || (echo "Error - Failed to start the VM." && exit 1)
|
||||||
|
|
||||||
|
- *check_tainted
|
||||||
|
|
||||||
|
- export BUILD_ID="fontconfig-$CI_JOB_NAME_$CI_COMMIT_SHA-$CI_JOB_ID"
|
||||||
|
- export PREFIX="$(pwd)/prefix-$BUILD_ID"
|
||||||
|
- export BUILDDIR="$(pwd)/build-$BUILD_ID"
|
||||||
|
- export MAKEFLAGS="-j4"
|
||||||
|
- |
|
||||||
|
buildopt=()
|
||||||
|
for bo in $FC_BUILD_ENABLED; do
|
||||||
|
buildopt+=(-e $bo)
|
||||||
|
done
|
||||||
|
for bo in $FC_BUILD_DISABLED; do
|
||||||
|
buildopt+=(-d $bo)
|
||||||
|
done
|
||||||
|
[ -n "$FC_BUILD_ARCH" ] && buildopt+=(-a $FC_BUILD_ARCH)
|
||||||
|
[ $FC_BUILD_DISTCHECK -eq 1 ] && buildopt+=(-c)
|
||||||
|
[ $FC_BUILD_NO_INSTALL -eq 1 ] && buildopt+=(-I)
|
||||||
|
[ $FC_BUILD_NO_CHECK -eq 1 ] && buildopt+=(-C)
|
||||||
|
buildopt+=(-s $FC_BUILDSYS)
|
||||||
|
buildopt+=(-t $FC_BUILD_TYPE)
|
||||||
|
buildopt+=(-X $FC_XML_BACKEND)
|
||||||
|
export buildopt
|
||||||
|
- "scp -r $(pwd) vm:"
|
||||||
|
- echo "CI_JOB_ID=\"$CI_JOB_ID\"" > fcenv
|
||||||
|
- echo "CI_JOB_NAME=\"$CI_JOB_NAME\"" >> fcenv
|
||||||
|
- echo "BUILD_ID=\"$BUILD_ID\"" >> fcenv
|
||||||
|
- echo "MAKEFLAGS=\"$MAKEFLAGS\"" >> fcenv
|
||||||
|
- echo "MAKE=\"$MAKE\"" >> fcenv
|
||||||
|
- "scp fcenv vm:~/$CI_PROJECT_NAME/.gitlab-ci/fcenv"
|
||||||
|
- /app/vmctl exec "cd $CI_PROJECT_NAME ; bash .gitlab-ci/build.sh ${buildopt[@]}" && touch .success || true
|
||||||
|
- scp -r vm:$CI_PROJECT_NAME/build $BUILDDIR
|
||||||
|
|
||||||
|
- *check_tainted
|
||||||
|
|
||||||
|
- /app/vmctl stop
|
||||||
|
- if [[ ! -e .success ]];
|
||||||
|
then
|
||||||
|
exit 1 ;
|
||||||
|
fi
|
||||||
|
variables:
|
||||||
|
FC_BUILDSYS: autotools
|
||||||
|
FC_XML_BACKEND: expat
|
||||||
|
FC_BUILD_TYPE: both
|
||||||
|
FC_BUILD_DISTCHECK: 0
|
||||||
|
FC_BUILD_NO_INSTALL: 0
|
||||||
|
FC_BUILD_NO_CHECK: 0
|
||||||
|
|
||||||
.build@template:
|
.build@template:
|
||||||
before_script:
|
|
||||||
- pip install meson
|
|
||||||
script:
|
script:
|
||||||
- export BUILD_ID="fontconfig-$CI_JOB_NAME_$CI_COMMIT_SHA-$CI_JOB_ID"
|
- export BUILD_ID="fontconfig-$CI_JOB_NAME_$CI_COMMIT_SHA-$CI_JOB_ID"
|
||||||
- export PREFIX="$(pwd)/prefix-$BUILD_ID"
|
- export PREFIX="$(pwd)/prefix-$BUILD_ID"
|
||||||
|
@ -164,16 +307,18 @@ fedora:38@container-clean:
|
||||||
[ -n "$FC_BUILD_ARCH" ] && buildopt+=(-a $FC_BUILD_ARCH)
|
[ -n "$FC_BUILD_ARCH" ] && buildopt+=(-a $FC_BUILD_ARCH)
|
||||||
[ $FC_BUILD_DISTCHECK -eq 1 ] && buildopt+=(-c)
|
[ $FC_BUILD_DISTCHECK -eq 1 ] && buildopt+=(-c)
|
||||||
[ $FC_BUILD_NO_INSTALL -eq 1 ] && buildopt+=(-I)
|
[ $FC_BUILD_NO_INSTALL -eq 1 ] && buildopt+=(-I)
|
||||||
|
[ $FC_BUILD_NO_CHECK -eq 1 ] && buildopt+=(-C)
|
||||||
buildopt+=(-s $FC_BUILDSYS)
|
buildopt+=(-s $FC_BUILDSYS)
|
||||||
buildopt+=(-t $FC_BUILD_TYPE)
|
buildopt+=(-t $FC_BUILD_TYPE)
|
||||||
buildopt+=(-X $FC_XML_BACKEND)
|
buildopt+=(-X $FC_XML_BACKEND)
|
||||||
sh .gitlab-ci/build.sh ${buildopt[*]}
|
sh .gitlab-ci/build.sh ${buildopt[@]}
|
||||||
variables:
|
variables:
|
||||||
FC_BUILDSYS: autotools
|
FC_BUILDSYS: autotools
|
||||||
FC_XML_BACKEND: expat
|
FC_XML_BACKEND: expat
|
||||||
FC_BUILD_TYPE: both
|
FC_BUILD_TYPE: both
|
||||||
FC_BUILD_DISTCHECK: 0
|
FC_BUILD_DISTCHECK: 0
|
||||||
FC_BUILD_NO_INSTALL: 0
|
FC_BUILD_NO_INSTALL: 0
|
||||||
|
FC_BUILD_NO_CHECK: 0
|
||||||
|
|
||||||
.fc_artifacts:
|
.fc_artifacts:
|
||||||
artifacts:
|
artifacts:
|
||||||
|
@ -181,9 +326,11 @@ fedora:38@container-clean:
|
||||||
when: always
|
when: always
|
||||||
expire_in: 5 days
|
expire_in: 5 days
|
||||||
paths:
|
paths:
|
||||||
- fc-build.log
|
- build*/fc-build.log
|
||||||
- build-*/fontconfig-*.tar.*
|
- build*/fontconfig-*.tar.*
|
||||||
- build-*/fontconfig*/_build
|
- build*/test/*log
|
||||||
|
- build*/fontconfig*/_build
|
||||||
|
- build*/meson-logs/*
|
||||||
|
|
||||||
#######################################
|
#######################################
|
||||||
# #
|
# #
|
||||||
|
@ -594,3 +741,127 @@ t_fedora:38:mingw meson static expat:
|
||||||
- 'fedora:38@container-prep'
|
- 'fedora:38@container-prep'
|
||||||
|
|
||||||
|
|
||||||
|
t_freebsd:14.0:autotools shared expat:
|
||||||
|
extends:
|
||||||
|
- .build-in-qemu@template
|
||||||
|
- .fdo.distribution-image@freebsd
|
||||||
|
- .fc_artifacts
|
||||||
|
variables:
|
||||||
|
FC_DISTRO_NAME: freebsd
|
||||||
|
FDO_DISTRIBUTION_VERSION: '14.0'
|
||||||
|
FDO_DISTRIBUTION_TAG: $FREEBSD_TAG
|
||||||
|
FC_BUILDSYS: autotools
|
||||||
|
FC_BUILD_TYPE: shared
|
||||||
|
FC_XML_BACKEND: expat
|
||||||
|
MAKE: gmake
|
||||||
|
FC_BUILD_NO_CHECK: 1
|
||||||
|
needs:
|
||||||
|
- 'freebsd:14.0@container-prep'
|
||||||
|
|
||||||
|
|
||||||
|
t_freebsd:14.0:autotools shared libxml2:
|
||||||
|
extends:
|
||||||
|
- .build-in-qemu@template
|
||||||
|
- .fdo.distribution-image@freebsd
|
||||||
|
- .fc_artifacts
|
||||||
|
variables:
|
||||||
|
FC_DISTRO_NAME: freebsd
|
||||||
|
FDO_DISTRIBUTION_VERSION: '14.0'
|
||||||
|
FDO_DISTRIBUTION_TAG: $FREEBSD_TAG
|
||||||
|
FC_BUILDSYS: autotools
|
||||||
|
FC_BUILD_TYPE: shared
|
||||||
|
FC_XML_BACKEND: libxml2
|
||||||
|
MAKE: gmake
|
||||||
|
FC_BUILD_NO_CHECK: 1
|
||||||
|
needs:
|
||||||
|
- 'freebsd:14.0@container-prep'
|
||||||
|
|
||||||
|
|
||||||
|
t_freebsd:14.0:meson shared expat:
|
||||||
|
extends:
|
||||||
|
- .build-in-qemu@template
|
||||||
|
- .fdo.distribution-image@freebsd
|
||||||
|
- .fc_artifacts
|
||||||
|
variables:
|
||||||
|
FC_DISTRO_NAME: freebsd
|
||||||
|
FDO_DISTRIBUTION_VERSION: '14.0'
|
||||||
|
FDO_DISTRIBUTION_TAG: $FREEBSD_TAG
|
||||||
|
FC_BUILDSYS: meson
|
||||||
|
FC_BUILD_TYPE: shared
|
||||||
|
FC_XML_BACKEND: expat
|
||||||
|
FC_BUILD_NO_CHECK: 1
|
||||||
|
needs:
|
||||||
|
- 'freebsd:14.0@container-prep'
|
||||||
|
|
||||||
|
|
||||||
|
t_freebsd:13.2:autotools shared expat:
|
||||||
|
extends:
|
||||||
|
- .build-in-qemu@template
|
||||||
|
- .fdo.distribution-image@freebsd
|
||||||
|
- .fc_artifacts
|
||||||
|
variables:
|
||||||
|
FC_DISTRO_NAME: freebsd
|
||||||
|
FDO_DISTRIBUTION_VERSION: '13.2'
|
||||||
|
FDO_DISTRIBUTION_TAG: $FREEBSD_TAG
|
||||||
|
FC_BUILDSYS: autotools
|
||||||
|
FC_BUILD_TYPE: shared
|
||||||
|
FC_XML_BACKEND: expat
|
||||||
|
MAKE: gmake
|
||||||
|
FC_BUILD_NO_CHECK: 1
|
||||||
|
needs:
|
||||||
|
- 'freebsd:13.2@container-prep'
|
||||||
|
|
||||||
|
|
||||||
|
t_freebsd:13.2:autotools shared libxml2:
|
||||||
|
extends:
|
||||||
|
- .build-in-qemu@template
|
||||||
|
- .fdo.distribution-image@freebsd
|
||||||
|
- .fc_artifacts
|
||||||
|
variables:
|
||||||
|
FC_DISTRO_NAME: freebsd
|
||||||
|
FDO_DISTRIBUTION_VERSION: '13.2'
|
||||||
|
FDO_DISTRIBUTION_TAG: $FREEBSD_TAG
|
||||||
|
FC_BUILDSYS: autotools
|
||||||
|
FC_BUILD_TYPE: shared
|
||||||
|
FC_XML_BACKEND: libxml2
|
||||||
|
MAKE: gmake
|
||||||
|
FC_BUILD_NO_CHECK: 1
|
||||||
|
needs:
|
||||||
|
- 'freebsd:13.2@container-prep'
|
||||||
|
|
||||||
|
|
||||||
|
t_freebsd:13.2:meson shared expat:
|
||||||
|
extends:
|
||||||
|
- .build-in-qemu@template
|
||||||
|
- .fdo.distribution-image@freebsd
|
||||||
|
- .fc_artifacts
|
||||||
|
variables:
|
||||||
|
FC_DISTRO_NAME: freebsd
|
||||||
|
FDO_DISTRIBUTION_VERSION: '13.2'
|
||||||
|
FDO_DISTRIBUTION_TAG: $FREEBSD_TAG
|
||||||
|
FC_BUILDSYS: meson
|
||||||
|
FC_BUILD_TYPE: shared
|
||||||
|
FC_XML_BACKEND: expat
|
||||||
|
FC_BUILD_NO_CHECK: 1
|
||||||
|
needs:
|
||||||
|
- 'freebsd:13.2@container-prep'
|
||||||
|
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# #
|
||||||
|
# deploy stage #
|
||||||
|
# #
|
||||||
|
#######################################
|
||||||
|
|
||||||
|
check-merge-request:
|
||||||
|
extends:
|
||||||
|
- .fdo.ci-fairy
|
||||||
|
stage: deploy
|
||||||
|
script:
|
||||||
|
- ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml
|
||||||
|
artifacts:
|
||||||
|
when: on_failure
|
||||||
|
reports:
|
||||||
|
junit: results.xml
|
||||||
|
allow_failure: true
|
||||||
|
|
||||||
|
|
|
@ -3,29 +3,36 @@
|
||||||
set -ex
|
set -ex
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
|
cidir=$(dirname $0)
|
||||||
|
[ -f ${cidir}/fcenv ] && . ${cidir}/fcenv
|
||||||
|
|
||||||
case "$OSTYPE" in
|
case "$OSTYPE" in
|
||||||
msys) MyPWD=$(pwd -W) ;;
|
msys) MyPWD=$(pwd -W) ;;
|
||||||
|
*BSD) PATH=$PATH:/usr/local/bin ;&
|
||||||
*) MyPWD=$(pwd) ;;
|
*) MyPWD=$(pwd) ;;
|
||||||
esac
|
esac
|
||||||
enable=()
|
enable=()
|
||||||
disable=()
|
disable=()
|
||||||
distcheck=0
|
distcheck=0
|
||||||
enable_install=1
|
enable_install=1
|
||||||
|
disable_check=0
|
||||||
cross=0
|
cross=0
|
||||||
buildsys="autotools"
|
buildsys="autotools"
|
||||||
type="both"
|
type="both"
|
||||||
arch=""
|
arch=""
|
||||||
buildopt=()
|
buildopt=()
|
||||||
SRCDIR=$MyPWD
|
SRCDIR=$MyPWD
|
||||||
|
export MAKE=${MAKE:-make}
|
||||||
export BUILD_ID=${BUILD_ID:-fontconfig-$$}
|
export BUILD_ID=${BUILD_ID:-fontconfig-$$}
|
||||||
export PREFIX=${PREFIX:-$MyPWD/prefix}
|
export PREFIX=${PREFIX:-$MyPWD/prefix}
|
||||||
export BUILDDIR=${BUILDDIR:-$MyPWD/build}
|
export BUILDDIR=${BUILDDIR:-$MyPWD/build}
|
||||||
|
|
||||||
while getopts a:ce:d:hIs:t:X: OPT
|
while getopts a:cCe:d:hIs:t:X: OPT
|
||||||
do
|
do
|
||||||
case $OPT in
|
case $OPT in
|
||||||
'a') arch=$OPTARG ;;
|
'a') arch=$OPTARG ;;
|
||||||
'c') distcheck=1 ;;
|
'c') distcheck=1 ;;
|
||||||
|
'C') disable_check=1 ;;
|
||||||
'e') enable+=($OPTARG) ;;
|
'e') enable+=($OPTARG) ;;
|
||||||
'd') disable+=($OPTARG) ;;
|
'd') disable+=($OPTARG) ;;
|
||||||
'I') enable_install=0 ;;
|
'I') enable_install=0 ;;
|
||||||
|
@ -87,15 +94,18 @@ if [ x"$buildsys" == "xautotools" ]; then
|
||||||
mkdir "$BUILDDIR" "$PREFIX"
|
mkdir "$BUILDDIR" "$PREFIX"
|
||||||
cd "$BUILDDIR"
|
cd "$BUILDDIR"
|
||||||
../autogen.sh --prefix="$PREFIX" ${buildopt[*]} 2>&1 | tee /tmp/fc-build.log || r=$?
|
../autogen.sh --prefix="$PREFIX" ${buildopt[*]} 2>&1 | tee /tmp/fc-build.log || r=$?
|
||||||
make V=1 2>&1 | tee -a /tmp/fc-build.log || r=$?
|
$MAKE V=1 2>&1 | tee -a /tmp/fc-build.log || r=$?
|
||||||
make check V=1 2>&1 | tee -a /tmp/fc-build.log || r=$?
|
if [ $disable_check -eq 0 ]; then
|
||||||
|
$MAKE check V=1 2>&1 | tee -a /tmp/fc-build.log || r=$?
|
||||||
|
fi
|
||||||
if [ $enable_install -eq 1 ]; then
|
if [ $enable_install -eq 1 ]; then
|
||||||
make install V=1 2>&1 | tee -a /tmp/fc-build.log || r=$?
|
$MAKE install V=1 2>&1 | tee -a /tmp/fc-build.log || r=$?
|
||||||
fi
|
fi
|
||||||
if [ $distcheck -eq 1 ]; then
|
if [ $distcheck -eq 1 ]; then
|
||||||
make distcheck V=1 2>&1 | tee -a /tmp/fc-build.log || r=$?
|
$MAKE distcheck V=1 2>&1 | tee -a /tmp/fc-build.log || r=$?
|
||||||
fi
|
fi
|
||||||
elif [ x"$buildsys" == "xmeson" ]; then
|
elif [ x"$buildsys" == "xmeson" ]; then
|
||||||
|
pip install meson
|
||||||
for i in "${enable[@]}"; do
|
for i in "${enable[@]}"; do
|
||||||
buildopt+=(-D$i=true)
|
buildopt+=(-D$i=true)
|
||||||
done
|
done
|
||||||
|
@ -120,7 +130,9 @@ elif [ x"$buildsys" == "xmeson" ]; then
|
||||||
buildopt+=(--default-library=$type)
|
buildopt+=(--default-library=$type)
|
||||||
meson setup --prefix="$PREFIX" ${buildopt[*]} "$BUILDDIR" 2>&1 | tee /tmp/fc-build.log || r=$?
|
meson setup --prefix="$PREFIX" ${buildopt[*]} "$BUILDDIR" 2>&1 | tee /tmp/fc-build.log || r=$?
|
||||||
meson compile -v -C "$BUILDDIR" 2>&1 | tee -a /tmp/fc-build.log || r=$?
|
meson compile -v -C "$BUILDDIR" 2>&1 | tee -a /tmp/fc-build.log || r=$?
|
||||||
|
if [ $disable_check -eq 0 ]; then
|
||||||
meson test -v -C "$BUILDDIR" 2>&1 | tee -a /tmp/fc-build.log || r=$?
|
meson test -v -C "$BUILDDIR" 2>&1 | tee -a /tmp/fc-build.log || r=$?
|
||||||
|
fi
|
||||||
if [ $enable_install -eq 1 ]; then
|
if [ $enable_install -eq 1 ]; then
|
||||||
meson install -C "$BUILDDIR" 2>&1 | tee -a /tmp/fc-build.log || r=$?
|
meson install -C "$BUILDDIR" 2>&1 | tee -a /tmp/fc-build.log || r=$?
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -27,8 +27,10 @@ include:
|
||||||
- local: '.gitlab-ci/other.yml'
|
- local: '.gitlab-ci/other.yml'
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
|
- sanity check
|
||||||
- prep
|
- prep
|
||||||
- test
|
- test
|
||||||
|
- deploy
|
||||||
- container_clean
|
- container_clean
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
|
@ -40,16 +42,50 @@ variables:
|
||||||
# Note: these tags have no meaning and are not tied to a particular
|
# Note: these tags have no meaning and are not tied to a particular
|
||||||
# fontconfig version
|
# fontconfig version
|
||||||
{% for distro in distributions %}
|
{% for distro in distributions %}
|
||||||
{{"%-13s"| format(distro.name.upper() + '_TAG:')}}'{{distro.tag}}-{{
|
{{"%-15s"| format(distro.name.upper() + '_TAG:')}}'{{distro.tag}}-{{
|
||||||
(ci_fairy.hashfiles('.gitlab-ci/config.yml',
|
(ci_fairy.hashfiles('.gitlab-ci/config.yml',
|
||||||
'.gitlab-ci/' + distro.name + '-install.sh'))[0:12]
|
'.gitlab-ci/' + distro.name + '-install.sh'))[0:12]
|
||||||
}}'
|
}}'
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% for distro in distributions %}
|
{% for distro in distributions %}
|
||||||
{{"%-13s"| format(distro.name.upper() + '_EXEC:')}}'bash .gitlab-ci/{{distro.name}}-install.sh'
|
{{"%-15s"| format(distro.name.upper() + '_EXEC:')}}'bash .gitlab-ci/{{distro.name}}-install.sh'
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# #
|
||||||
|
# sanity check #
|
||||||
|
# #
|
||||||
|
#######################################
|
||||||
|
|
||||||
|
fail-if-fork-is-not-public:
|
||||||
|
stage: sanity check
|
||||||
|
script:
|
||||||
|
- |
|
||||||
|
if [ $CI_PROJECT_VISIBILITY != "public" ]; then
|
||||||
|
echo "*************************************************************************************"
|
||||||
|
echo "Project visibility must be set to 'public'."
|
||||||
|
echo "Change this in $CI_PROJECT_URL/edit under 'Visibility, project features, permissions'"
|
||||||
|
echo "*************************************************************************************"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
except:
|
||||||
|
- main@fontconfig/fontconfig
|
||||||
|
|
||||||
|
check-ci-script:
|
||||||
|
extends:
|
||||||
|
- .fdo.ci-fairy
|
||||||
|
stage: sanity check
|
||||||
|
script:
|
||||||
|
- ci-fairy generate-template --verify && exit 0 || true
|
||||||
|
- >
|
||||||
|
printf "%s\n" \
|
||||||
|
"Committed gitlab-ci.yml differs from generated gitlab-ci.yml." \
|
||||||
|
"To change the gitlab CI, edit .gitlab-ci/ci.template and/or .gitlab-ci/config.yml" \
|
||||||
|
" and run ci-fairy generate-template. For details, see " \
|
||||||
|
"https://freedesktop.pages.freedesktop.org/ci-templates/ci-fairy.html#templating-gitlab-ci-yml"
|
||||||
|
- exit 1
|
||||||
|
|
||||||
#######################################
|
#######################################
|
||||||
# #
|
# #
|
||||||
# containers stage #
|
# containers stage #
|
||||||
|
@ -62,7 +98,15 @@ variables:
|
||||||
{% for version in distro.versions %}
|
{% for version in distro.versions %}
|
||||||
|
|
||||||
{{distro.name}}:{{version}}@container-prep:
|
{{distro.name}}:{{version}}@container-prep:
|
||||||
|
{% if distro.qemu_based %}
|
||||||
|
extends: .fdo.qemu-build@{{distro.name}}
|
||||||
|
{% else %}
|
||||||
extends: .fdo.container-build@{{distro.name}}
|
extends: .fdo.container-build@{{distro.name}}
|
||||||
|
{% endif %}
|
||||||
|
{% if distro.qemu_based %}
|
||||||
|
tags:
|
||||||
|
- kvm
|
||||||
|
{% endif %}
|
||||||
stage: prep
|
stage: prep
|
||||||
variables:
|
variables:
|
||||||
GIT_STRATEGY: none
|
GIT_STRATEGY: none
|
||||||
|
@ -126,9 +170,68 @@ variables:
|
||||||
# #
|
# #
|
||||||
#######################################
|
#######################################
|
||||||
|
|
||||||
|
.check_tainted: &check_tainted |
|
||||||
|
# make sure the kernel is not tainted
|
||||||
|
if [[ "$(ssh localhost -p 5555 cat /proc/sys/kernel/tainted)" -gt 0 ]];
|
||||||
|
then
|
||||||
|
echo tainted kernel ;
|
||||||
|
exit 1 ;
|
||||||
|
fi
|
||||||
|
|
||||||
|
.build-in-qemu@template:
|
||||||
|
tags:
|
||||||
|
- kvm
|
||||||
|
script:
|
||||||
|
- /app/vmctl start || (echo "Error - Failed to start the VM." && exit 1)
|
||||||
|
|
||||||
|
- *check_tainted
|
||||||
|
|
||||||
|
- export BUILD_ID="fontconfig-$CI_JOB_NAME_$CI_COMMIT_SHA-$CI_JOB_ID"
|
||||||
|
- export PREFIX="$(pwd)/prefix-$BUILD_ID"
|
||||||
|
- export BUILDDIR="$(pwd)/build-$BUILD_ID"
|
||||||
|
- export MAKEFLAGS="-j4"
|
||||||
|
- |
|
||||||
|
buildopt=()
|
||||||
|
for bo in $FC_BUILD_ENABLED; do
|
||||||
|
buildopt+=(-e $bo)
|
||||||
|
done
|
||||||
|
for bo in $FC_BUILD_DISABLED; do
|
||||||
|
buildopt+=(-d $bo)
|
||||||
|
done
|
||||||
|
[ -n "$FC_BUILD_ARCH" ] && buildopt+=(-a $FC_BUILD_ARCH)
|
||||||
|
[ $FC_BUILD_DISTCHECK -eq 1 ] && buildopt+=(-c)
|
||||||
|
[ $FC_BUILD_NO_INSTALL -eq 1 ] && buildopt+=(-I)
|
||||||
|
[ $FC_BUILD_NO_CHECK -eq 1 ] && buildopt+=(-C)
|
||||||
|
buildopt+=(-s $FC_BUILDSYS)
|
||||||
|
buildopt+=(-t $FC_BUILD_TYPE)
|
||||||
|
buildopt+=(-X $FC_XML_BACKEND)
|
||||||
|
export buildopt
|
||||||
|
- "scp -r $(pwd) vm:"
|
||||||
|
- echo "CI_JOB_ID=\"$CI_JOB_ID\"" > fcenv
|
||||||
|
- echo "CI_JOB_NAME=\"$CI_JOB_NAME\"" >> fcenv
|
||||||
|
- echo "BUILD_ID=\"$BUILD_ID\"" >> fcenv
|
||||||
|
- echo "MAKEFLAGS=\"$MAKEFLAGS\"" >> fcenv
|
||||||
|
- echo "MAKE=\"$MAKE\"" >> fcenv
|
||||||
|
- "scp fcenv vm:~/$CI_PROJECT_NAME/.gitlab-ci/fcenv"
|
||||||
|
- /app/vmctl exec "cd $CI_PROJECT_NAME ; bash .gitlab-ci/build.sh ${buildopt[@]}" && touch .success || true
|
||||||
|
- scp -r vm:$CI_PROJECT_NAME/build $BUILDDIR
|
||||||
|
|
||||||
|
- *check_tainted
|
||||||
|
|
||||||
|
- /app/vmctl stop
|
||||||
|
- if [[ ! -e .success ]];
|
||||||
|
then
|
||||||
|
exit 1 ;
|
||||||
|
fi
|
||||||
|
variables:
|
||||||
|
FC_BUILDSYS: autotools
|
||||||
|
FC_XML_BACKEND: expat
|
||||||
|
FC_BUILD_TYPE: both
|
||||||
|
FC_BUILD_DISTCHECK: 0
|
||||||
|
FC_BUILD_NO_INSTALL: 0
|
||||||
|
FC_BUILD_NO_CHECK: 0
|
||||||
|
|
||||||
.build@template:
|
.build@template:
|
||||||
before_script:
|
|
||||||
- pip install meson
|
|
||||||
script:
|
script:
|
||||||
- export BUILD_ID="fontconfig-$CI_JOB_NAME_$CI_COMMIT_SHA-$CI_JOB_ID"
|
- export BUILD_ID="fontconfig-$CI_JOB_NAME_$CI_COMMIT_SHA-$CI_JOB_ID"
|
||||||
- export PREFIX="$(pwd)/prefix-$BUILD_ID"
|
- export PREFIX="$(pwd)/prefix-$BUILD_ID"
|
||||||
|
@ -145,16 +248,18 @@ variables:
|
||||||
[ -n "$FC_BUILD_ARCH" ] && buildopt+=(-a $FC_BUILD_ARCH)
|
[ -n "$FC_BUILD_ARCH" ] && buildopt+=(-a $FC_BUILD_ARCH)
|
||||||
[ $FC_BUILD_DISTCHECK -eq 1 ] && buildopt+=(-c)
|
[ $FC_BUILD_DISTCHECK -eq 1 ] && buildopt+=(-c)
|
||||||
[ $FC_BUILD_NO_INSTALL -eq 1 ] && buildopt+=(-I)
|
[ $FC_BUILD_NO_INSTALL -eq 1 ] && buildopt+=(-I)
|
||||||
|
[ $FC_BUILD_NO_CHECK -eq 1 ] && buildopt+=(-C)
|
||||||
buildopt+=(-s $FC_BUILDSYS)
|
buildopt+=(-s $FC_BUILDSYS)
|
||||||
buildopt+=(-t $FC_BUILD_TYPE)
|
buildopt+=(-t $FC_BUILD_TYPE)
|
||||||
buildopt+=(-X $FC_XML_BACKEND)
|
buildopt+=(-X $FC_XML_BACKEND)
|
||||||
sh .gitlab-ci/build.sh ${buildopt[*]}
|
sh .gitlab-ci/build.sh ${buildopt[@]}
|
||||||
variables:
|
variables:
|
||||||
FC_BUILDSYS: autotools
|
FC_BUILDSYS: autotools
|
||||||
FC_XML_BACKEND: expat
|
FC_XML_BACKEND: expat
|
||||||
FC_BUILD_TYPE: both
|
FC_BUILD_TYPE: both
|
||||||
FC_BUILD_DISTCHECK: 0
|
FC_BUILD_DISTCHECK: 0
|
||||||
FC_BUILD_NO_INSTALL: 0
|
FC_BUILD_NO_INSTALL: 0
|
||||||
|
FC_BUILD_NO_CHECK: 0
|
||||||
|
|
||||||
.fc_artifacts:
|
.fc_artifacts:
|
||||||
artifacts:
|
artifacts:
|
||||||
|
@ -162,9 +267,11 @@ variables:
|
||||||
when: always
|
when: always
|
||||||
expire_in: 5 days
|
expire_in: 5 days
|
||||||
paths:
|
paths:
|
||||||
- fc-build.log
|
- build*/fc-build.log
|
||||||
- build-*/fontconfig-*.tar.*
|
- build*/fontconfig-*.tar.*
|
||||||
- build-*/fontconfig*/_build
|
- build*/test/*log
|
||||||
|
- build*/fontconfig*/_build
|
||||||
|
- build*/meson-logs/*
|
||||||
|
|
||||||
#######################################
|
#######################################
|
||||||
# #
|
# #
|
||||||
|
@ -178,7 +285,11 @@ variables:
|
||||||
|
|
||||||
t_{{distro.name}}:{{version}}:{{build.name}}:
|
t_{{distro.name}}:{{version}}:{{build.name}}:
|
||||||
extends:
|
extends:
|
||||||
|
{% if distro.qemu_based %}
|
||||||
|
- .build-in-qemu@template
|
||||||
|
{% else %}
|
||||||
- .build@template
|
- .build@template
|
||||||
|
{% endif %}
|
||||||
- .fdo.distribution-image@{{distro.name}}
|
- .fdo.distribution-image@{{distro.name}}
|
||||||
- .fc_artifacts
|
- .fc_artifacts
|
||||||
variables:
|
variables:
|
||||||
|
@ -198,3 +309,21 @@ t_{{distro.name}}:{{version}}:{{build.name}}:
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# #
|
||||||
|
# deploy stage #
|
||||||
|
# #
|
||||||
|
#######################################
|
||||||
|
|
||||||
|
check-merge-request:
|
||||||
|
extends:
|
||||||
|
- .fdo.ci-fairy
|
||||||
|
stage: deploy
|
||||||
|
script:
|
||||||
|
- ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml
|
||||||
|
artifacts:
|
||||||
|
when: on_failure
|
||||||
|
reports:
|
||||||
|
junit: results.xml
|
||||||
|
allow_failure: true
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
.default_tag: &default_tag "2023-12-05.0"
|
.default_tag: &default_tag "2023-12-05.1"
|
||||||
|
|
||||||
distributions:
|
distributions:
|
||||||
- name: fedora
|
- name: fedora
|
||||||
tag: *default_tag
|
tag: *default_tag
|
||||||
base_type: fedora
|
base_type: fedora
|
||||||
|
qemu_based: false
|
||||||
versions:
|
versions:
|
||||||
- "rawhide"
|
- "rawhide"
|
||||||
- "39"
|
- "39"
|
||||||
|
@ -55,6 +56,34 @@ distributions:
|
||||||
FC_BUILD_PLATFORM: mingw
|
FC_BUILD_PLATFORM: mingw
|
||||||
FC_BUILD_ARCH: linux-mingw-w64-64bit
|
FC_BUILD_ARCH: linux-mingw-w64-64bit
|
||||||
FC_BUILD_NO_INSTALL: 1
|
FC_BUILD_NO_INSTALL: 1
|
||||||
|
- name: freebsd
|
||||||
|
tag: *default_tag
|
||||||
|
base_type: freebsd
|
||||||
|
qemu_based: true
|
||||||
|
versions:
|
||||||
|
- "14.0"
|
||||||
|
- "13.2"
|
||||||
|
builds:
|
||||||
|
- name: "autotools shared expat"
|
||||||
|
variables:
|
||||||
|
FC_BUILDSYS: autotools
|
||||||
|
FC_BUILD_TYPE: shared
|
||||||
|
FC_XML_BACKEND: expat
|
||||||
|
MAKE: gmake
|
||||||
|
FC_BUILD_NO_CHECK: 1 # FIXME: There is GNU-specific parameter issue in touch command.
|
||||||
|
- name: "autotools shared libxml2"
|
||||||
|
variables:
|
||||||
|
FC_BUILDSYS: autotools
|
||||||
|
FC_BUILD_TYPE: shared
|
||||||
|
FC_XML_BACKEND: libxml2
|
||||||
|
MAKE: gmake
|
||||||
|
FC_BUILD_NO_CHECK: 1
|
||||||
|
- name: "meson shared expat"
|
||||||
|
variables:
|
||||||
|
FC_BUILDSYS: meson
|
||||||
|
FC_BUILD_TYPE: shared
|
||||||
|
FC_XML_BACKEND: expat
|
||||||
|
FC_BUILD_NO_CHECK: 1
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
fedora:
|
fedora:
|
||||||
|
@ -83,4 +112,24 @@ packages:
|
||||||
"mingw64-libxml2",
|
"mingw64-libxml2",
|
||||||
"wine",
|
"wine",
|
||||||
]
|
]
|
||||||
use_qemu: false
|
freebsd:
|
||||||
|
needed:
|
||||||
|
[
|
||||||
|
"gcc",
|
||||||
|
"autoconf",
|
||||||
|
"automake",
|
||||||
|
"libtool",
|
||||||
|
"gettext",
|
||||||
|
"gperf",
|
||||||
|
"expat",
|
||||||
|
"libxml2",
|
||||||
|
"freetype2",
|
||||||
|
"json-c",
|
||||||
|
"git",
|
||||||
|
"ninja",
|
||||||
|
"wget",
|
||||||
|
"python3",
|
||||||
|
"py39-pip",
|
||||||
|
"pkgconf",
|
||||||
|
"gmake",
|
||||||
|
]
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
echo "** Cross build not supported."
|
||||||
|
exit 1
|
|
@ -0,0 +1,3 @@
|
||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
set -ex
|
Loading…
Reference in New Issue