aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.github
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-07-03 01:48:08 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-07-03 02:06:37 +0300
commit77e3dc62d556a680a94e28e0b6ed25627afd21ab (patch)
tree717e735136380e4f05a6f8a57ceea6d2f13fa2b5 /.github
parentworkflows/test: factor out steps & refactoring (diff)
downloadsetup-clang-77e3dc62d556a680a94e28e0b6ed25627afd21ab.tar.gz
setup-clang-77e3dc62d556a680a94e28e0b6ed25627afd21ab.zip
support installing multiple versions
Diffstat (limited to '.github')
-rw-r--r--.github/actions/check-cc/action.yml10
-rw-r--r--.github/workflows/test.yml30
2 files changed, 40 insertions, 0 deletions
diff --git a/.github/actions/check-cc/action.yml b/.github/actions/check-cc/action.yml
index b297f72..1e5b988 100644
--- a/.github/actions/check-cc/action.yml
+++ b/.github/actions/check-cc/action.yml
@@ -1,9 +1,15 @@
name: Check cc/c++
description: Check cc/c++
+inputs:
+ version:
+ description: Specific version to check
+ required: false
runs:
using: composite
steps:
- run: |
+ $version = '${{ inputs.version }}'
+
function Check-Exe {
param(
[Parameter(Mandatory=$true)]
@@ -15,6 +21,10 @@ runs:
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
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 77edef1..e9ef424 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -34,6 +34,36 @@ jobs:
- name: Check cc/c++
uses: ./.github/actions/check-cc
+ versions:
+ strategy:
+ matrix:
+ os: [ubuntu-18.04, ubuntu-20.04]
+ version: ['5.0', '6.0', 7, 8, 9, 10, 11, 12]
+ exclude:
+ - {os: ubuntu-20.04, version: '5.0'}
+ - {os: ubuntu-20.04, version: '6.0'}
+ - {os: ubuntu-20.04, version: 7}
+ - {os: ubuntu-20.04, version: 8}
+ runs-on: '${{ matrix.os }}'
+ name: 'Version: ${{ matrix.os }} / ${{ matrix.version }}'
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Set up Clang
+ uses: ./
+ with:
+ version: '${{ matrix.version }}'
+ platform: '${{ matrix.platform }}'
+ cc: 1
+ - name: Build foo.exe
+ uses: ./.github/actions/build-foo
+ - name: Run foo.exe
+ uses: ./.github/actions/run-foo
+ - name: Check cc/c++
+ uses: ./.github/actions/check-cc
+ with:
+ version: '${{ matrix.version }}'
+
cygwin:
strategy:
matrix: