From fe30bb1b1a1f2dfae9f371ee9be5f0531fe94bab Mon Sep 17 00:00:00 2001 From: Jun Omae Date: Sun, 31 Dec 2023 07:43:45 +0900 Subject: [PATCH] Group log lines --- build.ps1 | 18 ++++++++++++++++++ build.sh | 22 ++++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/build.ps1 b/build.ps1 index 48b0400..0368fb1 100644 --- a/build.ps1 +++ b/build.ps1 @@ -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 @@ -44,6 +45,7 @@ if ($LASTEXITCODE) { Write-Error "vcpkg install exited with $LASTEXITCODE" exit 1 } +Write-Output '::endgroup::' switch -Exact ($args[0]) { 'prepare' { @@ -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 ` @@ -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" ` @@ -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" ` @@ -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" @@ -147,6 +156,7 @@ switch -Exact ($args[0]) { exit $LASTEXITCODE } Pop-Location + Write-Output '::endgroup::' exit } 'core' { @@ -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 ` @@ -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 @' @@ -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 diff --git a/build.sh b/build.sh index 17556eb..fd99fd0 100755 --- a/build.sh +++ b/build.sh @@ -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 @@ -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" @@ -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" && \ @@ -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 \ @@ -216,6 +225,7 @@ 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) @@ -223,7 +233,9 @@ install) make install ;; all) + echo '::group::make all' time make -j"$parallel" all + echo '::endgroup::' case "$MATRIX_OS" in ubuntu-*) tasks='check svnserveautocheck davautocheck' @@ -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