From 398104c2992734a6ac1ae70453427453d632b714 Mon Sep 17 00:00:00 2001 From: "Marco C." <46560192+Marcondiro@users.noreply.github.com> Date: Wed, 9 Apr 2025 15:09:16 +0200 Subject: [PATCH] CI: try to speedup by avoiding unnecessary installs (#3144) * Start removing non-apt deps GH images come with baked-in software that doesn't come from apt, getting the apt version will just slow down CI since the baked in version will be used anyway. * Do not install llvm-X if already there * Do not remove old llvm-X Est-ce qu'ils nous derangent ? * default llvm install is missing stuff * CLang is already baked-in * Set installed clang as default * Move ARM deps to qemu fuzzers --- .github/workflows/build_and_test.yml | 6 +----- .../workflows/qemu-fuzzer-tester-prepare/action.yml | 5 ++++- .github/workflows/ubuntu-prepare/action.yml | 11 ++++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 51d5d11d24..5fe3b7cbd0 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -171,8 +171,6 @@ jobs: runs-on: ubuntu-24.04 needs: ubuntu steps: - - name: Install curl - run: sudo apt-get update && sudo apt-get install clang - uses: dtolnay/rust-toolchain@stable - uses: actions/checkout@v4 - uses: Swatinem/rust-cache@v2 @@ -186,7 +184,7 @@ jobs: runs-on: ubuntu-24.04 steps: - name: Install deps - run: sudo apt-get update && sudo apt-get install -y lsb-release wget software-properties-common gnupg ninja-build python3-dev python3-pip python3-venv libz3-dev + run: sudo apt-get update && sudo apt-get install -y lsb-release wget software-properties-common gnupg libz3-dev - name: Install maturin run: cargo install --locked maturin - uses: actions/checkout@v4 @@ -610,8 +608,6 @@ jobs: android: runs-on: ubuntu-24.04 steps: - - name: Install curl - run: sudo apt-get update && sudo apt-get install clang - uses: dtolnay/rust-toolchain@stable - uses: nttld/setup-ndk@v1 with: diff --git a/.github/workflows/qemu-fuzzer-tester-prepare/action.yml b/.github/workflows/qemu-fuzzer-tester-prepare/action.yml index ea01828d0d..2ffcc9ec67 100644 --- a/.github/workflows/qemu-fuzzer-tester-prepare/action.yml +++ b/.github/workflows/qemu-fuzzer-tester-prepare/action.yml @@ -5,7 +5,10 @@ runs: steps: - name: Install QEMU deps shell: bash - run: apt-get update && apt-get install -y qemu-utils sudo python3-msgpack python3-jinja2 curl python3-dev + run: | + apt-get update + apt-get install -y qemu-utils sudo python3-msgpack python3-jinja2 curl python3-dev gcc-arm-none-eabi \ + gcc-arm-linux-gnueabi g++-arm-linux-gnueabi - uses: dtolnay/rust-toolchain@stable - name: enable mult-thread for `make` shell: bash diff --git a/.github/workflows/ubuntu-prepare/action.yml b/.github/workflows/ubuntu-prepare/action.yml index 9558a84e33..79e76531a6 100644 --- a/.github/workflows/ubuntu-prepare/action.yml +++ b/.github/workflows/ubuntu-prepare/action.yml @@ -5,7 +5,10 @@ runs: steps: - name: Install and cache deps shell: bash - run: sudo apt-get update && sudo apt-get install -y curl lsb-release wget software-properties-common gnupg ninja-build shellcheck pax-utils nasm libsqlite3-dev libc6-dev libgtk-3-dev gcc g++ gcc-arm-none-eabi gcc-arm-linux-gnueabi g++-arm-linux-gnueabi libslirp-dev libz3-dev build-essential + run: | + sudo apt-get update + sudo apt-get install -y curl lsb-release wget software-properties-common gnupg shellcheck pax-utils \ + nasm libsqlite3-dev libc6-dev libgtk-3-dev gcc g++ libslirp-dev libz3-dev build-essential \ - uses: dtolnay/rust-toolchain@stable - name: install just uses: extractions/setup-just@v2 @@ -17,9 +20,6 @@ runs: - name: Add nightly clippy shell: bash run: rustup toolchain install nightly --component clippy --allow-downgrade - - name: Remove existing clang and LLVM - shell: bash - run: sudo apt-get purge -y *llvm* *clang* lld* lldb* opt* - name: Install cargo-hack shell: bash run: curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin @@ -29,12 +29,13 @@ runs: - name: Default to nightly shell: bash run: rustup default nightly - - name: Add LLVM in sources list + - name: Install LLVM shell: bash run: | wget https://apt.llvm.org/llvm.sh chmod +x llvm.sh sudo ./llvm.sh ${{env.MAIN_LLVM_VERSION}} all + sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${{env.MAIN_LLVM_VERSION}} 200 - name: Symlink Headers shell: bash run: sudo ln -s /usr/include/asm-generic /usr/include/asm