From 5ccdd5408afee846e2c3f7dc7f7359a8821faba8 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 7 Apr 2026 12:09:22 +0200 Subject: install LLD as well --- .github/actions/check-lld/action.yml | 41 ++++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 6 ++++++ 2 files changed, 47 insertions(+) create mode 100644 .github/actions/check-lld/action.yml (limited to '.github') 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 }}' -- cgit v1.3