workflows/test: factor out steps & refactoring

This commit is contained in:
Egor Tensin 2021-07-02 20:16:57 +03:00
parent 4785090c89
commit 3d49180b0b
6 changed files with 153 additions and 95 deletions

22
.github/actions/check-cc/action.yml vendored Normal file
View 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