Skip to content

Commit 19fbad7

Browse files
committed
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
2 parents 3151e6a + c6b43f6 commit 19fbad7

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

.gitlab-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ test:osx:
9999
parallel:
100100
matrix:
101101
- jobname: osx-clang
102-
image: macos-13-xcode-14
102+
image: macos-14-xcode-15
103103
CC: clang
104104
- jobname: osx-reftable
105-
image: macos-13-xcode-14
105+
image: macos-14-xcode-15
106106
CC: clang
107107
artifacts:
108108
paths:

ci/lib.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ elif test true = "$GITLAB_CI"
1818
then
1919
begin_group () {
2020
need_to_end_group=t
21-
printf "\e[0Ksection_start:$(date +%s):$(echo "$1" | tr ' ' _)[collapsed=true]\r\e[0K$1\n"
21+
printf '\e[0Ksection_start:%s:%s[collapsed=true]\r\e[0K%s\n' \
22+
"$(date +%s)" "$(echo "$1" | tr ' ' _)" "$1"
2223
trap "end_group '$1'" EXIT
2324
set -x
2425
}
@@ -27,7 +28,8 @@ then
2728
test -n "$need_to_end_group" || return 0
2829
set +x
2930
need_to_end_group=
30-
printf "\e[0Ksection_end:$(date +%s):$(echo "$1" | tr ' ' _)\r\e[0K\n"
31+
printf '\e[0Ksection_end:%s:%s\r\e[0K\n' \
32+
"$(date +%s)" "$(echo "$1" | tr ' ' _)"
3133
trap - EXIT
3234
}
3335
else
@@ -55,8 +57,7 @@ group () {
5557
return $res
5658
}
5759

58-
begin_group "CI setup"
59-
trap "end_group 'CI setup'" EXIT
60+
begin_group "CI setup via $(basename $0)"
6061

6162
# Set 'exit on error' for all CI scripts to let the caller know that
6263
# something went wrong.
@@ -394,5 +395,5 @@ esac
394395

395396
MAKEFLAGS="$MAKEFLAGS CC=${CC:-cc}"
396397

397-
end_group "CI setup"
398+
end_group "CI setup via $(basename $0)"
398399
set -x

0 commit comments

Comments
 (0)