Skip to content

Commit

Permalink
Use :: form workflow commands
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Aug 15, 2023
1 parent 9acc73d commit b76c2ec
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/mingw.yml
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
5 changes: 3 additions & 2 deletions defs/gmake.mk
Expand Up @@ -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)),)
Expand Down
5 changes: 3 additions & 2 deletions tool/test-bundled-gems.rb
Expand Up @@ -23,7 +23,8 @@
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
Expand Down Expand Up @@ -88,7 +89,7 @@
break
end

print "##[endgroup]\n" if github_actions
print "::endgroup::\n" if github_actions
unless $?.success?

mesg = "Tests failed " +
Expand Down
5 changes: 3 additions & 2 deletions win32/Makefile.sub
Expand Up @@ -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 = @::
Expand Down

0 comments on commit b76c2ec

Please sign in to comment.