diff options
Diffstat (limited to '.github')
| -rw-r--r-- | .github/actions/check-lld/action.yml | 41 | ||||
| -rw-r--r-- | .github/workflows/test.yml | 6 |
2 files changed, 47 insertions, 0 deletions
diff --git a/.github/actions/check-lld/action.yml b/.github/actions/check-lld/action.yml new file mode 100644 index 0000000..5bb25b6 --- /dev/null +++ b/.github/actions/check-lld/action.yml @@ -0,0 +1,41 @@ +name: Check LLD +description: Check LLD +inputs: + version: + description: Specific version to check + required: false +runs: + using: composite + steps: + - run: | + function Check-Exe { + param( + [Parameter(Mandatory=$true)] + [string] $Exe, + [Parameter(Mandatory=$true)] + [string] $HelpString + ) + + echo (Get-Command $Exe).Path + $output = & $Exe --version 2>&1 + echo $output + + $($output | Select-String -Pattern $HelpString -SimpleMatch -Quiet) -or $(throw "Unexpected `$Exe --version` output") + } + + $version = '${{ inputs.version }}' + + $driver_exe = 'lld' + # Although the output of `lld --version` claims that it's ld-link on + # Windows, the Chocolatey version at least still uses ld.lld as on + # Linux. + $real_exe = 'ld.lld' + + if ($version) { + $driver_exe = "$driver_exe-$version" + $real_exe = "$real_exe-$version" + } + + Check-Exe $driver_exe 'lld is a generic driver' + Check-Exe $real_exe "LLD $version" + shell: pwsh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d70af44..90b254c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,6 +32,8 @@ jobs: uses: ./.github/actions/run-foo - name: Check symlinks uses: ./.github/actions/check-cc + - name: Check lld + uses: ./.github/actions/check-lld versions: strategy: @@ -64,3 +66,7 @@ jobs: uses: ./.github/actions/check-cc with: version: '${{ matrix.version }}' + - name: Check lld + uses: ./.github/actions/check-lld + with: + version: '${{ matrix.version }}' |
