diff options
Diffstat (limited to '')
| -rw-r--r-- | .github/actions/run-example-boost/action.yml | 16 | ||||
| -rw-r--r-- | .github/actions/run-example/action.yml | 21 |
2 files changed, 19 insertions, 18 deletions
diff --git a/.github/actions/run-example-boost/action.yml b/.github/actions/run-example-boost/action.yml index c2933f1..f1fa81c 100644 --- a/.github/actions/run-example-boost/action.yml +++ b/.github/actions/run-example-boost/action.yml @@ -1,18 +1,18 @@ name: Run examples/boost description: Run examples/boost inputs: - path: + install_dir: description: Installation directory required: true runs: using: composite steps: - env: - ARG_PATH: ${{ inputs.path }} + ARG_INSTALL_DIR: ${{ inputs.install_dir }} run: | - $path = $env:ARG_PATH + $install_dir = (Get-ChildItem env:ARG_INSTALL_DIR).Value - if ($env:CI_HOST_LINUX -and -not $env:CI_TARGET_LINUX) { + if ((Get-ChildItem env:CI_HOST_LINUX).Value -and !(Get-ChildItem env:CI_TARGET_LINUX).Value) { echo 'Not going to do that on Linux/MinGW' exit } @@ -20,15 +20,15 @@ runs: $relative_test = 'test.txt' $absolute_test = Join-Path (Get-Location).Path 'test.txt' - $exe_path = (Join-Path $path 'bin' 'foo') - $exe_path += $env:CI_EXE_EXT + $name = 'foo' + (Get-ChildItem env:CI_EXE_EXT).Value + $path = Join-Path $install_dir 'bin' $name - $actual = & $exe_path $relative_test + $actual = & $path $relative_test echo 'Actual output:' echo $actual - $expected = $exe_path,$absolute_test + $expected = $path,$absolute_test echo 'Expected output:' echo $expected diff --git a/.github/actions/run-example/action.yml b/.github/actions/run-example/action.yml index 9d3f90f..27210e9 100644 --- a/.github/actions/run-example/action.yml +++ b/.github/actions/run-example/action.yml @@ -1,30 +1,31 @@ name: Run example project description: Run example project inputs: - path: + install_dir: description: Installation directory required: true runs: using: composite steps: - env: - ARG_PATH: ${{ inputs.path }} + ARG_INSTALL_DIR: ${{ inputs.install_dir }} run: | - $path = $env:ARG_PATH + $install_dir = (Get-ChildItem env:ARG_INSTALL_DIR).Value - if ($env:CI_HOST_LINUX -and -not $env:CI_TARGET_LINUX) { - echo 'Not going to do that on Linux/MinGW' + if ((Get-ChildItem env:CI_HOST_LINUX).Value -and !(Get-ChildItem env:CI_TARGET_LINUX).Value) { + echo 'Not going to do that on Linux + MinGW' exit } - if ($env:CI_TARGET_LINUX) { - $lib = Join-Path $path 'lib' + if ((Get-ChildItem env:CI_TARGET_LINUX).Value) { + $lib = Join-Path $install_dir 'lib' if (Test-Path $lib) { $lib = Resolve-Path $lib $env:LD_LIBRARY_PATH = $lib } } - $exe_path = (Join-Path $path 'bin' 'foo') + $env:CI_EXE_EXT - echo "Executable path: $exe_path" - & $exe_path + $name = 'foo' + (Get-ChildItem env:CI_EXE_EXT).Value + $path = Join-Path $install_dir 'bin' $name + echo "Executable path: $path" + & $path shell: pwsh |
