aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--.github/actions/check-cc-cygwin/action.yml4
-rw-r--r--.github/actions/check-cc/action.yml6
-rw-r--r--.github/workflows/test.yml8
-rw-r--r--README.md4
-rw-r--r--action.yml15
5 files changed, 24 insertions, 13 deletions
diff --git a/.github/actions/check-cc-cygwin/action.yml b/.github/actions/check-cc-cygwin/action.yml
index 042709f..2da3be4 100644
--- a/.github/actions/check-cc-cygwin/action.yml
+++ b/.github/actions/check-cc-cygwin/action.yml
@@ -1,5 +1,5 @@
-name: Check cc/c++
-description: Check cc/c++ (on Cygwin)
+name: Check symlinks
+description: Check symlinks (on Cygwin)
runs:
using: composite
steps:
diff --git a/.github/actions/check-cc/action.yml b/.github/actions/check-cc/action.yml
index 945966f..c1dd756 100644
--- a/.github/actions/check-cc/action.yml
+++ b/.github/actions/check-cc/action.yml
@@ -1,5 +1,5 @@
-name: Check cc/c++
-description: Check cc/c++
+name: Check symlinks
+description: Check symlinks
inputs:
version:
description: Specific version to check
@@ -29,5 +29,7 @@ runs:
}
Check-Exe cc
+ Check-Exe gcc
Check-Exe c++
+ Check-Exe g++
shell: pwsh
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index d8c17ec..1503209 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -28,7 +28,7 @@ jobs:
uses: ./.github/actions/build-foo
- name: Run foo.exe
uses: ./.github/actions/run-foo
- - name: Check cc/c++
+ - name: Check symlinks
uses: ./.github/actions/check-cc
versions:
@@ -57,7 +57,7 @@ jobs:
version: '${{ matrix.version }}'
- name: Run foo.exe
uses: ./.github/actions/run-foo
- - name: Check cc/c++
+ - name: Check symlinks
uses: ./.github/actions/check-cc
with:
version: '${{ matrix.version }}'
@@ -93,9 +93,9 @@ jobs:
if: '!matrix.hardlinks'
- name: Run foo.exe
uses: ./.github/actions/run-foo
- - name: Check cc/c++
+ - name: Check symlinks
uses: ./.github/actions/check-cc
if: matrix.hardlinks
- - name: Check cc/c++
+ - name: Check symlinks
uses: ./.github/actions/check-cc-cygwin
if: '!matrix.hardlinks'
diff --git a/README.md b/README.md
index 8bd01b0..b69dce7 100644
--- a/README.md
+++ b/README.md
@@ -41,8 +41,8 @@ API
| | *any* | | Install the i686 toolchain.
| cygwin | *any* | ✓ | Install native binaries.
| | 1 | | Install Cygwin packages.
-| cc | 1 | ✓ | Set up `cc`/`c++` executables.
-| | *any* | | Don't set up `cc`/`c++`.
+| cc | 1 | ✓ | Set up `cc`/`gcc`/`c++`/`g++` executables.
+| | *any* | | Don't set up the executables.
| hardlinks | *any* | ✓ | Cygwin: don't convert any symlinks.
| | 1 | | Cygwin: convert symlinks in /usr/bin to hardlinks.
diff --git a/action.yml b/action.yml
index be9f694..9ddd7b2 100644
--- a/action.yml
+++ b/action.yml
@@ -15,7 +15,7 @@ inputs:
required: false
default: 0
cc:
- description: Set up cc/c++ executables
+ description: Set up cc/gcc/c++/g++ executables
required: false
default: 1
hardlinks:
@@ -133,6 +133,9 @@ runs:
New-Variable cc -Value ('${{ inputs.cc }}' -eq '1') -Option Constant
+ New-Variable gcc -Value '${{ steps.install.outputs.gcc }}' -Option Constant
+ New-Variable gxx -Value '${{ steps.install.outputs.gxx }}' -Option Constant
+
function Link-Exe {
param(
[Parameter(Mandatory=$true)]
@@ -156,8 +159,14 @@ runs:
}
if ($cc) {
- Link-Exe '${{ steps.install.outputs.gcc }}' cc
- Link-Exe '${{ steps.install.outputs.gxx }}' c++
+ Link-Exe $gcc cc
+ if ($gcc -ne 'gcc') {
+ Link-Exe $gcc 'gcc'
+ }
+ Link-Exe $gxx c++
+ if ($gxx -ne 'g++') {
+ Link-Exe $gxx 'g++'
+ }
}
shell: pwsh