Skip to content

Commit 7706f1f

Browse files
committed
Base LLVM repo setup on toolset version
1 parent 07491de commit 7706f1f

File tree

2 files changed

+13
-41
lines changed

2 files changed

+13
-41
lines changed

.github/actions/setup-packages/action.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ inputs:
1313
description: Extra package repositories to use
1414
required: false
1515
default: ''
16-
llvm_version:
17-
description: LLVM version to install
16+
toolset:
17+
description: B2 toolset module to target
1818
required: false
1919
default: ''
20-
os:
21-
description: OS to install LLVM packages for
20+
version:
21+
description: B2 toolset module version to target
2222
required: false
2323
default: ''
2424
runs:
@@ -28,7 +28,7 @@ runs:
2828
shell: bash
2929
env:
3030
LLVM_OS: ${{ inputs.os }}
31-
LLVM_VER: ${{ inputs.llvm_version }}
31+
LLVM_VER: ${{ inputs.version }}
3232
PACKAGES: ${{ inputs.install }}
3333
PACKAGES_TO_REMOVE: ${{ inputs.remove }}
3434
run: |
@@ -37,14 +37,14 @@ runs:
3737
echo ">>>>> APT: REPO.."
3838
for i in {1..3}; do sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test" && break || sleep 2; done
3939
40-
if test -n "${LLVM_OS}" ; then
40+
if [ clang = "${{ inputs.toolset }}" ]; then
41+
. /etc/lsb-release
4142
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
42-
if test -n "${LLVM_VER}" ; then
43-
sudo -E apt-add-repository "deb http://apt.llvm.org/${LLVM_OS}/ llvm-toolchain-${LLVM_OS}-${LLVM_VER} main"
44-
else
45-
# Snapshot (i.e. trunk) build of clang
46-
sudo -E apt-add-repository "deb http://apt.llvm.org/${LLVM_OS}/ llvm-toolchain-${LLVM_OS} main"
43+
LLVM_DISTRIB=llvm-toolchain-${DISTRIB_CODENAME}
44+
if test -n "${{ inputs.llvm_version }}" ; then
45+
LLVM_DISTRIB=${LLVM_DISTRIB}-${{ inputs.llvm_version }}
4746
fi
47+
sudo -E apt-add-repository "deb http://apt.llvm.org/${DISTRIB_CODENAME}/ ${LLVM_DISTRIB} main"
4848
fi
4949
echo ">>>>> APT: UPDATE.."
5050
sudo -E apt-get -o Acquire::Retries=3 update

