Merge branch 'ps/ci-gitlab-update'

GitLab CI updates.

* ps/ci-gitlab-update:
  ci/lib: fix "CI setup" sections with GitLab CI
  ci/lib: do not interpret escape sequences in `group ()` arguments
  ci/lib: remove duplicate trap to end "CI setup" group
  gitlab-ci: update macOS images to Sonoma
This commit is contained in:
Junio C Hamano
2024-12-23 09:32:07 -08:00
2 changed files with 8 additions and 7 deletions

View File

@ -99,10 +99,10 @@ test:osx:
parallel:
matrix:
- jobname: osx-clang
image: macos-13-xcode-14
image: macos-14-xcode-15
CC: clang
- jobname: osx-reftable
image: macos-13-xcode-14
image: macos-14-xcode-15
CC: clang
artifacts:
paths:

View File

@ -18,7 +18,8 @@ elif test true = "$GITLAB_CI"
then
begin_group () {
need_to_end_group=t
printf "\e[0Ksection_start:$(date +%s):$(echo "$1" | tr ' ' _)[collapsed=true]\r\e[0K$1\n"
printf '\e[0Ksection_start:%s:%s[collapsed=true]\r\e[0K%s\n' \
"$(date +%s)" "$(echo "$1" | tr ' ' _)" "$1"
trap "end_group '$1'" EXIT
set -x
}
@ -27,7 +28,8 @@ then
test -n "$need_to_end_group" || return 0
set +x
need_to_end_group=
printf "\e[0Ksection_end:$(date +%s):$(echo "$1" | tr ' ' _)\r\e[0K\n"
printf '\e[0Ksection_end:%s:%s\r\e[0K\n' \
"$(date +%s)" "$(echo "$1" | tr ' ' _)"
trap - EXIT
}
else
@ -55,8 +57,7 @@ group () {
return $res
}
begin_group "CI setup"
trap "end_group 'CI setup'" EXIT
begin_group "CI setup via $(basename $0)"
# Set 'exit on error' for all CI scripts to let the caller know that
# something went wrong.
@ -394,5 +395,5 @@ esac
MAKEFLAGS="$MAKEFLAGS CC=${CC:-cc}"
end_group "CI setup"
end_group "CI setup via $(basename $0)"
set -x