aboutsummaryrefslogblamecommitdiffstatshomepage
path: root/.github/actions/check-cc/action.yml
blob: aef6d9cac24b0e62f4f0f3470d0742eb2009d578 (plain) (tree)
1
2
3
4
5
6
7
8
9
10

                           



                                          



                  

                                          










                                                                                                                                     



                                                                                                                                            


                    
                       
                     
                         
                 
name: Check symlinks
description: Check symlinks
inputs:
  version:
    description: Specific version to check
    required: false
runs:
  using: composite
  steps:
    - run: |
        $version = '${{ inputs.version }}'

        function Check-Exe {
            param(
                [Parameter(Mandatory=$true)]
                [string] $Exe
            )

            echo (Get-Command $Exe).Path
            $output = & $Exe --version
            echo $output

            $($output | Select-String -Pattern "clang version" -SimpleMatch -Quiet) -or $(throw "Unexpected `$Exe --version` output")

            if ($script:version) {
                $($output | Select-String -Pattern "$script:version." -SimpleMatch -Quiet) -or $(throw "Unexpected `$Exe --version` output")
            }
        }

        Check-Exe cc
        Check-Exe clang
        Check-Exe c++
        Check-Exe clang++
      shell: pwsh