Skip to content

Commit

Permalink
install LLVM in action instead of sh script
Browse files Browse the repository at this point in the history
  • Loading branch information
enitrat committed Dec 5, 2024
1 parent 87e029d commit da03d41
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
17 changes: 13 additions & 4 deletions .github/actions/setup_native_deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,18 @@ runs:
key:
${{ runner.os }}-llvm-19-${{ hashFiles('scripts/dependencies.sh') }}

- name: Install Cairo Native Runtime Dependencies
- name: Add LLVM Debian repository
if: steps.cache-llvm.outputs.cache-hit != 'true'
uses: myci-actions/add-deb-repo@11
with:
repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main
repo-name: llvm-repo
keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key
- name: Update and upgrade APT
if: steps.cache-llvm.outputs.cache-hit != 'true'
shell: bash
run: sudo apt-get update && sudo apt-get upgrade -y
- name: Install LLVM
if: steps.cache-llvm.outputs.cache-hit != 'true'
id: set-runtime-deps
shell: bash
run: |
bash ./scripts/dependencies.sh
run: sudo apt-get 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
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ on:
branches:
- main

permissions: read-all

jobs:
trunk:
name: Trunk
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions scripts/dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit da03d41

Please sign in to comment.