From 77e3dc62d556a680a94e28e0b6ed25627afd21ab Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 3 Jul 2021 01:48:08 +0300 Subject: support installing multiple versions --- .github/actions/check-cc/action.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to '.github/actions/check-cc') diff --git a/.github/actions/check-cc/action.yml b/.github/actions/check-cc/action.yml index b297f72..1e5b988 100644 --- a/.github/actions/check-cc/action.yml +++ b/.github/actions/check-cc/action.yml @@ -1,9 +1,15 @@ name: Check cc/c++ description: Check cc/c++ +inputs: + version: + description: Specific version to check + required: false runs: using: composite steps: - run: | + $version = '${{ inputs.version }}' + function Check-Exe { param( [Parameter(Mandatory=$true)] @@ -15,6 +21,10 @@ runs: echo $output $($output | Select-String -Pattern "clang version" -SimpleMatch -Quiet) -or $(throw "Unexpected `$Exe --version` output") + + if ($script:version) { + $($output | Select-String -Pattern "$script:version." -SimpleMatch -Quiet) -or $(throw "Unexpected `$Exe --version` output") + } } Check-Exe cc -- cgit v1.2.3