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
|
||||
distro: alpine-latest
|
||||
- jobname: linux32
|
||||
image: daald/ubuntu32:xenial
|
||||
distro: ubuntu32-16.04
|
||||
image: i386/ubuntu:focal
|
||||
distro: ubuntu32-20.04
|
||||
- jobname: pedantic
|
||||
image: fedora
|
||||
distro: fedora-latest
|
||||
@ -350,17 +350,17 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
container: ${{matrix.vector.image}}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
if: matrix.vector.jobname != 'linux32'
|
||||
- uses: actions/checkout@v1 # cannot be upgraded because Node.js Actions aren't supported in this container
|
||||
- name: prepare libc6 for actions
|
||||
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/run-build-and-tests.sh
|
||||
- name: print test failures
|
||||
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
|
||||
run: ci/print-test-failures.sh
|
||||
- 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
|
||||
with:
|
||||
name: failed-tests-${{matrix.vector.jobname}}
|
||||
|
@ -25,6 +25,9 @@ test:linux:
|
||||
fi
|
||||
parallel:
|
||||
matrix:
|
||||
- jobname: linux-old
|
||||
image: ubuntu:16.04
|
||||
CC: gcc
|
||||
- jobname: linux-sha256
|
||||
image: ubuntu:latest
|
||||
CC: clang
|
||||
|
@ -33,37 +33,49 @@ fedora-*)
|
||||
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
|
||||
;;
|
||||
ubuntu-*)
|
||||
ubuntu-*|ubuntu32-*)
|
||||
# Required so that apt doesn't wait for user input on certain packages.
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
case "$distro" in
|
||||
ubuntu-*)
|
||||
SVN='libsvn-perl subversion'
|
||||
;;
|
||||
*)
|
||||
SVN=
|
||||
;;
|
||||
esac
|
||||
|
||||
sudo apt-get -q update
|
||||
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 \
|
||||
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 \
|
||||
${CC_PACKAGE:-${CC:-gcc}} $PYTHON_PACKAGE
|
||||
|
||||
mkdir --parents "$CUSTOM_PATH"
|
||||
wget --quiet --directory-prefix="$CUSTOM_PATH" \
|
||||
"$P4WHENCE/bin.linux26x86_64/p4d" "$P4WHENCE/bin.linux26x86_64/p4"
|
||||
chmod a+x "$CUSTOM_PATH/p4d" "$CUSTOM_PATH/p4"
|
||||
case "$distro" in
|
||||
ubuntu-16.04)
|
||||
# Does not support JGit, but we also don't really care about
|
||||
# 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"
|
||||
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"
|
||||
rm "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz"
|
||||
wget --quiet --directory-prefix="$CUSTOM_PATH" \
|
||||
"$P4WHENCE/bin.linux26x86_64/p4d" "$P4WHENCE/bin.linux26x86_64/p4"
|
||||
chmod a+x "$CUSTOM_PATH/p4d" "$CUSTOM_PATH/p4"
|
||||
|
||||
wget --quiet "$JGITWHENCE" --output-document="$CUSTOM_PATH/jgit"
|
||||
chmod a+x "$CUSTOM_PATH/jgit"
|
||||
;;
|
||||
ubuntu32-*)
|
||||
sudo linux32 --32bit i386 sh -c '
|
||||
apt update >/dev/null &&
|
||||
apt install -y build-essential libcurl4-openssl-dev \
|
||||
libssl-dev libexpat-dev gettext python >/dev/null
|
||||
'
|
||||
wget --quiet "$LFSWHENCE/git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz"
|
||||
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"
|
||||
rm "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz"
|
||||
|
||||
wget --quiet "$JGITWHENCE" --output-document="$CUSTOM_PATH/jgit"
|
||||
chmod a+x "$CUSTOM_PATH/jgit"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
macos-*)
|
||||
export HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_CLEANUP=1
|
||||
|
@ -336,7 +336,14 @@ ubuntu-*)
|
||||
fi
|
||||
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 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