Skip to content

Commit e2b0fae

Browse files
Update CI
Signed-off-by: FedericoBruzzone <federico.bruzzone.i@gmail.com>
1 parent 4165d85 commit e2b0fae

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

.github/workflows/ubuntu-x86.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,22 @@ jobs:
2424
CC: ${{ matrix.compiler.CC }}
2525
CXX: ${{ matrix.compiler.CXX }}
2626
run: |
27-
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/llvm-keyring.gpg
27+
sudo apt-get update -y
28+
sudo apt-get install -y --no-install-recommends ca-certificates wget python3-pip python3-setuptools
2829
29-
echo "deb [signed-by=/usr/share/keyrings/llvm-keyring.gpg] http://apt.llvm.org/jammy/ llvm-toolchain-jammy-21 main" | sudo tee /etc/apt/sources.list.d/llvm.list
30+
# Install LLVM using the official apt.llvm.org installer script
31+
wget -q https://apt.llvm.org/llvm.sh
32+
chmod +x llvm.sh
33+
sudo ./llvm.sh 21
3034
31-
sudo apt-get update
32-
sudo apt-get install -y --fix-missing \
33-
llvm-21 \
34-
llvm-21-dev \
35-
llvm-21-tools \
36-
clang-21 \
37-
python3-setuptools
35+
# apt.llvm.org is snapshot-based; packages referenced by the current index can rotate and 404.
36+
# Mitigation: retries + refresh indexes and retry the install once.
37+
if ! sudo apt-get -o Acquire::Retries=5 install -y --no-install-recommends llvm-21 llvm-21-dev llvm-21-tools clang-21; then
38+
sudo apt-get update -y
39+
sudo apt-get -o Acquire::Retries=5 install -y --no-install-recommends llvm-21 llvm-21-dev llvm-21-tools clang-21
40+
fi
3841
39-
sudo pip3 install lit
42+
sudo pip3 install --no-cache-dir lit
4043
- name: Build `llvm-pass-template`
4144
run: |
4245
cd $GITHUB_WORKSPACE

0 commit comments

Comments
 (0)