Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
runs-on: ${{ matrix.DOCKER_ARCHITECTURE == 'i386' && 'ubuntu-24.04' || 'ubuntu-latest' }}

# See https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-environment-variables-in-a-matrix
strategy:
Expand Down
36 changes: 25 additions & 11 deletions ci/adjust-debian-apt-sources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,33 @@

. /etc/os-release

if [ "x${ID:-linux}" = "xdebian" ] && [ "x${VERSION_ID:-0}" = "x10" ]; then
echo "Adjusting APT sources for Debian Buster"
sed -i 's|http://deb.debian.org/debian|http://archive.debian.org/debian|g' /etc/apt/sources.list
sed -i 's|http://security.debian.org/debian-security|http://archive.debian.org/debian-security|g' /etc/apt/sources.list
if [ "x${ID:-linux}" != "xdebian" ]; then
exit 0
fi

if [ "x${ID:-linux}" = "xdebian" ] && [ "x${VERSION_ID:-0}" = "x9" ]; then
echo "Adjusting APT sources for Debian Stretch"
sed -i 's|http://deb.debian.org/debian|http://archive.debian.org/debian|g' /etc/apt/sources.list
sed -i 's|http://security.debian.org/debian-security|http://archive.debian.org/debian-security|g' /etc/apt/sources.list
mirror=http://cdn-fastly.deb.debian.org
archived=false
if [[ "${VERSION_ID:-}" =~ ^[0-9]+$ ]] && [ "$VERSION_ID" -le 11 ]; then
mirror=http://archive.debian.org
archived=true
fi

for sources in /etc/apt/sources.list /etc/apt/sources.list.d/*.list /etc/apt/sources.list.d/*.sources; do
[ -f "$sources" ] || continue
sed -i -E "s#https?://(deb\\.debian\\.org|security\\.debian\\.org|cdn-fastly\\.deb\\.debian\\.org)/debian#$mirror/debian#g" "$sources"
if $archived && [[ "$sources" == *.list ]]; then
sed -i 's|^deb .*archive\.debian\.org/debian[[:space:]].*-updates|# &|g' "$sources"
fi
done

if $archived; then
echo 'Acquire::Check-Valid-Until "false";' >> /etc/apt/apt.conf.d/99no-check-valid-until
fi

if [ "${VERSION_ID:-}" = 9 ]; then
echo 'Acquire::AllowInsecureRepositories "true";' >> /etc/apt/apt.conf.d/99no-check-valid-until
echo "Disabled stretch-updates and stretch-security in sources.list to prevent 404 errors"
sed -i 's|^deb .*stretch-updates|# &|g' /etc/apt/sources.list
sed -i 's|^deb .*stretch/updates|# &|g' /etc/apt/sources.list
for sources in /etc/apt/sources.list /etc/apt/sources.list.d/*.list; do
[ -f "$sources" ] || continue
sed -i 's|^deb .*stretch/updates|# &|g' "$sources"
done
fi
9 changes: 8 additions & 1 deletion ci/run-tests-parallel.php
Original file line number Diff line number Diff line change
Expand Up @@ -1381,6 +1381,14 @@ function run_all_tests_parallel(array $test_files, array $env, $redir_tested)
{
global $workers, $test_idx, $test_cnt, $test_results, $failed_tests_file, $result_tests_file, $PHP_FAILED_TESTS, $shuffle, $SHOW_ONLY_GROUPS, $valgrind;

$listenSock = @stream_socket_server("tcp://127.0.0.1:0");
if ($listenSock === false) {
echo "Couldn't create socket on localhost; running tests sequentially.\n";
$workers = null;
run_all_tests($test_files, $env, $redir_tested);
return;
}

// The PHP binary running run-tests.php, and run-tests.php itself
// This PHP executable is *not* necessarily the same as the tested version
$thisPHP = PHP_BINARY;
Expand Down Expand Up @@ -1444,7 +1452,6 @@ function run_all_tests_parallel(array $test_files, array $env, $redir_tested)

// We use sockets rather than STDIN/STDOUT for comms because on Windows,
// those can't be non-blocking for some reason.
$listenSock = stream_socket_server("tcp://127.0.0.1:0") or error("Couldn't create socket on localhost.");
$sockName = stream_socket_get_name($listenSock, false);
// PHP is terrible and returns IPv6 addresses not enclosed by []
$portPos = strrpos($sockName, ":");
Expand Down