Merge branch 'jk/ci-linux32-update'
CI updates * jk/ci-linux32-update: ci: add Ubuntu 16.04 job to GitLab CI ci: use regular action versions for linux32 job ci: use more recent linux32 image ci: unify ubuntu and ubuntu32 dependencies ci: drop run-docker scripts
This commit is contained in:
commit
aeda40b96e
12
.github/workflows/main.yml
vendored
12
.github/workflows/main.yml
vendored
@ -339,8 +339,8 @@ jobs:
|
|||||||
image: alpine
|
image: alpine
|
||||||
distro: alpine-latest
|
distro: alpine-latest
|
||||||
- jobname: linux32
|
- jobname: linux32
|
||||||
image: daald/ubuntu32:xenial
|
image: i386/ubuntu:focal
|
||||||
distro: ubuntu32-16.04
|
distro: ubuntu32-20.04
|
||||||
- jobname: pedantic
|
- jobname: pedantic
|
||||||
image: fedora
|
image: fedora
|
||||||
distro: fedora-latest
|
distro: fedora-latest
|
||||||
@ -350,17 +350,17 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ${{matrix.vector.image}}
|
container: ${{matrix.vector.image}}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: prepare libc6 for actions
|
||||||
if: matrix.vector.jobname != 'linux32'
|
|
||||||
- uses: actions/checkout@v1 # cannot be upgraded because Node.js Actions aren't supported in this container
|
|
||||||
if: matrix.vector.jobname == 'linux32'
|
if: matrix.vector.jobname == 'linux32'
|
||||||
|
run: apt -q update && apt -q -y install libc6-amd64 lib64stdc++6
|
||||||
|
- uses: actions/checkout@v4
|
||||||
- run: ci/install-dependencies.sh
|
- run: ci/install-dependencies.sh
|
||||||
- run: ci/run-build-and-tests.sh
|
- run: ci/run-build-and-tests.sh
|
||||||
- name: print test failures
|
- name: print test failures
|
||||||
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
|
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
|
||||||
run: ci/print-test-failures.sh
|
run: ci/print-test-failures.sh
|
||||||
- name: Upload failed tests' directories
|
- name: Upload failed tests' directories
|
||||||
if: failure() && env.FAILED_TEST_ARTIFACTS != '' && matrix.vector.jobname != 'linux32'
|
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: failed-tests-${{matrix.vector.jobname}}
|
name: failed-tests-${{matrix.vector.jobname}}
|
||||||
|
@ -25,6 +25,9 @@ test:linux:
|
|||||||
fi
|
fi
|
||||||
parallel:
|
parallel:
|
||||||
matrix:
|
matrix:
|
||||||
|
- jobname: linux-old
|
||||||
|
image: ubuntu:16.04
|
||||||
|
CC: gcc
|
||||||
- jobname: linux-sha256
|
- jobname: linux-sha256
|
||||||
image: ubuntu:latest
|
image: ubuntu:latest
|
||||||
CC: clang
|
CC: clang
|
||||||
|
@ -33,37 +33,49 @@ fedora-*)
|
|||||||
dnf -yq update >/dev/null &&
|
dnf -yq update >/dev/null &&
|
||||||
dnf -yq install make gcc findutils diffutils perl python3 gettext zlib-devel expat-devel openssl-devel curl-devel pcre2-devel >/dev/null
|
dnf -yq install make gcc findutils diffutils perl python3 gettext zlib-devel expat-devel openssl-devel curl-devel pcre2-devel >/dev/null
|
||||||
;;
|
;;
|
||||||
ubuntu-*)
|
ubuntu-*|ubuntu32-*)
|
||||||
# Required so that apt doesn't wait for user input on certain packages.
|
# Required so that apt doesn't wait for user input on certain packages.
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
case "$distro" in
|
||||||
|
ubuntu-*)
|
||||||
|
SVN='libsvn-perl subversion'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
SVN=
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
sudo apt-get -q update
|
sudo apt-get -q update
|
||||||
sudo apt-get -q -y install \
|
sudo apt-get -q -y install \
|
||||||
language-pack-is libsvn-perl apache2 cvs cvsps git gnupg subversion \
|
language-pack-is apache2 cvs cvsps git gnupg $SVN \
|
||||||
make libssl-dev libcurl4-openssl-dev libexpat-dev wget sudo default-jre \
|
make libssl-dev libcurl4-openssl-dev libexpat-dev wget sudo default-jre \
|
||||||
tcl tk gettext zlib1g-dev perl-modules liberror-perl libauthen-sasl-perl \
|
tcl tk gettext zlib1g-dev perl-modules liberror-perl libauthen-sasl-perl \
|
||||||
libemail-valid-perl libio-pty-perl libio-socket-ssl-perl libnet-smtp-ssl-perl libdbd-sqlite3-perl libcgi-pm-perl \
|
libemail-valid-perl libio-pty-perl libio-socket-ssl-perl libnet-smtp-ssl-perl libdbd-sqlite3-perl libcgi-pm-perl \
|
||||||
${CC_PACKAGE:-${CC:-gcc}} $PYTHON_PACKAGE
|
${CC_PACKAGE:-${CC:-gcc}} $PYTHON_PACKAGE
|
||||||
|
|
||||||
mkdir --parents "$CUSTOM_PATH"
|
case "$distro" in
|
||||||
wget --quiet --directory-prefix="$CUSTOM_PATH" \
|
ubuntu-16.04)
|
||||||
"$P4WHENCE/bin.linux26x86_64/p4d" "$P4WHENCE/bin.linux26x86_64/p4"
|
# Does not support JGit, but we also don't really care about
|
||||||
chmod a+x "$CUSTOM_PATH/p4d" "$CUSTOM_PATH/p4"
|
# the others. We rather care whether Git still compiles and
|
||||||
|
# runs fine overall.
|
||||||
|
;;
|
||||||
|
ubuntu-*)
|
||||||
|
mkdir --parents "$CUSTOM_PATH"
|
||||||
|
|
||||||
wget --quiet "$LFSWHENCE/git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz"
|
wget --quiet --directory-prefix="$CUSTOM_PATH" \
|
||||||
tar -xzf "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" \
|
"$P4WHENCE/bin.linux26x86_64/p4d" "$P4WHENCE/bin.linux26x86_64/p4"
|
||||||
-C "$CUSTOM_PATH" --strip-components=1 "git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs"
|
chmod a+x "$CUSTOM_PATH/p4d" "$CUSTOM_PATH/p4"
|
||||||
rm "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz"
|
|
||||||
|
|
||||||
wget --quiet "$JGITWHENCE" --output-document="$CUSTOM_PATH/jgit"
|
wget --quiet "$LFSWHENCE/git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz"
|
||||||
chmod a+x "$CUSTOM_PATH/jgit"
|
tar -xzf "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" \
|
||||||
;;
|
-C "$CUSTOM_PATH" --strip-components=1 "git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs"
|
||||||
ubuntu32-*)
|
rm "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz"
|
||||||
sudo linux32 --32bit i386 sh -c '
|
|
||||||
apt update >/dev/null &&
|
wget --quiet "$JGITWHENCE" --output-document="$CUSTOM_PATH/jgit"
|
||||||
apt install -y build-essential libcurl4-openssl-dev \
|
chmod a+x "$CUSTOM_PATH/jgit"
|
||||||
libssl-dev libexpat-dev gettext python >/dev/null
|
;;
|
||||||
'
|
esac
|
||||||
;;
|
;;
|
||||||
macos-*)
|
macos-*)
|
||||||
export HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_CLEANUP=1
|
export HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_CLEANUP=1
|
||||||
|
@ -336,7 +336,14 @@ ubuntu-*)
|
|||||||
fi
|
fi
|
||||||
MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=/usr/bin/$PYTHON_PACKAGE"
|
MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=/usr/bin/$PYTHON_PACKAGE"
|
||||||
|
|
||||||
export GIT_TEST_HTTPD=true
|
case "$distro" in
|
||||||
|
ubuntu-16.04)
|
||||||
|
# Apache is too old for HTTP/2.
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
export GIT_TEST_HTTPD=true
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# The Linux build installs the defined dependency versions below.
|
# The Linux build installs the defined dependency versions below.
|
||||||
# The OS X build installs much more recent versions, whichever
|
# The OS X build installs much more recent versions, whichever
|
||||||
|
@ -1,66 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# Build and test Git inside container
|
|
||||||
#
|
|
||||||
# Usage:
|
|
||||||
# run-docker-build.sh <host-user-id>
|
|
||||||
#
|
|
||||||
|
|
||||||
set -ex
|
|
||||||
|
|
||||||
if test $# -ne 1 || test -z "$1"
|
|
||||||
then
|
|
||||||
echo >&2 "usage: run-docker-build.sh <host-user-id>"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$jobname" in
|
|
||||||
linux32)
|
|
||||||
switch_cmd="linux32 --32bit i386"
|
|
||||||
;;
|
|
||||||
linux-musl)
|
|
||||||
switch_cmd=
|
|
||||||
useradd () { adduser -D "$@"; }
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
"${0%/*}/install-docker-dependencies.sh"
|
|
||||||
|
|
||||||
# If this script runs inside a docker container, then all commands are
|
|
||||||
# usually executed as root. Consequently, the host user might not be
|
|
||||||
# able to access the test output files.
|
|
||||||
# If a non 0 host user id is given, then create a user "ci" with that
|
|
||||||
# user id to make everything accessible to the host user.
|
|
||||||
HOST_UID=$1
|
|
||||||
if test $HOST_UID -eq 0
|
|
||||||
then
|
|
||||||
# Just in case someone does want to run the test suite as root.
|
|
||||||
CI_USER=root
|
|
||||||
else
|
|
||||||
CI_USER=ci
|
|
||||||
if test "$(id -u $CI_USER 2>/dev/null)" = $HOST_UID
|
|
||||||
then
|
|
||||||
echo "user '$CI_USER' already exists with the requested ID $HOST_UID"
|
|
||||||
else
|
|
||||||
useradd -u $HOST_UID $CI_USER
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Build and test
|
|
||||||
command $switch_cmd su -m -l $CI_USER -c "
|
|
||||||
set -ex
|
|
||||||
export DEVELOPER='$DEVELOPER'
|
|
||||||
export DEFAULT_TEST_TARGET='$DEFAULT_TEST_TARGET'
|
|
||||||
export GIT_PROVE_OPTS='$GIT_PROVE_OPTS'
|
|
||||||
export GIT_TEST_OPTS='$GIT_TEST_OPTS'
|
|
||||||
export GIT_TEST_CLONE_2GB='$GIT_TEST_CLONE_2GB'
|
|
||||||
export MAKEFLAGS='$MAKEFLAGS'
|
|
||||||
export cache_dir='$cache_dir'
|
|
||||||
cd /usr/src/git
|
|
||||||
test -n '$cache_dir' && ln -s '$cache_dir/.prove' t/.prove
|
|
||||||
make
|
|
||||||
make test
|
|
||||||
"
|
|
@ -1,47 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# Download and run Docker image to build and test Git
|
|
||||||
#
|
|
||||||
|
|
||||||
. ${0%/*}/lib.sh
|
|
||||||
|
|
||||||
case "$jobname" in
|
|
||||||
linux32)
|
|
||||||
CI_CONTAINER="daald/ubuntu32:xenial"
|
|
||||||
;;
|
|
||||||
linux-musl)
|
|
||||||
CI_CONTAINER=alpine
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
docker pull "$CI_CONTAINER"
|
|
||||||
|
|
||||||
# Use the following command to debug the docker build locally:
|
|
||||||
# <host-user-id> must be 0 if podman is used as drop-in replacement for docker
|
|
||||||
# $ docker run -itv "${PWD}:/usr/src/git" --entrypoint /bin/sh "$CI_CONTAINER"
|
|
||||||
# root@container:/# export jobname=<jobname>
|
|
||||||
# root@container:/# /usr/src/git/ci/run-docker-build.sh <host-user-id>
|
|
||||||
|
|
||||||
container_cache_dir=/tmp/container-cache
|
|
||||||
|
|
||||||
docker run \
|
|
||||||
--interactive \
|
|
||||||
--env DEVELOPER \
|
|
||||||
--env DEFAULT_TEST_TARGET \
|
|
||||||
--env GIT_PROVE_OPTS \
|
|
||||||
--env GIT_TEST_OPTS \
|
|
||||||
--env GIT_TEST_CLONE_2GB \
|
|
||||||
--env MAKEFLAGS \
|
|
||||||
--env jobname \
|
|
||||||
--env cache_dir="$container_cache_dir" \
|
|
||||||
--volume "${PWD}:/usr/src/git" \
|
|
||||||
--volume "$cache_dir:$container_cache_dir" \
|
|
||||||
"$CI_CONTAINER" \
|
|
||||||
/usr/src/git/ci/run-docker-build.sh $(id -u $USER)
|
|
||||||
|
|
||||||
check_unignored_build_artifacts
|
|
||||||
|
|
||||||
save_good_tree
|
|
Loading…
Reference in New Issue
Block a user