From 9f044cb547c7566b94e16a5eb425b8682a257751 Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Thu, 15 May 2025 14:39:06 +0200 Subject: [PATCH] CI: Only add LLVM repository if it is missing For our js-benchmarks and libjs-test262 workflow runs, we already know that they're provisioned with these repositories and can skip adding the key and repo altogether. --- .github/actions/setup/action.yml | 6 ++++-- .github/workflows/js-benchmarks.yml | 3 --- .github/workflows/libjs-test262.yml | 3 --- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index d7ed695ab72..3bca1731298 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -33,8 +33,10 @@ runs: sudo add-apt-repository ppa:ubuntu-toolchain-r/test - curl -f -o /usr/share/keyrings/llvm-snapshot.gpg.key https://apt.llvm.org/llvm-snapshot.gpg.key - echo "deb [signed-by=/usr/share/keyrings/llvm-snapshot.gpg.key] http://apt.llvm.org/noble/ llvm-toolchain-noble-20 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list + if [ ! -f /etc/apt/sources.list.d/llvm.list ]; then + curl -f -o /usr/share/keyrings/llvm-snapshot.gpg.key https://apt.llvm.org/llvm-snapshot.gpg.key + echo "deb [signed-by=/usr/share/keyrings/llvm-snapshot.gpg.key] http://apt.llvm.org/noble/ llvm-toolchain-noble-20 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list + fi sudo apt-get update -y sudo apt-get install -y autoconf autoconf-archive automake build-essential ccache cmake curl fonts-liberation2 \ diff --git a/.github/workflows/js-benchmarks.yml b/.github/workflows/js-benchmarks.yml index c73532deb1d..3951562c65f 100644 --- a/.github/workflows/js-benchmarks.yml +++ b/.github/workflows/js-benchmarks.yml @@ -36,9 +36,6 @@ jobs: if: ${{ matrix.os_name == 'Linux' }} shell: bash run: | - curl -f -o /usr/share/keyrings/llvm-snapshot.gpg.key https://apt.llvm.org/llvm-snapshot.gpg.key - echo "deb [signed-by=/usr/share/keyrings/llvm-snapshot.gpg.key] http://apt.llvm.org/noble/ llvm-toolchain-noble-20 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list - sudo apt-get update sudo apt-get install -y clang++-20 python3-venv sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-20 100 diff --git a/.github/workflows/libjs-test262.yml b/.github/workflows/libjs-test262.yml index 989bc3c1534..a91d0703912 100644 --- a/.github/workflows/libjs-test262.yml +++ b/.github/workflows/libjs-test262.yml @@ -50,9 +50,6 @@ jobs: - name: Install dependencies run: | - curl -f -o /usr/share/keyrings/llvm-snapshot.gpg.key https://apt.llvm.org/llvm-snapshot.gpg.key - echo "deb [signed-by=/usr/share/keyrings/llvm-snapshot.gpg.key] http://apt.llvm.org/noble/ llvm-toolchain-noble-20 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list - sudo apt-get update -y sudo apt-get install -y ninja-build unzip clang-20 clang++-20 jq curl zip tar autoconf autoconf-archive automake nasm pkg-config libgl1-mesa-dev rsync