aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-07-03 01:29:44 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-07-03 01:29:44 +0300
commit4e703c255a23ee7f5e2225ea5b914875ce9669e4 (patch)
treef3d0074db3cc0a1fdb3aee07427030c414ec810c
parentwhitespace (diff)
downloadsetup-gcc-4e703c255a23ee7f5e2225ea5b914875ce9669e4.tar.gz
setup-gcc-4e703c255a23ee7f5e2225ea5b914875ce9669e4.zip
actions/build-foo: use versioned g++ binary
-rw-r--r--.github/actions/build-foo/action.yml9
-rw-r--r--.github/workflows/test.yml2
2 files changed, 10 insertions, 1 deletions
diff --git a/.github/actions/build-foo/action.yml b/.github/actions/build-foo/action.yml
index c1a6fdd..3e50e67 100644
--- a/.github/actions/build-foo/action.yml
+++ b/.github/actions/build-foo/action.yml
@@ -1,6 +1,9 @@
name: Build foo.exe
description: Build foo.exe
inputs:
+ version:
+ description: Version to use
+ required: false
platform:
description: Target platform
required: true
@@ -8,6 +11,9 @@ runs:
using: composite
steps:
- run: |
+ $version = '${{ inputs.version }}'
+ $version = if ($version) { "-$version" } else { $version }
+
$flags = @()
if ('${{ matrix.platform }}' -eq 'x86') {
$flags += '-m32'
@@ -16,5 +22,6 @@ runs:
if ('${{ runner.os }}' -eq 'Linux') {
$flags += '-lpthread'
}
- g++ $flags
+
+ & "g++$version" $flags
shell: pwsh
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 2215272..d8c17ec 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -53,6 +53,8 @@ jobs:
cc: 1
- name: Build foo.exe
uses: ./.github/actions/build-foo
+ with:
+ version: '${{ matrix.version }}'
- name: Run foo.exe
uses: ./.github/actions/run-foo
- name: Check cc/c++