Felipe97/llama-cpp-compiled
01.1k
1name: "Install exe"2description: "Download and install exe"3inputs:4 url:5 description: "URL of the exe installer"6 required: true7 args:8 description: "Installer arguments"9 required: true10 timeout:11 description: "Timeout (in ms)"12 required: false13 default: "600000"14 15runs:16 using: "composite"17 steps:18 - name: Install EXE19 shell: pwsh20 run: |21 $ErrorActionPreference = "Stop"22 write-host "Downloading Installer EXE"23 Invoke-WebRequest -Uri "${{ inputs.url }}" -OutFile "${env:RUNNER_TEMP}\temp-install.exe"24 write-host "Installing"25 $proc = Start-Process "${env:RUNNER_TEMP}\temp-install.exe" -ArgumentList '${{ inputs.args }}' -NoNewWindow -PassThru26 $completed = $proc.WaitForExit(${{ inputs.timeout }})27 if (-not $completed) {28 Write-Error "Installer timed out. Killing the process"29 $proc.Kill()30 exit 131 }32 if ($proc.ExitCode -ne 0) {33 Write-Error "Installer failed with exit code $($proc.ExitCode)"34 exit 135 }36 write-host "Completed installation"37 