import * as libaction from '@lukka/action-lib' ; import * as runcmakelib from '@lukka/run-cmake-lib' ; import * as core from '@actions/core' ; const configurePresetCmdStringInput = "CONFIGUREPRESETCMDSTRING" ; const buildPresetCmdStringInput = "BUILDPRESETCMDSTRING" ; const testPresetCmdStringInput = "TESTPRESETCMDSTRING" ; const runVcpkgEnvFormatStringInput = "RUNVCPKGENVFORMATSTRING" ; export async function main ( ) { const actionLib = new libaction . ActionLib ( ) ; try { const configurePresetCmdStringFormat = actionLib . getInput ( configurePresetCmdStringInput , false ) ; const buildPresetCmdStringFormat = actionLib . getInput ( buildPresetCmdStringInput , false ) ; const testPresetCmdStringFormat = actionLib . getInput ( testPresetCmdStringInput , false ) ; const runVcpkgEnvFormatString = actionLib . getInput ( runVcpkgEnvFormatStringInput , false ) ; await runcmakelib . CMakeRunner . run ( actionLib , configurePresetCmdStringFormat , buildPresetCmdStringFormat , testPresetCmdStringFormat , runVcpkgEnvFormatString ) ; actionLib . info ( 'run-cmake action execution succeeded' ) ; process . exitCode = 0 ; } catch ( err ) { const error = err as Error ; if ( error ?. stack ) { actionLib . info ( error . stack ) ; } const errorAsString = ( err ?? "undefined error" ) . toString ( ) ; core . setFailed ( `run-cmake action execution failed: '${ errorAsString }'` ) ; process . exitCode = - 1000 ; } }