@@ -30,6 +30,7 @@ import { setupVCVarsall } from "./vcvarsall/vcvarsall"
30
30
import { setupKcov } from "./kcov/kcov"
31
31
import { addEnv } from "./utils/env/addEnv"
32
32
import { setupSevenZip } from "./sevenzip/sevenzip"
33
+ import { endGroup , startGroup } from "@actions/core"
33
34
34
35
/** The setup functions */
35
36
const setups = {
@@ -125,22 +126,23 @@ export async function main(args: string[]): Promise<number> {
125
126
// loop over the tools and run their setup function
126
127
for ( const tool of tools ) {
127
128
// get the version or "true" or undefined for this tool from the options
128
- const value = opts [ tool ]
129
+ const version = opts [ tool ]
129
130
130
131
// skip if undefined
131
- if ( value !== undefined ) {
132
+ if ( version !== undefined ) {
132
133
// running the setup function for this tool
134
+ startGroup ( `Installing ${ tool } ${ version } ` )
133
135
try {
134
136
let installationInfo : InstallationInfo | undefined | void
135
137
if ( tool === "vcvarsall" ) {
136
138
// eslint-disable-next-line no-await-in-loop
137
- setupVCVarsall ( getVersion ( tool , value ) , undefined , arch , undefined , undefined , false , false )
139
+ setupVCVarsall ( getVersion ( tool , version ) , undefined , arch , undefined , undefined , false , false )
138
140
} else {
139
141
// get the setup function
140
142
const setupFunction = setups [ tool ]
141
143
142
144
// eslint-disable-next-line no-await-in-loop
143
- installationInfo = await setupFunction ( getVersion ( tool , value ) , join ( setupCppDir , tool ) , arch )
145
+ installationInfo = await setupFunction ( getVersion ( tool , version ) , join ( setupCppDir , tool ) , arch )
144
146
}
145
147
// preparing a report string
146
148
successMessages . push ( getSuccessMessage ( tool , installationInfo ) )
@@ -149,6 +151,7 @@ export async function main(args: string[]): Promise<number> {
149
151
error ( e as string | Error )
150
152
errorMessages . push ( `${ tool } failed to install` )
151
153
}
154
+ endGroup ( )
152
155
}
153
156
}
154
157
@@ -159,6 +162,7 @@ export async function main(args: string[]): Promise<number> {
159
162
const { compiler, version } = getCompilerInfo ( maybeCompiler )
160
163
161
164
// install the compiler. We allow some aliases for the compiler name
165
+ startGroup ( `Installing ${ compiler } ${ version ?? "" } ` )
162
166
switch ( compiler ) {
163
167
case "llvm" :
164
168
case "clang" :
@@ -198,10 +202,12 @@ export async function main(args: string[]): Promise<number> {
198
202
errorMessages . push ( `Unsupported compiler ${ compiler } ` )
199
203
}
200
204
}
205
+ endGroup ( )
201
206
}
202
207
} catch ( e ) {
203
208
error ( e as string | Error )
204
209
errorMessages . push ( `Failed to install the ${ maybeCompiler } ` )
210
+ endGroup ( )
205
211
}
206
212
207
213
if ( successMessages . length === 0 && errorMessages . length === 0 ) {
0 commit comments