From 3b362febbfd46cfa82e052629dd3f3a3fd25676c Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 8 Jul 2021 11:51:19 +0300 Subject: [PATCH 01/17] workflows/test: test short version numbers too --- .github/workflows/test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ea75fb4..bef51b3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,11 +38,13 @@ jobs: strategy: matrix: os: [ubuntu-18.04, ubuntu-20.04] - version: ['3.9', '4.0', '5.0', '6.0', 7, 8, 9, 10, 11, 12] + version: ['3.9', '4.0', 4, '5.0', 5, '6.0', 6, 7, 8, 9, 10, 11, 12] exclude: - {os: ubuntu-20.04, version: '3.9'} - {os: ubuntu-20.04, version: '4.0'} + - {os: ubuntu-20.04, version: 4} - {os: ubuntu-20.04, version: '5.0'} + - {os: ubuntu-20.04, version: 5} runs-on: '${{ matrix.os }}' name: 'Version: ${{ matrix.os }} / ${{ matrix.version }}' steps: From f553c1487dc2df78cb75a3c66a1f96321d2a7d91 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 8 Jul 2021 11:53:54 +0300 Subject: [PATCH 02/17] map version 4 to 4.0 --- .github/actions/build-foo/action.yml | 7 ++++--- .github/workflows/test.yml | 5 +++-- README.md | 5 +++++ 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++ diff --git a/README.md b/README.md index 62c7aaf..f3ae539 100644 --- a/README.md +++ b/README.md @@ -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 ------------------ diff --git a/action.yml b/action.yml index f1b9a1b..9565ab1 100644 --- a/action.yml +++ b/action.yml @@ -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 } From ce67c296ea47624a9677c3b96d2c9f04d0149ff7 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 8 Jul 2021 12:17:05 +0300 Subject: [PATCH 03/17] README: update --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f3ae539..6656a67 100644 --- a/README.md +++ b/README.md @@ -46,8 +46,8 @@ API | Output | Example | Description | ------- | --------- | ----------- -| clang | clang-4.0 | clang compiler binary file name -| clangxx | clang++-7 | clang++ compiler binary file name +| clang | clang-4.0 | `clang` binary name +| clangxx | clang++-7 | `clang++` binary name Supported versions ------------------ From bbe81e2da0986c4d563914ff42d973c99008ad72 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 21 Aug 2021 19:11:01 +0300 Subject: [PATCH 04/17] version 13 has been released --- .github/workflows/test.yml | 2 +- README.md | 3 ++- action.yml | 14 +++++++++++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index feda01d..6ead135 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,7 +38,7 @@ jobs: strategy: matrix: os: [ubuntu-18.04, ubuntu-20.04] - version: ['3.9', '4.0', 4, '5.0', 5, '6.0', 6, 7, 8, 9, 10, 11, 12] + version: ['3.9', '4.0', 4, '5.0', 5, '6.0', 6, 7, 8, 9, 10, 11, 12, 13] exclude: - {os: ubuntu-20.04, version: '3.9'} - {os: ubuntu-20.04, version: '4.0'} diff --git a/README.md b/README.md index 6656a67..c1c9135 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ The `version` parameter value is not checked for being an available version for the current distribution. The supported versions for a particular distribution are those found in that distro's repositories & those in the LLVM repository. -For example, the supported versions for Bionic & Focal as of July 2021 are +For example, the supported versions for Bionic & Focal as of August 2021 are listed below. | `version` | Bionic | Focal @@ -76,6 +76,7 @@ listed below. | 10 | ✓ | ✓ | 11 | ✓ | ✓ | 12 | ✓ | ✓ +| 13 | ✓ | ✓ This table is not definitive; I expect more future versions to be made available, especially for Focal. diff --git a/action.yml b/action.yml index 9565ab1..0bc9fc3 100644 --- a/action.yml +++ b/action.yml @@ -146,6 +146,7 @@ runs: $pkg_clang = 'clang' $pkg_llvm = 'llvm' $pkg_gxx = 'g++' + $additional_deps = @() if (!$latest) { $pkg_version = Format-UpstreamVersion $version @@ -156,12 +157,23 @@ runs: $clang = "$clang-$pkg_version" $clangxx = "$clangxx-$pkg_version" + + if ($pkg_version -eq '13') { + # On both Bionic and Focal, the following error occurs otherwise: + # + # The following packages have unmet dependencies: + # llvm-13 : Depends: libomp5-13 (>= 8) but it is not going to be installed + # E: Unable to correct problems, you have held broken packages. + $additional_deps += 'libomp5-13' + } } if (!$x64) { $pkg_gxx = 'g++-multilib' } + $packages = $pkg_clang,$pkg_llvm,$pkg_gxx + $packages += $additional_deps - Install-Package $pkg_clang $pkg_llvm $pkg_gxx + Install-Package $packages } elseif ($cygwin_host) { if (!$x64) { echo @' From 01d437c0618e76d3c44e7d58f5d175c75cb37bac Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 5 Sep 2021 21:52:59 +0300 Subject: [PATCH 05/17] set up clang/clang++ symlinks --- .github/actions/check-cc-cygwin/action.yml | 4 ++-- .github/actions/check-cc/action.yml | 6 ++++-- .github/workflows/test.yml | 8 ++++---- README.md | 4 ++-- action.yml | 15 ++++++++++++--- 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 f536649..432d1b8 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 1e5b988..aef6d9c 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 @@ -28,5 +28,7 @@ runs: } Check-Exe cc + Check-Exe clang Check-Exe c++ + Check-Exe clang++ shell: pwsh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6ead135..4cde415 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,7 +31,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: @@ -63,7 +63,7 @@ jobs: binary: '${{ steps.setup.outputs.clangxx }}' - 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 }}' @@ -99,9 +99,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++ on Cygwin + - name: Check symlinks uses: ./.github/actions/check-cc-cygwin if: '!matrix.hardlinks' diff --git a/README.md b/README.md index c1c9135..19910d0 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,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`/`clang`/`c++`/`clang++` 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 0bc9fc3..9ef8f3c 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/clang/c++/clang++ executables required: false default: 1 hardlinks: @@ -211,6 +211,9 @@ runs: New-Variable cc -Value ('${{ inputs.cc }}' -eq '1') -Option Constant + New-Variable clang -Value '${{ steps.install.outputs.clang }}' -Option Constant + New-Variable clangxx -Value '${{ steps.install.outputs.clangxx }}' -Option Constant + function Link-Exe { param( [Parameter(Mandatory=$true)] @@ -234,8 +237,14 @@ runs: } if ($cc) { - Link-Exe '${{ steps.install.outputs.clang }}' cc - Link-Exe '${{ steps.install.outputs.clangxx }}' c++ + Link-Exe $clang cc + if ($clang -ne 'clang') { + Link-Exe $clang 'clang' + } + Link-Exe $clangxx c++ + if ($clangxx -ne 'clang++') { + Link-Exe $clangxx 'clang++' + } } shell: pwsh From 95dbaa7ec864c6e75101e405756e35209c4c6856 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 15 Oct 2021 14:27:57 +0300 Subject: [PATCH 06/17] add Ubuntu 21.10 --- action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 9ef8f3c..44a8e88 100644 --- a/action.yml +++ b/action.yml @@ -122,7 +122,8 @@ runs: 'Ubuntu-19.10' { "deb http://apt.llvm.org/eoan/ llvm-toolchain-eoan-$Version main" } 'Ubuntu-20.04' { "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-$Version main" } 'Ubuntu-20.10' { "deb http://apt.llvm.org/groovy/ llvm-toolchain-groovy-$Version main" } - 'Ubuntu-21.04' { "deb http://apt.llvm.org/hirsute/ llvm-toolchain-hirsute-$Version main" } + 'Ubuntu-21.04' { "deb http://apt.llvm.org/groovy/ llvm-toolchain-groovy-$Version main" } + 'Ubuntu-21.10' { "deb http://apt.llvm.org/hirsute/ llvm-toolchain-hirsute-$Version main" } default { throw "Unsupported distribution: $distro" } } From 71d1a06d043553be2179c02ce07ef9a2d04c491f Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 15 Oct 2021 14:31:18 +0300 Subject: [PATCH 07/17] add couple of comments --- action.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/action.yml b/action.yml index 44a8e88..a3e3447 100644 --- a/action.yml +++ b/action.yml @@ -102,6 +102,9 @@ runs: } function Format-AptLine { + # Source: https://apt.llvm.org/llvm.sh + # Don't forget to update once in a while. + param( [Parameter(Mandatory=$true)] [string] $Version @@ -121,6 +124,9 @@ runs: 'Ubuntu-19.04' { "deb http://apt.llvm.org/disco/ llvm-toolchain-disco-$Version main" } 'Ubuntu-19.10' { "deb http://apt.llvm.org/eoan/ llvm-toolchain-eoan-$Version main" } 'Ubuntu-20.04' { "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-$Version main" } + # WTF is this? As of 2021-10-15, Ubuntu 20.10 is missing from the upstream llvm.sh, + # 21.04 (Hirsute) points to the the previous release (Groovy), and 21.10 (Impish) + # also points to the previous release (Hirsute). A mistake on their part? 'Ubuntu-20.10' { "deb http://apt.llvm.org/groovy/ llvm-toolchain-groovy-$Version main" } 'Ubuntu-21.04' { "deb http://apt.llvm.org/groovy/ llvm-toolchain-groovy-$Version main" } 'Ubuntu-21.10' { "deb http://apt.llvm.org/hirsute/ llvm-toolchain-hirsute-$Version main" } From 4b8d6e7c310f1ddd41d5eaf9eb044f10060a38a0 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 15 Dec 2021 18:48:50 +0300 Subject: [PATCH 08/17] workflows/test: test on windows-2022 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4cde415..2abe2ae 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: platform: [x86, x64] - os: [ubuntu-18.04, ubuntu-20.04, ubuntu-latest, windows-2016, windows-2019, windows-latest] + os: [ubuntu-18.04, ubuntu-20.04, ubuntu-latest, windows-2016, windows-2019, windows-2022, windows-latest] runs-on: '${{ matrix.os }}' name: 'Test: ${{ matrix.os }} / ${{ matrix.platform }}' steps: From 190f39dc69e90617dd277ec44e642c8488db4b18 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 2 Jan 2023 03:25:56 +0100 Subject: [PATCH 09/17] workflows/test: actualize runner OSes --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2abe2ae..2b58ae3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: platform: [x86, x64] - os: [ubuntu-18.04, ubuntu-20.04, ubuntu-latest, windows-2016, windows-2019, windows-2022, windows-latest] + os: [ubuntu-18.04, ubuntu-20.04, ubuntu-latest, windows-2019, windows-2022, windows-latest] runs-on: '${{ matrix.os }}' name: 'Test: ${{ matrix.os }} / ${{ matrix.platform }}' steps: From 74a1183273003db551fa57154deb282432a84063 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 2 Jan 2023 03:25:26 +0100 Subject: [PATCH 10/17] workflows/test: disable x86 Cygwin --- .github/actions/build-foo-cygwin/action.yml | 9 ++------- .github/workflows/test.yml | 6 +----- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/actions/build-foo-cygwin/action.yml b/.github/actions/build-foo-cygwin/action.yml index 08fb820..5f110c5 100644 --- a/.github/actions/build-foo-cygwin/action.yml +++ b/.github/actions/build-foo-cygwin/action.yml @@ -1,9 +1,5 @@ name: Build foo.exe description: Build foo.exe (on Cygwin) -inputs: - platform: - description: Target platform - required: true runs: using: composite steps: @@ -14,7 +10,6 @@ runs: echo "$src_dir" src_dir="$( cygpath -ua "$src_dir" )" cd -- "$src_dir" - arch= - [ '${{ matrix.platform }}' == 'x86' ] && arch=-m32 - clang++ $arch -std=c++14 -o foo.exe foo.cpp + clang++ --version + clang++ -std=c++14 -o foo.exe foo.cpp shell: C:\tools\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2b58ae3..3194130 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -71,10 +71,9 @@ jobs: cygwin: strategy: matrix: - platform: [x86, x64] hardlinks: [0, 1] runs-on: windows-latest - name: 'Cygwin: ${{ matrix.platform }} / hardlinks${{ matrix.hardlinks }}' + name: 'Cygwin: hardlinks${{ matrix.hardlinks }}' steps: - name: Checkout uses: actions/checkout@v2 @@ -82,12 +81,9 @@ jobs: uses: egor-tensin/cleanup-path@v1 - name: Install Cygwin uses: egor-tensin/setup-cygwin@v3 - with: - platform: '${{ matrix.platform }}' - name: Set up Clang uses: ./ with: - platform: '${{ matrix.platform }}' cygwin: 1 cc: 1 hardlinks: '${{ matrix.hardlinks }}' From 4535330f96cef4106e76f8d401044d879cb39679 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 2 Jan 2023 04:37:20 +0100 Subject: [PATCH 11/17] workflows/test: ignore Cygwin jobs for now --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3194130..444dcfc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,6 +74,9 @@ jobs: hardlinks: [0, 1] runs-on: windows-latest name: 'Cygwin: hardlinks${{ matrix.hardlinks }}' + # As of January 2023, clang simply doesn't work on Cygwin. + # It's also marked "Unmaintained" in the installer. + continue-on-error: true steps: - name: Checkout uses: actions/checkout@v2 From 93f89834ca2dcc4807d918caf70c0a1c8d85c553 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 2 Jan 2023 04:42:57 +0100 Subject: [PATCH 12/17] set-output is deprecated --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index a3e3447..fb0f7f9 100644 --- a/action.yml +++ b/action.yml @@ -205,8 +205,8 @@ runs: throw "Sorry, installing Clang is unsupported on $os" } - echo "::set-output name=clang::$clang" - echo "::set-output name=clangxx::$clangxx" + echo "clang=$clang" >> $env:GITHUB_OUTPUT + echo "clangxx=$clangxx" >> $env:GITHUB_OUTPUT shell: pwsh - run: | From 43ade2b3882c85da70b1b6f61431cd1566b5e8a0 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 2 Jan 2023 04:44:10 +0100 Subject: [PATCH 13/17] workflows/test: upgrade actions --- .github/workflows/test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 444dcfc..225cac1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,9 +18,9 @@ jobs: name: 'Test: ${{ matrix.os }} / ${{ matrix.platform }}' steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Clean up PATH - uses: egor-tensin/cleanup-path@v1 + uses: egor-tensin/cleanup-path@v3 if: runner.os == 'Windows' - name: Set up Clang uses: ./ @@ -49,7 +49,7 @@ jobs: name: 'Version: ${{ matrix.os }} / ${{ matrix.version }}' steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - id: setup name: Set up Clang uses: ./ @@ -79,11 +79,11 @@ jobs: continue-on-error: true steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Clean up PATH - uses: egor-tensin/cleanup-path@v1 + uses: egor-tensin/cleanup-path@v3 - name: Install Cygwin - uses: egor-tensin/setup-cygwin@v3 + uses: egor-tensin/setup-cygwin@v4 - name: Set up Clang uses: ./ with: From 5cc3e086451d33a5f45585be560cc7d792e55bd5 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 2 Jan 2023 05:00:46 +0100 Subject: [PATCH 14/17] simplify and future-proof adding apt repositories --- action.yml | 39 +++++---------------------------------- 1 file changed, 5 insertions(+), 34 deletions(-) diff --git a/action.yml b/action.yml index fb0f7f9..7a03e6e 100644 --- a/action.yml +++ b/action.yml @@ -75,15 +75,6 @@ runs: } } - function Get-DistroVersion { - if (!(Get-Command lsb_release -ErrorAction SilentlyContinue)) { - throw "Couldn't find lsb_release; LLVM only provides repositories for Debian/Ubuntu" - } - $distro = lsb_release -is - $version = lsb_release -sr - "$distro-$version" - } - function Format-UpstreamVersion { param( [Parameter(Mandatory=$true)] @@ -102,37 +93,17 @@ runs: } function Format-AptLine { - # Source: https://apt.llvm.org/llvm.sh - # Don't forget to update once in a while. - param( [Parameter(Mandatory=$true)] [string] $Version ) - $distro = Get-DistroVersion - - switch -Wildcard -CaseSensitive ($distro) { - 'Debian-9*' { "deb http://apt.llvm.org/stretch/ llvm-toolchain-stretch-$Version main" } - 'Debian-10*' { "deb http://apt.llvm.org/buster/ llvm-toolchain-buster-$Version main" } - 'Debian-11*' { "deb http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-$Version main" } - 'Debian-unstable' { "deb http://apt.llvm.org/unstable/ llvm-toolchain-$Version main" } - 'Debian-testing' { "deb http://apt.llvm.org/unstable/ llvm-toolchain-$Version main" } - 'Ubuntu-16.04' { "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-$Version main" } - 'Ubuntu-18.04' { "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-$Version main" } - 'Ubuntu-18.10' { "deb http://apt.llvm.org/cosmic/ llvm-toolchain-cosmic-$Version main" } - 'Ubuntu-19.04' { "deb http://apt.llvm.org/disco/ llvm-toolchain-disco-$Version main" } - 'Ubuntu-19.10' { "deb http://apt.llvm.org/eoan/ llvm-toolchain-eoan-$Version main" } - 'Ubuntu-20.04' { "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-$Version main" } - # WTF is this? As of 2021-10-15, Ubuntu 20.10 is missing from the upstream llvm.sh, - # 21.04 (Hirsute) points to the the previous release (Groovy), and 21.10 (Impish) - # also points to the previous release (Hirsute). A mistake on their part? - 'Ubuntu-20.10' { "deb http://apt.llvm.org/groovy/ llvm-toolchain-groovy-$Version main" } - 'Ubuntu-21.04' { "deb http://apt.llvm.org/groovy/ llvm-toolchain-groovy-$Version main" } - 'Ubuntu-21.10' { "deb http://apt.llvm.org/hirsute/ llvm-toolchain-hirsute-$Version main" } - - default { throw "Unsupported distribution: $distro" } + if (!(Get-Command lsb_release -ErrorAction SilentlyContinue)) { + throw "Couldn't find lsb_release; LLVM only provides repositories for Debian/Ubuntu" } + $codename = lsb_release -sc + + "deb http://apt.llvm.org/$codename/ llvm-toolchain-$codename-$Version main" } function Add-UpstreamRepo { From 7eeaf563e47e90b1a7329ad2763fc52596b59143 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 2 Jan 2023 05:05:43 +0100 Subject: [PATCH 15/17] workflows/test: add Jammy, versions 14-15 --- .github/workflows/test.yml | 17 ++++++++++++++--- README.md | 32 +++++++++++++++++--------------- 2 files changed, 31 insertions(+), 18 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 225cac1..2ef8b17 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: platform: [x86, x64] - os: [ubuntu-18.04, ubuntu-20.04, ubuntu-latest, windows-2019, windows-2022, windows-latest] + os: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04, windows-2019, windows-2022] runs-on: '${{ matrix.os }}' name: 'Test: ${{ matrix.os }} / ${{ matrix.platform }}' steps: @@ -37,14 +37,25 @@ jobs: versions: strategy: matrix: - os: [ubuntu-18.04, ubuntu-20.04] - version: ['3.9', '4.0', 4, '5.0', 5, '6.0', 6, 7, 8, 9, 10, 11, 12, 13] + os: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04] + version: ['3.9', '4.0', 4, '5.0', 5, '6.0', 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] exclude: - {os: ubuntu-20.04, version: '3.9'} - {os: ubuntu-20.04, version: '4.0'} - {os: ubuntu-20.04, version: 4} - {os: ubuntu-20.04, version: '5.0'} - {os: ubuntu-20.04, version: 5} + - {os: ubuntu-22.04, version: '3.9'} + - {os: ubuntu-22.04, version: '4.0'} + - {os: ubuntu-22.04, version: 4} + - {os: ubuntu-22.04, version: '5.0'} + - {os: ubuntu-22.04, version: 5} + - {os: ubuntu-22.04, version: '6.0'} + - {os: ubuntu-22.04, version: 6} + - {os: ubuntu-22.04, version: 7} + - {os: ubuntu-22.04, version: 8} + - {os: ubuntu-22.04, version: 9} + - {os: ubuntu-22.04, version: 10} runs-on: '${{ matrix.os }}' name: 'Version: ${{ matrix.os }} / ${{ matrix.version }}' steps: diff --git a/README.md b/README.md index 19910d0..4c47920 100644 --- a/README.md +++ b/README.md @@ -61,22 +61,24 @@ The `version` parameter value is not checked for being an available version for the current distribution. The supported versions for a particular distribution are those found in that distro's repositories & those in the LLVM repository. -For example, the supported versions for Bionic & Focal as of August 2021 are -listed below. +For example, you can find the list of available versions as of January 2023 +below. -| `version` | Bionic | Focal -| --------- | ------ | ----- -| 3.9 | ✓ | -| 4.0 | ✓ | -| 5.0 | ✓ | -| 6.0 | ✓ | ✓ -| 7 | ✓ | ✓ -| 8 | ✓ | ✓ -| 9 | ✓ | ✓ -| 10 | ✓ | ✓ -| 11 | ✓ | ✓ -| 12 | ✓ | ✓ -| 13 | ✓ | ✓ +| `version` | Bionic | Focal | Jammy +| --------- | ------ | ----- | ----- +| 3.9 | ✓ | | +| 4.0 | ✓ | | +| 5.0 | ✓ | | +| 6.0 | ✓ | ✓ | +| 7 | ✓ | ✓ | +| 8 | ✓ | ✓ | +| 9 | ✓ | ✓ | +| 10 | ✓ | ✓ | +| 11 | ✓ | ✓ | ✓ +| 12 | ✓ | ✓ | ✓ +| 13 | ✓ | ✓ | ✓ +| 14 | ✓ | ✓ | ✓ +| 15 | ✓ | ✓ | ✓ This table is not definitive; I expect more future versions to be made available, especially for Focal. From ef434b41eb33a70396fb336b1bae39c76d740c3d Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 2 Jan 2023 05:08:55 +0100 Subject: [PATCH 16/17] remove hack --- action.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/action.yml b/action.yml index 7a03e6e..511433d 100644 --- a/action.yml +++ b/action.yml @@ -124,7 +124,6 @@ runs: $pkg_clang = 'clang' $pkg_llvm = 'llvm' $pkg_gxx = 'g++' - $additional_deps = @() if (!$latest) { $pkg_version = Format-UpstreamVersion $version @@ -135,21 +134,11 @@ runs: $clang = "$clang-$pkg_version" $clangxx = "$clangxx-$pkg_version" - - if ($pkg_version -eq '13') { - # On both Bionic and Focal, the following error occurs otherwise: - # - # The following packages have unmet dependencies: - # llvm-13 : Depends: libomp5-13 (>= 8) but it is not going to be installed - # E: Unable to correct problems, you have held broken packages. - $additional_deps += 'libomp5-13' - } } if (!$x64) { $pkg_gxx = 'g++-multilib' } $packages = $pkg_clang,$pkg_llvm,$pkg_gxx - $packages += $additional_deps Install-Package $packages } elseif ($cygwin_host) { From 6e80af98bd1981a17e2e6fdd7e607af30190404d Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 17 Feb 2023 14:42:49 +0100 Subject: [PATCH 17/17] README: update --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 4c47920..9f7440b 100644 --- a/README.md +++ b/README.md @@ -80,8 +80,7 @@ below. | 14 | ✓ | ✓ | ✓ | 15 | ✓ | ✓ | ✓ -This table is not definitive; I expect more future versions to be made -available, especially for Focal. +This table should be updated periodically; it's a work-in-progress. On Windows and Cygwin, the `version` parameter is ignored.