aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.github/actions
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2025-12-29 17:50:29 +0100
committerEgor Tensin <egor@tensin.name>2025-12-29 17:53:18 +0100
commit9e75036947905d4a8505f9a975a0f49fb810b0dd (patch)
tree68bce73a6e50df1282dd6f5fd426632808ce5805 /.github/actions
parentworkflows/test: fix root directory path (diff)
downloadsetup-mingw-9e75036947905d4a8505f9a975a0f49fb810b0dd.tar.gz
setup-mingw-9e75036947905d4a8505f9a975a0f49fb810b0dd.zip
workflows/test: verify that a specific version is installed
Diffstat (limited to '.github/actions')
-rw-r--r--.github/actions/check-cc/action.yml11
1 files changed, 9 insertions, 2 deletions
diff --git a/.github/actions/check-cc/action.yml b/.github/actions/check-cc/action.yml
index 5a6daa8..9f29631 100644
--- a/.github/actions/check-cc/action.yml
+++ b/.github/actions/check-cc/action.yml
@@ -1,11 +1,13 @@
name: Check cc/c++
description: Check cc/c++
+inputs:
+ version:
+ description: GCC version to grep for
+ required: false
runs:
using: composite
steps:
- run: |
- $version = '${{ inputs.version }}'
-
function Check-Exe {
param(
[Parameter(Mandatory=$true)]
@@ -18,6 +20,11 @@ runs:
# 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")
+
+ $version = '${{ inputs.version }}'
+ if ($version) {
+ $($output | Select-String -Pattern $version -SimpleMatch -Quiet) -or $(throw "Unexpected `$Exe --version` output")
+ }
}
Check-Exe cc