Skip to content

Commit b3affb2

Browse files
authored
ci: more secure llvm19 install process (#1246)
1 parent 428e0f2 commit b3affb2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/ci.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
- { arch: 'amd64', concurrency: 4, os: ubuntu-24.04, package: clang-16, cpp: clang++, version: 16, cmake-flags: '-DDPP_CORO=ON', cpack: 'no', ctest: 'no', mold: 'yes' }
5252
- { arch: 'amd64', concurrency: 4, os: ubuntu-24.04, package: clang-17, cpp: clang++, version: 17, cmake-flags: '-DDPP_CORO=ON', cpack: 'no', ctest: 'no', mold: 'yes' }
5353
- { arch: 'amd64', concurrency: 4, os: ubuntu-24.04, package: clang-18, cpp: clang++, version: 18, cmake-flags: '-DDPP_CORO=ON', cpack: 'no', ctest: 'no', mold: 'yes' }
54-
- { arch: 'amd64', concurrency: 4, os: ubuntu-24.04, package: '', cpp: clang++, version: 19, cmake-flags: '-DDPP_CORO=ON -DCMAKE_CXX_FLAGS="-stdlib=libc++" -DCMAKE_EXE_LINKER_FLAGS="-stdlib=libc++"', cpack: 'no', ctest: 'no', mold: 'yes', llvm-install: '19.1.0', name-extra: " libc++" }
54+
- { arch: 'amd64', concurrency: 4, os: ubuntu-24.04, package: 'clang-19 libc++-19-dev libc++abi-19-dev', cpp: clang++, version: 19, cmake-flags: '-DDPP_CORO=ON -DCMAKE_CXX_FLAGS="-stdlib=libc++" -DCMAKE_EXE_LINKER_FLAGS="-stdlib=libc++"', cpack: 'no', ctest: 'no', mold: 'yes', name-extra: ' libc++', llvm-apt: 'yes' }
5555
# g++
5656
- { arch: 'amd64', concurrency: 4, os: ubuntu-24.04, package: g++-13, cpp: g++, version: 13, cmake-flags: '-DDPP_CORO=ON', cpack: 'no', ctest: 'no', mold: 'yes' }
5757
- { arch: 'amd64', concurrency: 4, os: ubuntu-24.04, package: g++-14, cpp: g++, version: 14, cmake-flags: '-DDPP_CORO=ON', cpack: 'no', ctest: 'no', mold: 'yes' }
@@ -76,12 +76,12 @@ jobs:
7676
if: ${{ matrix.cfg.mold == 'yes' }}
7777
uses: rui314/setup-mold@0bf4f07ef9048ec62a45f9dbf2f098afa49695f0 # v1
7878

79-
- name: Install LLVM
80-
if: ${{ matrix.cfg.llvm-install != '' }}
79+
- name: Add LLVM apt repository
80+
if: ${{ matrix.cfg.llvm-apt }}
8181
run: |
82-
wget https://apt.llvm.org/llvm.sh
83-
chmod +x llvm.sh
84-
sudo ./llvm.sh ${{ matrix.cfg.version }} all
82+
osname=`cat /etc/os-release | grep -e "^VERSION_CODENAME" | cut -d= -f2`
83+
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
84+
sudo apt-add-repository -y "deb http://apt.llvm.org/$osname/ llvm-toolchain-$osname-${{ matrix.cfg.version }} main"
8585
8686
- name: Install apt packages
8787
run: sudo sed -i 's/azure\.//' /etc/apt/sources.list && sudo apt update && sudo apt-get install -y ${{ matrix.cfg.package }} pkg-config libsodium-dev libopus-dev zlib1g-dev rpm

0 commit comments

Comments
 (0)