aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/action.yml
diff options
context:
space:
mode:
Diffstat (limited to 'action.yml')
-rw-r--r--action.yml37
1 files changed, 19 insertions, 18 deletions
diff --git a/action.yml b/action.yml
index cd6c626..e45b0f1 100644
--- a/action.yml
+++ b/action.yml
@@ -27,15 +27,16 @@ runs:
using: composite
steps:
- id: install
+ env:
+ ARG_VERSION: ${{ inputs.version }}
+ ARG_PLATFORM: ${{ inputs.platform }}
run: |
- New-Variable os -Value '${{ runner.os }}' -Option Constant
+ $linux_host = '${{ runner.os }}' -eq 'Linux'
+ $windows_host = '${{ runner.os }}' -eq 'Windows'
- New-Variable linux_host -Value ($os -eq 'Linux') -Option Constant
- New-Variable windows_host -Value ($os -eq 'Windows') -Option Constant
-
- New-Variable version -Value ('${{ inputs.version }}') -Option Constant
- New-Variable latest -Value ($version -eq 'latest') -Option Constant
- New-Variable x64 -Value ('${{ inputs.platform }}' -eq 'x64') -Option Constant
+ $version = $env:ARG_VERSION
+ $latest = $version -eq 'latest'
+ $x64 = $env:ARG_PLATFORM -eq 'x64'
function Locate-Choco {
$path = Get-Command 'choco' -ErrorAction SilentlyContinue
@@ -158,9 +159,7 @@ runs:
Install-Package $packages
} elseif ($windows_host) {
Install-Package llvm
-
- $bin_dir = Join-Path $env:ProgramFiles LLVM bin
- echo $bin_dir >> $env:GITHUB_PATH
+ echo 'C:\Program Files\LLVM\bin' >> $env:GITHUB_PATH
} else {
throw "Sorry, installing Clang is unsupported on $os"
}
@@ -170,16 +169,18 @@ runs:
echo "lld=$lld" >> $env:GITHUB_OUTPUT
shell: pwsh
- - run: |
- New-Variable os -Value '${{ runner.os }}' -Option Constant
-
- New-Variable linux_host -Value ($os -eq 'Linux') -Option Constant
- New-Variable windows_host -Value ($os -eq 'Windows') -Option Constant
+ - env:
+ ARG_CC: ${{ inputs.cc }}
+ CLANG: ${{ steps.install.outputs.clang }}
+ CLANGXX: ${{ steps.install.outputs.clangxx }}
+ run: |
+ $linux_host = '${{ runner.os }}' -eq 'Linux'
+ $windows_host = '${{ runner.os }}' -eq 'Windows'
- New-Variable cc -Value ('${{ inputs.cc }}' -eq '1') -Option Constant
+ $cc = $env:ARG_CC -eq '1'
- New-Variable clang -Value '${{ steps.install.outputs.clang }}' -Option Constant
- New-Variable clangxx -Value '${{ steps.install.outputs.clangxx }}' -Option Constant
+ $clang = $env:CLANG
+ $clangxx = $env:CLANGXX
function Link-Exe {
param(