-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
70 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: "Setup Cairo Native Dependencies" | ||
description: "Sets up LLVM and GMP libraries" | ||
|
||
outputs: | ||
cairo-native-runtime-library: | ||
description: "The path to the cairo native runtime library" | ||
value: ${{ steps.set-env-vars.outputs.cairo-native-runtime-library }} | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Add llvm deb repository | ||
uses: myci-actions/add-deb-repo@11 | ||
with: | ||
repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main | ||
repo-name: llvm-repo | ||
keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key | ||
- name: Install LLVM and gmplib | ||
shell: bash | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install llvm-18 llvm-18-dev llvm-18-runtime clang-18 clang-tools-18 lld-18 libpolly-18-dev libmlir-18-dev mlir-18-tools | ||
sudo apt-get install -y libgmp3-dev | ||
- name: Fetch Cairo Native Repository | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: "lambdaclass/cairo_native" | ||
ref: "cairo-lang2.7.0-rc.3" | ||
path: "cairo_native" | ||
- name: Install Cairo Native Runtime Dependencies | ||
id: set-env-vars | ||
shell: bash | ||
run: | | ||
cd ./cairo_native && | ||
echo "cairo-native-runtime-library=$(pwd)/target/release/libcairo_native_runtime.a" >> $GITHUB_OUTPUT && | ||
echo "CAIRO_NATIVE_RUNTIME_LIBRARY=$(pwd)/target/release/libcairo_native_runtime.a" >> $GITHUB_ENV && | ||
echo "MLIR_SYS_180_PREFIX=/usr/lib/llvm-18/" >> $GITHUB_ENV && | ||
echo "LLVM_SYS_181_PREFIX=/usr/lib/llvm-18/" >> $GITHUB_ENV && | ||
echo "TABLEGEN_180_PREFIX=/usr/lib/llvm-18/" >> $GITHUB_ENV && | ||
cd ./runtime && | ||
cargo build --release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters