blob: 5a6daa8e9ec7af057524557d8e80530c5375ce5b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
name: Check cc/c++
description: Check cc/c++
runs:
using: composite
steps:
- run: |
$version = '${{ inputs.version }}'
function Check-Exe {
param(
[Parameter(Mandatory=$true)]
[string] $Exe
)
echo (Get-Command $Exe).Path
$output = & $Exe --version
echo $output
# Is this really the most stable piece of `gcc --version` output?
$($output | Select-String -Pattern "This is free software; see the source for copying conditions." -SimpleMatch -Quiet) -or $(throw "Unexpected `$Exe --version` output")
}
Check-Exe cc
Check-Exe c++
shell: pwsh
|