From 9c5b8eae09cde0960989096dc773be9b04d68df3 Mon Sep 17 00:00:00 2001 From: enitrat Date: Thu, 5 Dec 2024 15:04:04 +0800 Subject: [PATCH] make llvm deps in path --- .github/actions/setup_native_deps/action.yml | 1 + .github/workflows/trunk-check.yml | 4 +++- scripts/dependencies.sh | 5 +++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup_native_deps/action.yml b/.github/actions/setup_native_deps/action.yml index cdb5a3ea..01547a8b 100644 --- a/.github/actions/setup_native_deps/action.yml +++ b/.github/actions/setup_native_deps/action.yml @@ -18,6 +18,7 @@ runs: /usr/include/llvm-19 /var/cache/apt /var/lib/apt/lists + /etc/profile.d/llvm19.sh key: ${{ runner.os }}-llvm-19-${{ hashFiles('scripts/dependencies.sh') }} diff --git a/.github/workflows/trunk-check.yml b/.github/workflows/trunk-check.yml index a907708f..6481f605 100644 --- a/.github/workflows/trunk-check.yml +++ b/.github/workflows/trunk-check.yml @@ -19,7 +19,9 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + - name: Setup rust and cairo native env uses: ./.github/actions/bootstrap + - name: Trunk Check - uses: trunk-io/trunk-action@v1 + uses: trunk-io/trunk-action@v1.1.19 diff --git a/scripts/dependencies.sh b/scripts/dependencies.sh index ad5cb2ce..40be63f7 100644 --- a/scripts/dependencies.sh +++ b/scripts/dependencies.sh @@ -40,6 +40,11 @@ function setup_llvm_deps() { libzstd-dev \ mlir-19-tools ' + # Add LLVM to PATH by creating a file in profile.d + echo 'export PATH=/usr/lib/llvm-19/bin:$PATH' | $SUDO tee /etc/profile.d/llvm19.sh + $SUDO chmod +x /etc/profile.d/llvm19.sh + # Source the file immediately + source /etc/profile.d/llvm19.sh ;; *) echo "Error: Unsupported operating system"