set up clang/clang++ symlinks
This commit is contained in:
parent
bbe81e2da0
commit
01d437c061
5 changed files with 24 additions and 13 deletions
4
.github/actions/check-cc-cygwin/action.yml
vendored
4
.github/actions/check-cc-cygwin/action.yml
vendored
|
@ -1,5 +1,5 @@
|
||||||
name: Check cc/c++
|
name: Check symlinks
|
||||||
description: Check cc/c++ (on Cygwin)
|
description: Check symlinks (on Cygwin)
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
|
|
6
.github/actions/check-cc/action.yml
vendored
6
.github/actions/check-cc/action.yml
vendored
|
@ -1,5 +1,5 @@
|
||||||
name: Check cc/c++
|
name: Check symlinks
|
||||||
description: Check cc/c++
|
description: Check symlinks
|
||||||
inputs:
|
inputs:
|
||||||
version:
|
version:
|
||||||
description: Specific version to check
|
description: Specific version to check
|
||||||
|
@ -28,5 +28,7 @@ runs:
|
||||||
}
|
}
|
||||||
|
|
||||||
Check-Exe cc
|
Check-Exe cc
|
||||||
|
Check-Exe clang
|
||||||
Check-Exe c++
|
Check-Exe c++
|
||||||
|
Check-Exe clang++
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
|
8
.github/workflows/test.yml
vendored
8
.github/workflows/test.yml
vendored
|
@ -31,7 +31,7 @@ jobs:
|
||||||
uses: ./.github/actions/build-foo
|
uses: ./.github/actions/build-foo
|
||||||
- name: Run foo.exe
|
- name: Run foo.exe
|
||||||
uses: ./.github/actions/run-foo
|
uses: ./.github/actions/run-foo
|
||||||
- name: Check cc/c++
|
- name: Check symlinks
|
||||||
uses: ./.github/actions/check-cc
|
uses: ./.github/actions/check-cc
|
||||||
|
|
||||||
versions:
|
versions:
|
||||||
|
@ -63,7 +63,7 @@ jobs:
|
||||||
binary: '${{ steps.setup.outputs.clangxx }}'
|
binary: '${{ steps.setup.outputs.clangxx }}'
|
||||||
- name: Run foo.exe
|
- name: Run foo.exe
|
||||||
uses: ./.github/actions/run-foo
|
uses: ./.github/actions/run-foo
|
||||||
- name: Check cc/c++
|
- name: Check symlinks
|
||||||
uses: ./.github/actions/check-cc
|
uses: ./.github/actions/check-cc
|
||||||
with:
|
with:
|
||||||
version: '${{ matrix.version }}'
|
version: '${{ matrix.version }}'
|
||||||
|
@ -99,9 +99,9 @@ jobs:
|
||||||
if: '!matrix.hardlinks'
|
if: '!matrix.hardlinks'
|
||||||
- name: Run foo.exe
|
- name: Run foo.exe
|
||||||
uses: ./.github/actions/run-foo
|
uses: ./.github/actions/run-foo
|
||||||
- name: Check cc/c++
|
- name: Check symlinks
|
||||||
uses: ./.github/actions/check-cc
|
uses: ./.github/actions/check-cc
|
||||||
if: matrix.hardlinks
|
if: matrix.hardlinks
|
||||||
- name: Check cc/c++ on Cygwin
|
- name: Check symlinks
|
||||||
uses: ./.github/actions/check-cc-cygwin
|
uses: ./.github/actions/check-cc-cygwin
|
||||||
if: '!matrix.hardlinks'
|
if: '!matrix.hardlinks'
|
||||||
|
|
|
@ -39,8 +39,8 @@ API
|
||||||
| | *any* | | Install the i686 toolchain.
|
| | *any* | | Install the i686 toolchain.
|
||||||
| cygwin | *any* | ✓ | Install native binaries.
|
| cygwin | *any* | ✓ | Install native binaries.
|
||||||
| | 1 | | Install Cygwin packages.
|
| | 1 | | Install Cygwin packages.
|
||||||
| cc | 1 | ✓ | Set up `cc`/`c++` executables.
|
| cc | 1 | ✓ | Set up `cc`/`clang`/`c++`/`clang++` executables.
|
||||||
| | *any* | | Don't set up `cc`/`c++`.
|
| | *any* | | Don't set up the executables.
|
||||||
| hardlinks | *any* | ✓ | Cygwin: don't convert any symlinks.
|
| hardlinks | *any* | ✓ | Cygwin: don't convert any symlinks.
|
||||||
| | 1 | | Cygwin: convert symlinks in /usr/bin to hardlinks.
|
| | 1 | | Cygwin: convert symlinks in /usr/bin to hardlinks.
|
||||||
|
|
||||||
|
|
15
action.yml
15
action.yml
|
@ -15,7 +15,7 @@ inputs:
|
||||||
required: false
|
required: false
|
||||||
default: 0
|
default: 0
|
||||||
cc:
|
cc:
|
||||||
description: Set up cc/c++ executables
|
description: Set up cc/clang/c++/clang++ executables
|
||||||
required: false
|
required: false
|
||||||
default: 1
|
default: 1
|
||||||
hardlinks:
|
hardlinks:
|
||||||
|
@ -211,6 +211,9 @@ runs:
|
||||||
|
|
||||||
New-Variable cc -Value ('${{ inputs.cc }}' -eq '1') -Option Constant
|
New-Variable cc -Value ('${{ inputs.cc }}' -eq '1') -Option Constant
|
||||||
|
|
||||||
|
New-Variable clang -Value '${{ steps.install.outputs.clang }}' -Option Constant
|
||||||
|
New-Variable clangxx -Value '${{ steps.install.outputs.clangxx }}' -Option Constant
|
||||||
|
|
||||||
function Link-Exe {
|
function Link-Exe {
|
||||||
param(
|
param(
|
||||||
[Parameter(Mandatory=$true)]
|
[Parameter(Mandatory=$true)]
|
||||||
|
@ -234,8 +237,14 @@ runs:
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cc) {
|
if ($cc) {
|
||||||
Link-Exe '${{ steps.install.outputs.clang }}' cc
|
Link-Exe $clang cc
|
||||||
Link-Exe '${{ steps.install.outputs.clangxx }}' c++
|
if ($clang -ne 'clang') {
|
||||||
|
Link-Exe $clang 'clang'
|
||||||
|
}
|
||||||
|
Link-Exe $clangxx c++
|
||||||
|
if ($clangxx -ne 'clang++') {
|
||||||
|
Link-Exe $clangxx 'clang++'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue