Use `::` form workflow commands

This commit is contained in:
Nobuyoshi Nakada 2023-08-14 22:28:19 +09:00
Родитель 9acc73d7c5
Коммит b76c2ec005
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 3582D74E1FEE4465
4 изменённых файлов: 13 добавлений и 10 удалений

8
.github/workflows/mingw.yml поставляемый
Просмотреть файл

@ -78,9 +78,9 @@ jobs:
mv /c/Windows/System32/libssl-1_1-x64.dll /c/Windows/System32/libssl-1_1-x64.dll_
result=true
for e in gcc.exe ragel.exe make.exe libcrypto-1_1-x64.dll libssl-1_1-x64.dll; do
echo '##['group']'$'\033[93m'$e$'\033[m'
echo ::group::$'\033[93m'$e$'\033[m'
where $e || result=false
echo '##['endgroup']'
echo ::endgroup::
done
$result
working-directory:
@ -91,9 +91,9 @@ jobs:
result=true
for e in gcc ragel make "openssl version"; do
case "$e" in *" "*) ;; *) e="$e --version";; esac
echo '##['group']'$'\033[93m'$e$'\033[m'
echo ::group::$'\033[93m'$e$'\033[m'
$e || result=false
echo '##['endgroup']'
echo ::endgroup::
done
$result
working-directory:

Просмотреть файл

@ -8,8 +8,9 @@ MSPECOPT += $(if $(filter -j%,$(MFLAGS)),-j)
nproc = $(subst -j,,$(filter -j%,$(MFLAGS)))
ifeq ($(GITHUB_ACTIONS),true)
override ACTIONS_GROUP = @echo "\#\#[group]$(patsubst yes-%,%,$@)"
override ACTIONS_ENDGROUP = @echo "\#\#[endgroup]"
# 93(bright yellow) is copied from .github/workflows/mingw.yml
override ACTIONS_GROUP = @echo "::group::$(@:yes-%=%)"
override ACTIONS_ENDGROUP = @echo "::endgroup::"
endif
ifneq ($(filter darwin%,$(target_os)),)

Просмотреть файл

@ -23,7 +23,8 @@ File.foreach("#{gem_dir}/bundled_gems") do |line|
next if /^\s*(?:#|$)/ =~ line
gem = line.split.first
next if ARGV.any? {|pat| !File.fnmatch?(pat, gem)}
puts "#{github_actions ? "##[group]" : "\n"}Testing the #{gem} gem"
# 93(bright yellow) is copied from .github/workflows/mingw.yml
puts "#{github_actions ? "::group::\e\[93m" : "\n"}Testing the #{gem} gem#{github_actions ? "\e\[m" : ""}"
test_command = "#{ruby} -C #{gem_dir}/src/#{gem} #{rake} test"
first_timeout = 600 # 10min
@ -88,7 +89,7 @@ File.foreach("#{gem_dir}/bundled_gems") do |line|
break
end
print "##[endgroup]\n" if github_actions
print "::endgroup::\n" if github_actions
unless $?.success?
mesg = "Tests failed " +

Просмотреть файл

@ -547,8 +547,9 @@ GOLF_PRELUDE_C = golf_prelude.c
RBCONFIG = ./.rbconfig.time
!if "$(GITHUB_ACTIONS)" == "true"
ACTIONS_GROUP = @echo ^#^#[group]$(@:yes-=)
ACTIONS_ENDGROUP = @echo ^#^#[endgroup]
# 93(bright yellow) is copied from .github/workflows/mingw.yml
ACTIONS_GROUP = @echo ::group::$(@:yes-=)
ACTIONS_ENDGROUP = @echo ::endgroup::
!else
ACTIONS_GROUP = @:: $(empty)
ACTIONS_ENDGROUP = @::