This repository was archived by the owner on Jan 9, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 320
chore: monorepo #1456
Merged
Merged
chore: monorepo #1456
Changes from all commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
53776a3
chore: import ssj
obatirou 99672e9
chore: move sources to kakarot0/src
obatirou f6d8bfa
chore: add scarb and snforge tool-versions root
obatirou 99901f5
chore: ssj compiled contracts
obatirou 0968c3f
fix trunk issues
obatirou 1966404
ci: fix path ssj
obatirou 4d8450d
ci: trigger respective workflow on filtered paths
obatirou 19cd373
ci: move files to workflows folder
obatirou 06700f6
ci: rename ssj github jobs
obatirou a0c0baa
ci: concurrency by name
obatirou c02b975
ci: cd into ssj
obatirou 4b1083f
ci: supply tool-versions scarb
obatirou 719d29f
ci: typo
obatirou 6a57f76
ci: use ssj tool-versions
obatirou b0ea84b
ci: install python and use tool-versions ssj
obatirou fd4c456
ci: fix path ssj-build
obatirou 98d0701
chore: unified devcontainer
obatirou 7a85931
chore: deployer docker use uv
obatirou a521056
chore: move zellic audit to kakarot0 folder
obatirou 8bb0a86
chore: update devcontainer
obatirou 9915c25
chore: fix dockerfile
obatirou 5d8a9b5
chore: remove unecessary target
obatirou df04d2f
refactor: move cairo1_contracts to root
obatirou f8587fb
chore: update kakarot-ssj blockchain-tests-skip
obatirou a187daf
ci: fix skip file ef-test ssj
obatirou 19f1e08
refactor: rename folder for cairo and cairo_zero
obatirou 2e1970f
update ssj
obatirou f355e8b
chore: fix trunk
obatirou 3d21034
chore: rename audit folder
obatirou 943aa36
ci: rename workflows file and fix sparse-checkout
obatirou 9fd50a7
ci: fix concurrency
obatirou c1b76a7
ci: fix skip file ssj ef-tests
obatirou 45221d3
chore: update ssj
obatirou dd433be
ci: sparse checkout
obatirou 54c4f02
fix: add missing mandatory fields
obatirou fbcc5c5
fix: add missing mandatory fields
obatirou e6a2dd0
fix: add missing mandatory fields
obatirou b48c7ed
chore: merge .env.example
obatirou e0a216f
chore: merge .gitignore
obatirou 20e337e
chore: remove unecessary rust-toolchain
obatirou c0792f5
chore: remove unecessary files ssj
obatirou 8487351
style: trunk fmt
obatirou f412117
fix: npm audit fix
obatirou a71b790
ci: merge trunk workflows
obatirou b371b7e
refactor: move cairo_zero unit tests
obatirou b36e8ca
update SSJ
obatirou 8bfa101
style: trunk fmt
obatirou a27c49d
style: trunk check
obatirou 2840b79
ci: fix ssj release
obatirou 6d46f7f
update ef test skipfile ssj
obatirou 74bb7a7
apply review
obatirou d845a16
fix: ssj script
obatirou 2c8fb60
update ssj skip file
obatirou c68f593
fix ef-tests resources
obatirou 8bdf75b
update ssj
obatirou 630eaa8
update skipfile ssj
obatirou File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
2 changes: 1 addition & 1 deletion
2
.github/workflows/release.yml → .github/workflows/cairo-zero-release.yml
This file contains hidden or 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# trunk-ignore-all(checkov/CKV2_GHA_1) | ||
name: Release | ||
name: cairo-zero-Release | ||
|
||
on: | ||
release: | ||
|
2 changes: 1 addition & 1 deletion
2
.github/workflows/update-rpc.yml → .github/workflows/cairo-zero-update-rpc.yml
This file contains hidden or 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Update Submodule | ||
name: cairo-zero Update Submodule | ||
|
||
on: | ||
release: | ||
|
This file contains hidden or 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,34 @@ | ||
name: Reusable Build Workflow | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
artifact-name: | ||
required: true | ||
type: string | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
ssj-build: | ||
runs-on: ubuntu-latest | ||
env: | ||
CI_COMMIT_MESSAGE: CI Formatting Auto Commit | ||
CI_COMMIT_AUTHOR: ${{ github.event.repository.name }} CI | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Scarb | ||
uses: software-mansion/setup-scarb@v1 | ||
with: | ||
tool-versions: ./cairo/kakarot-ssj/.tool-versions | ||
|
||
- name: Build contracts | ||
run: cd cairo/kakarot-ssj/ && scarb build -p contracts | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ inputs.artifact-name }} | ||
path: cairo/kakarot-ssj/target/dev |
This file contains hidden or 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,84 @@ | ||
name: SSJ-CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- cairo/kakarot-ssj/** | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
concurrency: | ||
group: ssj-${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
ssj-build: | ||
uses: ./.github/workflows/ssj-build.yml | ||
with: | ||
artifact-name: ssj-build | ||
|
||
ssj-tests-unit: | ||
uses: ./.github/workflows/ssj-tests-unit.yml | ||
with: | ||
run-fmt-check: false | ||
|
||
ssj-ef-tests: | ||
uses: ./.github/workflows/ssj-ef-tests.yml | ||
needs: [ssj-build] | ||
with: | ||
artifact-name: ssj-build | ||
|
||
ssj-resources: | ||
runs-on: ubuntu-latest | ||
needs: [ssj-ef-tests] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.10.14 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.10.14 | ||
|
||
- name: Load cached Poetry installation | ||
id: cached-poetry | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.local | ||
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | ||
|
||
- name: Install Poetry | ||
if: steps.cached-poetry.outputs.cache-hit != 'true' | ||
uses: snok/install-poetry@v1 | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
installer-parallel: true | ||
|
||
- run: poetry config installer.modern-installation false | ||
|
||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: make setup | ||
|
||
- name: Load performance artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
path: resources | ||
name: resources | ||
|
||
- name: Check resources evolution | ||
run: | | ||
result=$(GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} make check-resources 2>&1) | ||
echo "$result" >> "$GITHUB_STEP_SUMMARY" |
This file contains hidden or 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,129 @@ | ||
name: SSJ-EF-Tests | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
artifact-name: | ||
required: true | ||
type: string | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
ef-tests: | ||
# trunk-ignore(actionlint/runner-label) | ||
runs-on: ubuntu-latest-16-cores | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Cache cairo-native setup | ||
id: cache-cairo-native | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
cairo/kakarot-ssj/target/ | ||
./libcairo_native_runtime.a | ||
key: | ||
${{ runner.os }}-cairo-native-${{ hashFiles('**/Cargo.lock', | ||
'scripts/setup_cairo_native.sh') }} | ||
|
||
- name: Make setup script executable | ||
run: chmod +x ./cairo/kakarot-ssj/scripts/setup_cairo_native.sh | ||
|
||
- name: Setup Cairo Native | ||
run: | | ||
if [[ "${{ steps.cache-cairo-native.outputs.cache-hit }}" == 'true' ]]; then | ||
sudo ./cairo/kakarot-ssj/scripts/setup_cairo_native.sh -s | ||
else | ||
sudo ./cairo/kakarot-ssj/scripts/setup_cairo_native.sh | ||
fi | ||
|
||
- name: Set Environment Variables | ||
run: | | ||
echo "MLIR_SYS_190_PREFIX=/usr/lib/llvm-19/" >> $GITHUB_ENV | ||
echo "LLVM_SYS_191_PREFIX=/usr/lib/llvm-19/" >> $GITHUB_ENV | ||
echo "TABLEGEN_190_PREFIX=/usr/lib/llvm-19/" >> $GITHUB_ENV | ||
echo "CAIRO_NATIVE_RUNTIME_LIBRARY=$(pwd)/libcairo_native_runtime.a" >> $GITHUB_ENV | ||
|
||
- name: Checkout ef-tests | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: kkrt-labs/ef-tests | ||
ref: feat/cairo-native | ||
path: ef-tests # Check out to a subdirectory to avoid cleaning the kakarot-ssj directory | ||
|
||
- name: Checkout local skip file | ||
uses: actions/checkout@v4 | ||
with: | ||
sparse-checkout: | | ||
cairo/kakarot-ssj/ | ||
sparse-checkout-cone-mode: false | ||
path: skip-file | ||
|
||
- name: Setup ef-tests | ||
run: | | ||
mv skip-file/cairo/kakarot-ssj/blockchain-tests-skip.yml ef-tests/blockchain-tests-skip.yml | ||
cd ef-tests | ||
mkdir -p build/common | ||
make setup setup-kakarot-v0 | ||
|
||
- name: Install nextest | ||
uses: taiki-e/install-action@nextest | ||
|
||
- name: Download Kakarot-SSJ build artifacts in v1 | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ inputs.artifact-name }} | ||
path: ef-tests/build/v1 | ||
|
||
- name: Move Cairo1Helpers | ||
run: | | ||
mv ef-tests/build/v1/contracts_Cairo1Helpers.compiled_contract_class.json \ | ||
ef-tests/build/common/cairo1_helpers.json | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.10.14 | ||
|
||
# Add this step to verify the file exists | ||
- name: Verify libcairo_native_runtime.a | ||
run: | | ||
echo $CAIRO_NATIVE_RUNTIME_LIBRARY | ||
ls -l $CAIRO_NATIVE_RUNTIME_LIBRARY | ||
|
||
- name: Run tests | ||
working-directory: ef-tests | ||
run: | | ||
set -o pipefail | ||
RUST_MIN_STACK=1342177280 make ef-test-v1-native | tee test_v1.out | ||
set +o pipefail | ||
|
||
- name: Retrieve ef-tests execution resources | ||
working-directory: ef-tests | ||
run: python scripts/compute_resources.py | ||
env: | ||
KAKAROT_VERSION: v1 | ||
|
||
- name: Upload resources | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: ef-tests/resources | ||
name: resources | ||
|
||
- name: Generate blockchain-tests-skip.yml file | ||
if: github.event_name == 'workflow_dispatch' | ||
working-directory: ef-tests | ||
run: make generate-skip-file | ||
|
||
- name: Upload skip file | ||
if: github.event_name == 'workflow_dispatch' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: ef-tests/blockchain-tests-skip.yml | ||
name: blockchain-tests-skip |
This file contains hidden or 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,30 @@ | ||
# trunk-ignore-all(checkov/CKV2_GHA_1) | ||
name: SSJ-Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build-and-upload: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Set up Scarb | ||
uses: software-mansion/setup-scarb@v1 | ||
with: | ||
tool-versions: ./cairo/kakarot-ssj/.tool-versions | ||
- name: Build contracts | ||
run: | | ||
cd cairo/kakarot-ssj && scarb build -p contracts | ||
- name: Zip dev artifacts | ||
run: zip -rj kakarot-ssj-build.zip cairo/kakarot-ssj/target/dev | ||
- name: Upload artifacts to release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: kakarot-ssj-build.zip | ||
asset_name: kakarot-ssj-build.zip | ||
tag: ${{ github.ref_name }} | ||
overwrite: true |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.