.github/workflows/ci.yml

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ jobs:
4141
os: "ubuntu-18.04"
4242
toolset: "clang"
4343
toolset_version: "6.0"
44-
llvm_os: "bionic"
45-
llvm_ver: "6.0"
4644
comment: "valgrind"
4745
b2_cxxstd: "11,14"
4846
b2_defines: "BOOST_NO_STRESS_TEST=1"
@@ -55,8 +53,6 @@ jobs:
5553
os: "ubuntu-18.04"
5654
toolset: "clang"
5755
toolset_version: "11"
58-
llvm_os: "bionic"
59-
llvm_ver: "11"
6056
comment: "asan"
6157
b2_variant: "debug"
6258
b2_cxxstd: "17"
@@ -68,8 +64,6 @@ jobs:
6864
os: "ubuntu-18.04"
6965
toolset: "clang"
7066
toolset_version: "11"
71-
llvm_os: "xenial"
72-
llvm_ver: "11"
7367
comment: "ubsan"
7468
b2_variant: "debug"
7569
b2_cxxstd: "17"
@@ -168,8 +162,6 @@ jobs:
168162
container: "ubuntu:16.04"
169163
toolset: "clang"
170164
toolset_version: "4.0"
171-
llvm_os: "xenial"
172-
llvm_ver: "4.0"
173165
b2_cxxstd: "11,14"
174166
- name: "B2_TOOLSET=clang-5.0 B2_CXXSTD=11,14 Job 21"
175167
buildtype: "boost"
@@ -178,8 +170,6 @@ jobs:
178170
container: "ubuntu:16.04"
179171
toolset: "clang"
180172
toolset_version: "5.0"
181-
llvm_os: "xenial"
182-
llvm_ver: "5.0"
183173
b2_cxxstd: "11,14"
184174
- name: "B2_TOOLSET=clang-6.0 B2_CXXSTD=14,17 Job 22"
185175
buildtype: "boost"
@@ -188,8 +178,6 @@ jobs:
188178
container: "ubuntu:16.04"
189179
toolset: "clang"
190180
toolset_version: "6.0"
191-
llvm_os: "xenial"
192-
llvm_ver: "6.0"
193181
b2_cxxstd: "14,17"
194182
- name: "B2_TOOLSET=clang-7 B2_CXXSTD=17 Job 23"
195183
buildtype: "boost"
@@ -198,8 +186,6 @@ jobs:
198186
container: "ubuntu:16.04"
199187
toolset: "clang"
200188
toolset_version: "7"
201-
llvm_os: "xenial"
202-
llvm_ver: "7"
203189
b2_cxxstd: "17"
204190
- name: "B2_TOOLSET=clang-8 B2_CXXSTD=17 Job 24"
205191
buildtype: "boost"
@@ -208,8 +194,6 @@ jobs:
208194
container: "ubuntu:16.04"
209195
toolset: "clang"
210196
toolset_version: "8"
211-
llvm_os: "xenial"
212-
llvm_ver: "8"
213197
b2_cxxstd: "17"
214198
- name: "B2_TOOLSET=clang-9 B2_CXXSTD=17,2a Job 25"
215199
buildtype: "boost"
@@ -218,8 +202,6 @@ jobs:
218202
container: "ubuntu:16.04"
219203
toolset: "clang"
220204
toolset_version: "9"
221-
llvm_os: "xenial"
222-
llvm_ver: "9"
223205
b2_cxxstd: "17,2a"
224206
- name: "COMMENT=standalone CXX=clang++-9 Job 26"
225207
buildtype: "standalone"
@@ -228,44 +210,34 @@ jobs:
228210
container: "ubuntu:16.04"
229211
toolset: "clang"
230212
toolset_version: "9"
231-
llvm_os: "xenial"
232-
llvm_ver: "9"
233213
comment: "standalone"
234214
- name: "B2_TOOLSET=clang-10 B2_CXXSTD=17,2a Job 27"
235215
buildtype: "boost"
236216
packages: "clang-10 libstdc++-9-dev"
237217
os: "ubuntu-18.04"
238218
toolset: "clang"
239219
toolset_version: "10"
240-
llvm_os: "xenial"
241-
llvm_ver: "10"
242220
b2_cxxstd: "17,2a"
243221
- name: "COMMENT=standalone CXX=clang++-10 Job 28"
244222
buildtype: "standalone"
245223
packages: "clang-10 libstdc++-9-dev"
246224
os: "ubuntu-18.04"
247225
toolset: "clang"
248226
toolset_version: "10"
249-
llvm_os: "xenial"
250-
llvm_ver: "10"
251227
comment: "standalone"
252228
- name: "B2_TOOLSET=clang-11 B2_CXXSTD=17,2a Job 29"
253229
buildtype: "boost"
254230
packages: "clang-11 libstdc++-9-dev"
255231
os: "ubuntu-18.04"
256232
toolset: "clang"
257233
toolset_version: "11"
258-
llvm_os: "xenial"
259-
llvm_ver: "11"
260234
b2_cxxstd: "17,2a"
261235
- name: "COMMENT=standalone CXX=clang++-11 Job 30"
262236
buildtype: "standalone"
263237
packages: "clang-11 libstdc++-9-dev"
264238
os: "ubuntu-18.04"
265239
toolset: "clang"
266240
toolset_version: "11"
267-
llvm_os: "xenial"
268-
llvm_ver: "11"
269241
comment: "standalone"
270242
- name: "COMMENT=Coverity Scan B2_TOOLSET=clang Job 31"
271243
buildtype: "coverity"
@@ -312,8 +284,8 @@ jobs:
312284
- uses: ./.github/actions/setup-packages
313285
with:
314286
install: ${{ matrix.packages }}
315-
os: ${{ matrix.llvm_os }}
316-
llvm_version: ${{ matrix.llvm_ver }}
287+
toolset: ${{ matrix.toolset }}
288+
llvm_version: ${{ matrix.toolset_version }}
317289

318290
- uses: ./.github/actions/build
319291
with:

0 commit comments

Comments
 (0)