Skip to content

Commit fc66f9f

Browse files
ci: Use ENABLE_GITHUB_ACTIONS_MARKUP instead of GITHUB_ACTIONS
To avoid CRuby's configure script to use nested groups, which is not supported by GitHub Actions yet.
1 parent cbf3bad commit fc66f9f

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ jobs:
121121
run: rake ${{ matrix.entry.prerelease }}[${{ inputs.prerel_name }}]
122122
if: ${{ inputs.prerel_name != '' && matrix.entry.prerelease != '' }}
123123
- name: rake ${{ matrix.entry.task }}
124-
run: docker run -v "$GITHUB_WORKSPACE:/home/me/build" -w /home/me/build -e "GITHUB_ACTIONS=$GITHUB_ACTIONS" -e "RUBYWASM_UID=$(id -u)" -e "RUBYWASM_GID=$(id -g)" -e "GNUMAKEFLAGS=-j$((1 + $(nproc --all)))" ${{ steps.builder-image.outputs.imageid }} rake --verbose ${{ matrix.entry.task }}
124+
run: docker run -v "$GITHUB_WORKSPACE:/home/me/build" -w /home/me/build -e "ENABLE_GITHUB_ACTIONS_MARKUP=true" -e "RUBYWASM_UID=$(id -u)" -e "RUBYWASM_GID=$(id -g)" -e "GNUMAKEFLAGS=-j$((1 + $(nproc --all)))" ${{ steps.builder-image.outputs.imageid }} rake --verbose ${{ matrix.entry.task }}
125125
- name: rake ${{ matrix.entry.test }}
126126
run: rake ${{ matrix.entry.test }}
127127
if: ${{ matrix.entry.test != '' }}

lib/ruby_wasm/build.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ module RubyWasm
77
class BuildExecutor
88
def initialize(verbose: false)
99
@verbose = verbose
10+
@github_actions_markup = ENV["ENABLE_GITHUB_ACTIONS_MARKUP"] != nil
1011
end
1112

1213
def system(*args, chdir: nil, out: nil, env: nil)
@@ -42,7 +43,7 @@ def system(*args, chdir: nil, out: nil, env: nil)
4243

4344
def begin_section(klass, name, note)
4445
message = "\e[1;36m==>\e[0m \e[1m#{klass}(#{name}) -- #{note}\e[0m"
45-
if ENV["GITHUB_ACTIONS"]
46+
if @github_actions_markup
4647
puts "::group::#{message}"
4748
else
4849
puts message
@@ -57,7 +58,7 @@ def begin_section(klass, name, note)
5758

5859
def end_section(klass, name)
5960
took = Time.now - @start_times[[klass, name]]
60-
if ENV["GITHUB_ACTIONS"]
61+
if @github_actions_markup
6162
puts "::endgroup::"
6263
end
6364
puts "\e[1;36m==>\e[0m \e[1m#{klass}(#{name}) -- done in #{took.round(2)}s\e[0m"

sig/ruby_wasm/build.rbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ module RubyWasm
223223

224224
class BuildExecutor
225225
@verbose: bool
226+
@github_actions_markup: bool
226227
@start_times: Hash[[Class, String], Time]
227228

228229
def initialize: (?verbose: bool) -> void

0 commit comments

Comments
 (0)