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


                          

                                          
                   
                    






                                


                                                                  







                                                       
 
                                       
                 
name: Build foo.exe
description: Build foo.exe
inputs:
  binary:
    description: Compiler binary file name
    required: false
    default: clang++
  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'
        }

        & '${{ inputs.binary }}' $flags
      shell: pwsh