aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-07-03 02:26:25 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-07-03 02:26:25 +0300
commitc5aa391b688f0aed6faad297b402c26b81968f75 (patch)
tree2db1e3c4bc2be848fffa51b4d36535d9f6af35c6
parentREADME: update (diff)
downloadsetup-clang-c5aa391b688f0aed6faad297b402c26b81968f75.tar.gz
setup-clang-c5aa391b688f0aed6faad297b402c26b81968f75.zip
actions/build-foo: use versioned clang++ 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 50f3f1e..c86fecb 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'
}
- clang++ $flags
+
+ & "clang++$version" $flags
shell: pwsh
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index e9ef424..07f101c 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -57,6 +57,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++