diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-07-08 11:53:54 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-07-08 12:05:50 +0300 |
commit | f553c1487dc2df78cb75a3c66a1f96321d2a7d91 (patch) | |
tree | 92e03bc66acdc34fbe80338d790ad235bec7a9e1 | |
parent | workflows/test: test short version numbers too (diff) | |
download | setup-clang-f553c1487dc2df78cb75a3c66a1f96321d2a7d91.tar.gz setup-clang-f553c1487dc2df78cb75a3c66a1f96321d2a7d91.zip |
map version 4 to 4.0v1.1.1
-rw-r--r-- | .github/actions/build-foo/action.yml | 7 | ||||
-rw-r--r-- | .github/workflows/test.yml | 5 | ||||
-rw-r--r-- | README.md | 5 | ||||
-rw-r--r-- | action.yml | 5 |
4 files changed, 15 insertions, 7 deletions
diff --git a/.github/actions/build-foo/action.yml b/.github/actions/build-foo/action.yml index c86fecb..36fc650 100644 --- a/.github/actions/build-foo/action.yml +++ b/.github/actions/build-foo/action.yml @@ -1,9 +1,10 @@ name: Build foo.exe description: Build foo.exe inputs: - version: - description: Version to use + binary: + description: Compiler binary file name required: false + default: clang++ platform: description: Target platform required: true @@ -23,5 +24,5 @@ runs: $flags += '-lpthread' } - & "clang++$version" $flags + & '${{ inputs.binary }}' $flags shell: pwsh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bef51b3..feda01d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -50,7 +50,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Set up Clang + - id: setup + name: Set up Clang uses: ./ with: version: '${{ matrix.version }}' @@ -59,7 +60,7 @@ jobs: - name: Build foo.exe uses: ./.github/actions/build-foo with: - version: '${{ matrix.version }}' + binary: '${{ steps.setup.outputs.clangxx }}' - name: Run foo.exe uses: ./.github/actions/run-foo - name: Check cc/c++ @@ -44,6 +44,11 @@ API | hardlinks | *any* | ✓ | Cygwin: don't convert any symlinks. | | 1 | | Cygwin: convert symlinks in /usr/bin to hardlinks. +| Output | Example | Description +| ------- | --------- | ----------- +| clang | clang-4.0 | clang compiler binary file name +| clangxx | clang++-7 | clang++ compiler binary file name + Supported versions ------------------ @@ -92,8 +92,9 @@ runs: switch -Exact ($Version) { # Since version 7, they dropped the .0 suffix. The earliest - # version supported is 5.0 on Bionic; versions 5 and 6 are - # mapped to LLVM-friendly 5.0 and 6.0. + # version supported is 3.9 on Bionic; versions 4, 5 and 6 are + # mapped to LLVM-friendly 4.0, 5.0 and 6.0. + '4' { '4.0' } '5' { '5.0' } '6' { '6.0' } default { $Version } |