aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.github/actions/run-example/action.yml
blob: 5300ab9db0694ed4dbda0c466de890aaf6beac12 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
name: Run example project
description: Run example project
inputs:
  path:
    description: Installation directory
    required: true
runs:
  using: composite
  steps:
    - run: |
        New-Variable path -Value '${{ inputs.path }}' -Option Constant

        if ($env:CI_HOST_LINUX -and -not $env:CI_TARGET_LINUX) {
            echo 'Not going to do that on Linux/MinGW'
            exit
        }

        if ($env:CI_TARGET_LINUX) {
            $lib = Join-Path $path '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
      shell: pwsh