File tree 1 file changed +22
-6
lines changed
1 file changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -128,9 +128,24 @@ git log -1 || "Not a repository"
128
128
echo " ========================================"
129
129
echo
130
130
131
+ function begin_group() {
132
+ if [ -n " $GITHUB_ACTIONS " ]; then
133
+ echo -e " \e[1;34m::group::$1 \e[0m"
134
+ else
135
+ echo " $1 "
136
+ fi
137
+ }
138
+
139
+ function end_group() {
140
+ if [ -n " $GITHUB_ACTIONS " ]; then
141
+ echo " ::endgroup::"
142
+ fi
143
+ }
144
+
131
145
function configure_preset()
132
146
{
133
- echo " ::group::CMake Configure"
147
+ begin_group " CMake Configure"
148
+
134
149
local BUILD_NAME=$1
135
150
local PRESET=$2
136
151
local CMAKE_OPTIONS=$3
@@ -141,12 +156,13 @@ function configure_preset()
141
156
echo " $BUILD_NAME configure complete."
142
157
143
158
popd > /dev/null
144
- echo " ::endgroup::"
159
+
160
+ end_group
145
161
}
146
162
147
163
function build_preset()
148
164
{
149
- echo " ::group:: Build"
165
+ begin_group " Build"
150
166
local BUILD_NAME=$1
151
167
local PRESET=$2
152
168
@@ -158,12 +174,12 @@ function build_preset()
158
174
159
175
popd > /dev/null
160
176
source " ./sccache_stats.sh" " end"
161
- echo " ::endgroup:: "
177
+ end_group
162
178
}
163
179
164
180
function test_preset()
165
181
{
166
- echo " ::group:: Test"
182
+ begin_group " Test"
167
183
local BUILD_NAME=$1
168
184
local PRESET=$2
169
185
@@ -173,7 +189,7 @@ function test_preset()
173
189
echo " $BUILD_NAME testing complete."
174
190
175
191
popd > /dev/null
176
- echo " ::endgroup:: "
192
+ end_group
177
193
}
178
194
179
195
function configure_and_build_preset()
You can’t perform that action at this time.
0 commit comments