From c4738b33e0bff69053376738fdd7ee1b3d4dc77e Mon Sep 17 00:00:00 2001 From: enitrat Date: Thu, 5 Dec 2024 15:19:56 +0800 Subject: [PATCH] install LLVM in action instead of sh script --- .github/actions/setup_native_deps/action.yml | 6 +++--- .github/workflows/ci.yml | 2 -- .github/workflows/test.yml | 4 ++++ scripts/dependencies.sh | 6 ++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/actions/setup_native_deps/action.yml b/.github/actions/setup_native_deps/action.yml index 01547a8b..3184804c 100644 --- a/.github/actions/setup_native_deps/action.yml +++ b/.github/actions/setup_native_deps/action.yml @@ -19,12 +19,12 @@ runs: /var/cache/apt /var/lib/apt/lists /etc/profile.d/llvm19.sh - key: - ${{ runner.os }}-llvm-19-${{ hashFiles('scripts/dependencies.sh') }} + key: ${{ runner.os }}-llvm-19-${{ hashFiles('.github/actions/setup_native_deps/action.yml') }} - name: Install Cairo Native Runtime Dependencies if: steps.cache-llvm.outputs.cache-hit != 'true' id: set-runtime-deps shell: bash run: | - bash ./scripts/dependencies.sh + sudo apt update && sudo apt upgrade -y && \ + sudo apt install llvm-19 llvm-19-dev llvm-19-runtime clang-19 clang-tools-19 lld-19 libpolly-19-dev libmlir-19-dev mlir-19-tools diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c80fbf6a..d5ba9cf9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,8 +8,6 @@ on: branches: - main -permissions: read-all - jobs: trunk: name: Trunk diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f21aa1e7..ccc15e54 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,6 +22,10 @@ jobs: python-version: 3.x - name: Setup rust and cairo native env uses: ./.github/actions/bootstrap + + - name: Source llvm binaries + run: source /etc/profile.d/llvm19.sh + - name: fetch ef tests run: make setup - name: fetch Kakarot diff --git a/scripts/dependencies.sh b/scripts/dependencies.sh index 40be63f7..5dac7648 100644 --- a/scripts/dependencies.sh +++ b/scripts/dependencies.sh @@ -30,11 +30,9 @@ function setup_llvm_deps() { brew install llvm@19 ;; Linux) - $SUDO bash -c 'curl https://apt.llvm.org/llvm.sh -Lo llvm.sh - bash ./llvm.sh 19 all - rm -f ./llvm.sh - apt update && apt install -y \ + $SUDO bash -c 'apt update && apt-get install -y \ libgmp3-dev \ + llvm-19 \ libmlir-19-dev \ libpolly-19-dev \ libzstd-dev \