aboutsummaryrefslogblamecommitdiffstatshomepage
path: root/.github/actions/build-foo/action.yml
blob: c86fecb2c200e31814028eceb0947be65471ec3e (plain) (tree)
1
2
3
4
5
6


                          


                               






                                


                                                                  







                                                       

                                  
                 
name: Build foo.exe
description: Build foo.exe
inputs:
  version:
    description: Version to use
    required: false
  platform:
    description: Target platform
    required: true
runs:
  using: composite
  steps:
    - run: |
        $version = '${{ inputs.version }}'
        $version = if ($version) { "-$version" } else { $version }

        $flags = @()
        if ('${{ matrix.platform }}' -eq 'x86') {
            $flags += '-m32'
        }
        $flags += '-std=c++14','-o','foo.exe','foo.cpp'
        if ('${{ runner.os }}' -eq 'Linux') {
            $flags += '-lpthread'
        }

        & "clang++$version" $flags
      shell: pwsh