Skip to content

Commit

Permalink
Group log lines
Browse files Browse the repository at this point in the history
  • Loading branch information
jun66j5 committed Dec 30, 2023
1 parent 90422a3 commit fe30bb1
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
18 changes: 18 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if ($svnarcurl) {
}
Push-Location -LiteralPath "$workspace\subversion"

Write-Output '::group::vcpkg'
New-Item -Force -ItemType Directory -Path $vcpkg_downloads
Push-Location -LiteralPath $vcpkg_root
& git fetch --depth=1 origin
Expand All @@ -44,6 +45,7 @@ if ($LASTEXITCODE) {
Write-Error "vcpkg install exited with $LASTEXITCODE"
exit 1
}
Write-Output '::endgroup::'

switch -Exact ($args[0]) {
'prepare' {
Expand All @@ -56,6 +58,7 @@ switch -Exact ($args[0]) {
'--',
'-nologo', '-v:q', '-fl')
# apr
Write-Output '::group::apr'
Push-Location "$workspace\deps\apr"
& cmake -D "CMAKE_INSTALL_PREFIX=$cmake_prefix" `
-D CMAKE_BUILD_TYPE=Release `
Expand All @@ -73,7 +76,9 @@ switch -Exact ($args[0]) {
exit $LASTEXITCODE
}
Pop-Location
Write-Output '::endgroup::'
# apr-util
Write-Output '::group::apr-util'
Push-Location "$workspace\deps\apr-util"
& cmake -D "CMAKE_INSTALL_PREFIX=$cmake_prefix" `
-D "OPENSSL_ROOT_DIR=$cmake_vcpkg_dir" `
Expand All @@ -95,7 +100,9 @@ switch -Exact ($args[0]) {
Copy-Item -Path "$vcpkg_dir\lib\libexpat.lib" -Destination "$deps_prefix\lib"
Copy-Item -Path "$vcpkg_dir\bin\libexpat.dll" -Destination "$deps_prefix\bin"
Pop-Location
Write-Output '::endgroup::'
# httpd
Write-Output '::group::httpd'
Push-Location "$workspace\deps\httpd"
& cmake -D "CMAKE_INSTALL_PREFIX=$cmake_prefix" `
-D "APR_INCLUDE_DIR=$cmake_prefix/include" `
Expand All @@ -122,7 +129,9 @@ switch -Exact ($args[0]) {
Copy-Item -Path "$vcpkg_dir\bin\pcre.dll" -Destination "$deps_prefix\bin"
Copy-Item -Path "$vcpkg_dir\bin\zlib1.dll" -Destination "$deps_prefix\bin"
Pop-Location
Write-Output '::endgroup::'
# serf
Write-Output '::group::serf'
Push-Location "$workspace\deps\serf"
& $python -m pip install scons
$scons = ($pythonLocation -eq $null) ? 'scons.exe' : "$pythonLocation\scripts\scons.exe"
Expand All @@ -147,6 +156,7 @@ switch -Exact ($args[0]) {
exit $LASTEXITCODE
}
Pop-Location
Write-Output '::endgroup::'
exit
}
'core' {
Expand Down Expand Up @@ -181,6 +191,8 @@ if (!$svnarcurl) {
New-Item -Force -ItemType Directory -Path "subversion\bindings\swig\proxy"
& svn diff -c1908545 https://svn.apache.org/repos/asf/subversion/trunk/ | & git apply -p0 -R -
}

Write-Output '::group::gen-make.py'
& $python gen-make.py `
--vsnet-version=2019 `
--enable-nls `
Expand All @@ -196,7 +208,9 @@ if (!$svnarcurl) {
if ($LASTEXITCODE) {
exit $LASTEXITCODE
}
Write-Output '::endgroup::'

Write-Output '::group::msbuild subversion_vcnet.sln'
Set-Content -LiteralPath "Directory.Build.Props" -Value @'
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
Expand All @@ -213,13 +227,17 @@ Set-Content -LiteralPath "Directory.Build.Props" -Value @'
if ($LASTEXITCODE) {
exit $LASTEXITCODE
}
Write-Output '::endgroup::'

$Env:PATH = "$deps_prefix\bin;$vcpkg_dir\bin;$($Env:PATH)"
$rc = 0
foreach ($item in $test_targets) {
Write-Output "::group::win-tests.py $item"
& $python win-tests.py -crv "--httpd-dir=$deps_prefix" --httpd-no-log $item
if ($LASTEXITCODE) {
Write-Warning "win-tests.py $item exited with $LASTEXITCODE"
$rc = 1
}
Write-Output '::endgroup::'
}
exit $rc
22 changes: 22 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@ ubuntu-*)
pkgs="$pkgs $swig"
with_swig="/usr/bin/$swig"
fi
echo '::group::apt-get'
sudo apt-get update -qq
sudo apt-get install -qq -y $pkgs
sudo apt-get purge -qq -y subversion libsvn-dev
echo '::endgroup::'
with_apr=/usr/bin/apr-1-config
with_apr_util=/usr/bin/apu-1-config
with_apxs=/usr/bin/apxs2
Expand Down Expand Up @@ -93,10 +95,12 @@ macos-*)
pkgs="$pkgs $swig"
with_swig="$(brew --prefix "$swig")/bin/swig"
fi
echo '::group::brew'
brew update
brew outdated $pkgs || brew upgrade $pkgs || :
brew install $pkgs
brew uninstall subversion || :
echo '::endgroup::'
with_apr="$(brew --prefix apr)/bin/apr-1-config"
with_apr_util="$(brew --prefix apr-util)/bin/apu-1-config"
with_apxs="$(brew --prefix httpd)/bin/apxs"
Expand Down Expand Up @@ -192,10 +196,13 @@ esac

if [ "$autogen" = y ]; then
mkdir -p subversion/bindings/swig/proxy || :
echo '::group::make autogen.sh'
/bin/sh autogen.sh
echo '::endgroup::'
fi

if [ "$use_installed_libs" = y ]; then
echo '::group::gen-make.py'
PATH="$prefix/bin:$PATH"
export PATH
installed_libs="$(cd "$prefix/lib" && \
Expand All @@ -206,8 +213,10 @@ if [ "$use_installed_libs" = y ]; then
else
python gen-make.py --installed-libs="$installed_libs"
fi
echo '::endgroup::'
fi

echo '::group::./configure'
./configure --prefix="$prefix" \
--with-apr="$with_apr" --with-apr-util="$with_apr_util" \
--with-sqlite="$with_sqlite" $opt_sqlite_compat_version $opt_swig \
Expand All @@ -216,14 +225,17 @@ fi
--without-gnome-keyring --without-kwallet \
"$opt_swig_python" "$opt_swig_perl" "$opt_swig_ruby" \
CFLAGS="$cflags" LDFLAGS="$ldflags"
echo '::endgroup::'

case "$target" in
install)
time make -j"$parallel" all
make install
;;
all)
echo '::group::make all'
time make -j"$parallel" all
echo '::endgroup::'
case "$MATRIX_OS" in
ubuntu-*)
tasks='check svnserveautocheck davautocheck'
Expand All @@ -234,31 +246,41 @@ all)
esac
rc=0
for task in $tasks; do
echo "::group::make $task"
time make $task PARALLEL="$parallel" APACHE_MPM=event || rc=1
for i in tests.log fails.log; do
test -f "$i" && mv -v "$i" "$task-$i"
done
echo '::endgroup::'
done
exit $rc
;;
swig-pl)
echo '::group::make swig-pl'
time make -j"$parallel" swig-pl
echo '::endgroup::'
time make check-swig-pl TEST_VERBOSE=1
;;
swig-py)
if [ "$clean_swig_py" = y ]; then
make clean-swig-py
fi
echo '::group::make swig-py'
time make -j"$parallel" swig-py
echo '::endgroup::'
sed_repl Makefile -e 's#/tests/run_all\.py#& -v#'
time make check-swig-py
;;
swig-rb)
echo '::group::make swig-rb'
time make -j"$parallel" swig-rb
echo '::endgroup::'
time make check-swig-rb SWIG_RB_TEST_VERBOSE=v
;;
javahl)
echo '::group::make javahl'
time make javahl # without -j option
echo '::endgroup::'
time make check-all-javahl
;;
esac

0 comments on commit fe30bb1

Please sign in to comment.