workflows/test: factor out steps & refactoring
This commit is contained in:
parent
4785090c89
commit
3d49180b0b
6 changed files with 153 additions and 95 deletions
22
.github/actions/check-cc/action.yml
vendored
Normal file
22
.github/actions/check-cc/action.yml
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
name: Check cc/c++
|
||||
description: Check cc/c++
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- run: |
|
||||
function Check-Exe {
|
||||
param(
|
||||
[Parameter(Mandatory=$true)]
|
||||
[string] $Exe
|
||||
)
|
||||
|
||||
echo (Get-Command $Exe).Path
|
||||
$output = & $Exe --version
|
||||
echo $output
|
||||
|
||||
$($output | Select-String -Pattern "clang version" -SimpleMatch -Quiet) -or $(throw "Unexpected `$Exe --version` output")
|
||||
}
|
||||
|
||||
Check-Exe cc
|
||||
Check-Exe c++
|
||||
shell: pwsh
|
Loading…
Add table
Add a link
Reference in a new issue