-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix-circuits-2
- Loading branch information
Showing
31 changed files
with
532 additions
and
501 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
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 |
---|---|---|
|
@@ -43,7 +43,7 @@ jobs: | |
sudo rm -rf /usr/share/dotnet/ | ||
sudo rm -rf /usr/local/lib/android | ||
df -h | ||
- uses: dtolnay/[email protected].0 | ||
- uses: dtolnay/[email protected].1 | ||
with: | ||
components: clippy | ||
- uses: Swatinem/rust-cache@v2 | ||
|
@@ -102,13 +102,6 @@ jobs: | |
path: bin/cairo-native-run-${{ matrix.branch }} | ||
key: binary-${{ github.event.pull_request[matrix.branch].sha }} | ||
|
||
- name: Cache runtime-library | ||
uses: actions/cache@v3 | ||
id: cache-library | ||
with: | ||
path: lib/libcairo-native-runtime-${{ matrix.branch }}.a | ||
key: library-${{ github.event.pull_request[matrix.branch].sha }} | ||
|
||
- name: check and free hdd space left | ||
if: ${{ steps.cache-binary.outputs.cache-hit != 'true' }} | ||
run: | | ||
|
@@ -131,7 +124,7 @@ jobs: | |
df -h | ||
- name: Install Rust | ||
if: ${{ steps.cache-binary.outputs.cache-hit != 'true' || steps.cache-library.outputs.cache-hit != 'true' }} | ||
uses: dtolnay/[email protected].0 | ||
uses: dtolnay/[email protected].1 | ||
- name: add llvm deb repository | ||
if: ${{ steps.cache-binary.outputs.cache-hit != 'true' || steps.cache-library.outputs.cache-hit != 'true' }} | ||
uses: myci-actions/add-deb-repo@11 | ||
|
@@ -159,7 +152,6 @@ jobs: | |
make build | ||
mkdir lib bin | ||
cp target/release/cairo-native-run bin/cairo-native-run-${{ matrix.branch }} | ||
cp target/release/libcairo_native_runtime.a lib/libcairo-native-runtime-${{ matrix.branch }}.a | ||
run-bench: | ||
env: | ||
|
@@ -190,12 +182,6 @@ jobs: | |
path: bin/cairo-native-run-${{ matrix.branch }} | ||
key: binary-${{ github.event.pull_request[matrix.branch].sha }} | ||
|
||
- name: Fetch ${{ matrix.branch }} runtime-library | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: lib/libcairo-native-runtime-${{ matrix.branch }}.a | ||
key: library-${{ github.event.pull_request[matrix.branch].sha }} | ||
|
||
- name: Run Program | ||
run: | | ||
make deps | ||
|
@@ -208,7 +194,7 @@ jobs: | |
--export-json "${f%.*}.json" \ | ||
--warmup 3 \ | ||
-n "${{matrix.branch}} $(basename $f) (JIT)" "./bin/cairo-native-run-${{ matrix.branch }} --run-mode=jit -s $f --opt-level 3 --available-gas 18446744073709551615" \ | ||
-n "${{matrix.branch}} $(basename $f) (AOT)" "CAIRO_NATIVE_RUNTIME_LIBRARY=lib/libcairo-native-runtime-${{ matrix.branch }}.a ./bin/cairo-native-run-${{ matrix.branch }} --run-mode=aot -s $f --opt-level 3 --available-gas 18446744073709551615" \ | ||
-n "${{matrix.branch}} $(basename $f) (AOT)" "./bin/cairo-native-run-${{ matrix.branch }} --run-mode=aot -s $f --opt-level 3 --available-gas 18446744073709551615" \ | ||
>> /dev/stderr | ||
done | ||
|
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 |
---|---|---|
|
@@ -21,7 +21,7 @@ jobs: | |
TABLEGEN_190_PREFIX: /usr/lib/llvm-19/ | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/[email protected].0 | ||
- uses: dtolnay/[email protected].1 | ||
with: | ||
components: clippy, rustfmt | ||
- uses: Swatinem/rust-cache@v2 | ||
|
@@ -41,7 +41,7 @@ jobs: | |
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/[email protected].0 | ||
- uses: dtolnay/[email protected].1 | ||
with: | ||
components: rustfmt | ||
- run: cargo fmt --all -- --check | ||
|
@@ -134,7 +134,7 @@ jobs: | |
sudo rm -rf /usr/local/lib/android | ||
df -h | ||
- name: Setup rust env | ||
uses: dtolnay/[email protected].0 | ||
uses: dtolnay/[email protected].1 | ||
- name: Retreive cached dependecies | ||
uses: Swatinem/rust-cache@v2 | ||
- name: add llvm deb repository | ||
|
@@ -166,7 +166,7 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Rustup toolchain install | ||
uses: dtolnay/[email protected].0 | ||
uses: dtolnay/[email protected].1 | ||
with: | ||
components: clippy | ||
- name: Rust `$PATH` workaround. | ||
|
@@ -225,7 +225,7 @@ jobs: | |
sudo rm -rf /usr/local/lib/android | ||
df -h | ||
- name: Setup rust env | ||
uses: dtolnay/[email protected].0 | ||
uses: dtolnay/[email protected].1 | ||
- name: Retreive cached dependecies | ||
uses: Swatinem/rust-cache@v2 | ||
- name: add llvm deb repository | ||
|
@@ -246,8 +246,8 @@ jobs: | |
scarb-version: "2.9.2" | ||
- name: Install deps | ||
run: make deps | ||
- name: Build runtime and alexandria | ||
run: make runtime-ci && make check-llvm && make needs-cairo2 && make build-alexandria | ||
- name: Build alexandria | ||
run: make check-llvm && make needs-cairo2 && make build-alexandria | ||
|
||
- name: Run tests and generate coverage partition ${{ matrix.partition }} | ||
run: cargo llvm-cov nextest --verbose --features=scarb --workspace --lcov --output-path ${{ matrix.output }} --partition count:${{ matrix.partition }}/4 | ||
|
@@ -278,7 +278,7 @@ jobs: | |
needs: [coverage] | ||
steps: | ||
- name: Setup rust env | ||
uses: dtolnay/[email protected].0 | ||
uses: dtolnay/[email protected].1 | ||
- name: Retreive cached dependencies | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Install testing tools | ||
|
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 |
---|---|---|
|
@@ -100,7 +100,7 @@ jobs: | |
# Install dependencies | ||
- uses: ./cairo_native/.github/actions/install-linux-deps | ||
- name: Setup rust env | ||
uses: dtolnay/[email protected].0 | ||
uses: dtolnay/[email protected].1 | ||
- name: Retreive cached dependecies | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
|
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 |
---|---|---|
|
@@ -26,7 +26,7 @@ jobs: | |
sudo rm -rf /usr/share/dotnet/ | ||
sudo rm -rf /usr/local/lib/android | ||
- name: Setup rust env | ||
uses: dtolnay/[email protected].0 | ||
uses: dtolnay/[email protected].1 | ||
- name: Retreive cached dependecies | ||
uses: Swatinem/rust-cache@v2 | ||
- name: add llvm deb repository | ||
|
@@ -37,7 +37,5 @@ jobs: | |
keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key | ||
- name: Install LLVM | ||
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 | ||
- name: publish the runtime | ||
run: cargo publish --token ${CRATES_TOKEN} --all-features -p cairo-native-runtime | ||
- name: publish the crate | ||
run: cargo publish --token ${CRATES_TOKEN} --all-features -p cairo-native |
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 |
---|---|---|
|
@@ -7,93 +7,61 @@ permissions: | |
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
- v[0-9]+.* | ||
|
||
jobs: | ||
release-linux: | ||
create-release: | ||
runs-on: ubuntu-24.04 | ||
env: | ||
MLIR_SYS_190_PREFIX: /usr/lib/llvm-19/ | ||
LLVM_SYS_191_PREFIX: /usr/lib/llvm-19/ | ||
TABLEGEN_190_PREFIX: /usr/lib/llvm-19/ | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: free HDD space | ||
run: | | ||
# deleting space | ||
sudo rm -rf /usr/share/dotnet/ | ||
sudo rm -rf /usr/local/lib/android | ||
- name: Setup rust env | ||
uses: dtolnay/[email protected] | ||
- name: Retreive cached dependecies | ||
uses: Swatinem/rust-cache@v2 | ||
- name: add llvm deb repository | ||
uses: myci-actions/add-deb-repo@11 | ||
- uses: taiki-e/create-gh-release-action@v1 | ||
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: Install LLVM | ||
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 | ||
- name: Install deps | ||
run: make deps | ||
- name: build release | ||
run: make build | ||
- name: Compress into a tar file | ||
run: cd target/release && tar -cJvf ../cairo-native-x86_64.tar.xz cairo-native-test \ | ||
cairo-native-compile cairo-native-dump cairo-native-run libcairo_native_runtime.a && cd .. | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: linux-build | ||
path: cairo-native-x86_64.tar.xz | ||
# (Required) GitHub token for creating GitHub Releases. | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
release-macos: | ||
runs-on: macos-14 | ||
env: | ||
CARGO_TERM_COLOR: always | ||
LIBRARY_PATH: /opt/homebrew/lib | ||
MLIR_SYS_190_PREFIX: /opt/homebrew/opt/llvm@19 | ||
LLVM_SYS_191_PREFIX: /opt/homebrew/opt/llvm@19 | ||
TABLEGEN_190_PREFIX: /opt/homebrew/opt/llvm@19 | ||
RUST_LOG: cairo_native=debug,cairo_native_test=debug | ||
upload-assets: | ||
needs: create-release | ||
strategy: | ||
matrix: | ||
include: | ||
- target: x86_64-unknown-linux-gnu | ||
os: ubuntu-24.04 | ||
env: | ||
MLIR_SYS_190_PREFIX: /usr/lib/llvm-19/ | ||
LLVM_SYS_191_PREFIX: /usr/lib/llvm-19/ | ||
TABLEGEN_190_PREFIX: /usr/lib/llvm-19/ | ||
- target: x86_64-apple-darwin | ||
os: macos-14 | ||
env: | ||
MLIR_SYS_190_PREFIX: /opt/homebrew/opt/llvm@19 | ||
LLVM_SYS_191_PREFIX: /opt/homebrew/opt/llvm@19 | ||
TABLEGEN_190_PREFIX: /opt/homebrew/opt/llvm@19 | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Rustup toolchain install | ||
uses: dtolnay/[email protected] | ||
with: | ||
components: clippy | ||
- name: Rust `$PATH` workaround. | ||
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH | ||
- name: Install deps | ||
run: make deps | ||
- name: Build release | ||
run: make build | ||
- name: Compress into a tar file | ||
run: cd target/release && tar -cJvf ../cairo-native-aarch64.tar.xz cairo-native-test \ | ||
cairo-native-compile cairo-native-dump cairo-native-run libcairo_native_runtime.a && cd .. | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: macos-build | ||
path: cairo-native-aarch64.tar.xz | ||
|
||
release: | ||
runs-on: ubuntu-24.04 | ||
needs: [release-macos, release-linux] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Download linux | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: linux-build | ||
- name: Download macos | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: macos-build | ||
- name: Release on GitHub | ||
uses: softprops/action-gh-release@v2 | ||
# deps-ci-linux does nothing on macos so it works | ||
run: make deps && make deps-ci-linux | ||
- uses: taiki-e/upload-rust-binary-action@v1 | ||
with: | ||
files: | | ||
cairo-native-aarch64.tar.xz | ||
cairo-native-x86_64.tar.xz | ||
# (required) Comma-separated list of binary names (non-extension portion of filename) to build and upload. | ||
# Note that glob pattern is not supported yet. | ||
bin: cairo-native-compile,cairo-native-dump,cairo-native-run,cairo-native-stress,cairo-native-test | ||
# (optional) Target triple, default is host triple. | ||
# This is optional but it is recommended that this always be set to | ||
# clarify which target you are building for if macOS is included in | ||
# the matrix because GitHub Actions changed the default architecture | ||
# of macos-latest since macos-14. | ||
target: ${{ matrix.target }} | ||
# (optional) On which platform to distribute the `.tar.gz` file. | ||
# [default value: unix] | ||
# [possible values: all, unix, windows, none] | ||
tar: unix | ||
# (optional) On which platform to distribute the `.zip` file. | ||
# [default value: windows] | ||
# [possible values: all, unix, windows, none] | ||
zip: windows | ||
archive: cairo-native-$target | ||
# (required) GitHub token for uploading assets to GitHub Releases. | ||
token: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
|
@@ -18,7 +18,7 @@ jobs: | |
TABLEGEN_190_PREFIX: /usr/lib/llvm-19/ | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/[email protected].0 | ||
- uses: dtolnay/[email protected].1 | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: add llvm deb repository | ||
uses: myci-actions/add-deb-repo@11 | ||
|
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 |
---|---|---|
|
@@ -32,8 +32,8 @@ jobs: | |
with: | ||
repository: lambdaclass/starknet-replay | ||
path: starknet-replay | ||
ref: 546457d800fd02f080888331aebecc15824bed91 | ||
# We need native to build the runtime | ||
ref: b4b7dbf1bb5313301515882d7e228616f3f70e48 | ||
# We need native to use the linux deps ci action | ||
- name: Checkout Native | ||
uses: actions/checkout@v4 | ||
with: | ||
|
@@ -43,7 +43,7 @@ jobs: | |
with: | ||
repository: lambdaclass/sequencer | ||
path: sequencer | ||
ref: 15d6452d162ad5e3538e673d1e4df5abcff9452f | ||
ref: 9487df3ada00d03bbd9fc39331c4ec1ac0994954 | ||
|
||
- name: Cache RPC Calls | ||
uses: actions/cache@v4 | ||
|
@@ -54,21 +54,14 @@ jobs: | |
# Install dependencies | ||
- uses: ./cairo_native/.github/actions/install-linux-deps | ||
- name: Setup rust env | ||
uses: dtolnay/[email protected].0 | ||
uses: dtolnay/[email protected].1 | ||
- name: Retreive cached dependecies | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
workspaces: | | ||
starknet-replay | ||
cairo_native | ||
- name: Build Cairo Native Runtime Library | ||
shell: bash | ||
run: | | ||
cd ../cairo_native | ||
make runtime | ||
echo "CAIRO_NATIVE_RUNTIME_LIBRARY=$(pwd)/libcairo_native_runtime.a" > $GITHUB_ENV | ||
- name: Patch replay dependencies | ||
run: | | ||
# Updates sequencer dependency to local path | ||
|
Oops, something went wrong.