diff options
| author | Egor Tensin <egor@tensin.name> | 2026-04-07 12:09:22 +0200 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-04-07 12:42:32 +0200 |
| commit | 5ccdd5408afee846e2c3f7dc7f7359a8821faba8 (patch) | |
| tree | 5e485e0ff9fc6df3e13dda77b9a66e08060e17da /.github | |
| parent | Merge pull request #23 from egor-tensin/dependabot/github_actions/egor-tensin... (diff) | |
| download | setup-clang-5ccdd5408afee846e2c3f7dc7f7359a8821faba8.tar.gz setup-clang-5ccdd5408afee846e2c3f7dc7f7359a8821faba8.zip | |
install LLD as well
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 }}' |
