Skip to content

Commit

Permalink
Feat/add abigen (#658)
Browse files Browse the repository at this point in the history
* feat: add abigen

* fix: fix ci

* fix: fix CI

* fix: fix ca

* fix: fix CI

* fix: fix PR comment
  • Loading branch information
Eikix authored Nov 23, 2023
1 parent 8034632 commit 0d54715
Show file tree
Hide file tree
Showing 37 changed files with 320 additions and 674 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
# Python Setup and dependencies installation
- uses: actions/setup-python@v4
with:
python-version: '3.9.13'
python-version: "3.9.13"
- name: Load cached Poetry installation
id: cached-poetry
uses: actions/cache@v3
Expand All @@ -78,8 +78,7 @@ jobs:
uses: actions/cache@v3
with:
path: .venv
key:
venv-${{ runner.os }}-${{ hashFiles('./lib/kakarot/poetry.lock') }}
key: venv-${{ runner.os }}-${{ hashFiles('./lib/kakarot/poetry.lock') }}

# benchmark rpc
- name: install benchmark projects
Expand All @@ -95,9 +94,9 @@ jobs:
- name: Compare result
uses: benchmark-action/github-action-benchmark@v1
with:
tool: 'customBiggerIsBetter'
tool: "customBiggerIsBetter"
output-file-path: ./benchmarking/reports/metrics.json
alert-threshold: '120%'
alert-threshold: "120%"
github-token: ${{ secrets.GITHUB_TOKEN }}
fail-on-alert: true
summary-always: ${{ github.ref == 'refs/heads/main' }}
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/kakarot_rpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
outputs:
type=image,name=${{ env.REGISTRY_IMAGE
outputs: type=image,name=${{ env.REGISTRY_IMAGE
}},name-canonical=true,push=true

- name: Export digest
Expand Down
54 changes: 0 additions & 54 deletions .github/workflows/linters.yml

This file was deleted.

13 changes: 4 additions & 9 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,15 @@ name: Workflow - Pull Request

on: [pull_request]

jobs:
dump:
name: Dump katana state
uses: ./.github/workflows/dump.yml
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
spell_check:
name: Spell check
uses: ./.github/workflows/spell_check.yml

linters:
name: Linters
uses: ./.github/workflows/linters.yml

tests:
name: Rust tests
uses: ./.github/workflows/test.yml
needs: dump
8 changes: 4 additions & 4 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ on:
push:
branches: [main]

jobs:
dump:
name: Dump katana state
uses: ./.github/workflows/dump.yml
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
spell_check:
name: Spell check
uses: ./.github/workflows/spell_check.yml
Expand Down
44 changes: 40 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
components: llvm-tools-preview
components: llvm-tools-preview, rustfmt, clippy
override: true
toolchain: 1.73.0
- name: Retrieve cached dependencies
uses: Swatinem/rust-cache@v2
- name: Setup coverage env
uses: taiki-e/install-action@cargo-llvm-cov
# nextest setup
- uses: taiki-e/install-action@cargo-llvm-cov
- uses: taiki-e/install-action@nextest
# Load lib submodules
- name: Load submodules
Expand All @@ -30,11 +29,48 @@ jobs:
with:
path: ./lib/
key: ${{ runner.os }}-submodules
# Install Foundry
- name: install foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
# Install Python
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Load cached Poetry installation
id: cached-poetry
uses: actions/cache@v3
with:
path: ~/.local
key: poetry-${{ runner.os }}
- 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
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Setup the Kakarot submodule
run: make setup
# Lint
- name: Lint
run: |
cargo check &&
cargo fmt --all -- --check &&
cargo clippy --workspace --all-features --all-targets -- -D warnings
# Create dump
- name: Create dump
run: make build-kakarot && make dump-katana
run: ./scripts/make_with_env.sh && make dump-katana
- name: Generate code coverage
run: ./scripts/make_with_env.sh test-coverage
run: make test-coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ broadcast

# ignore genesis.json
.hive

artifacts/
10 changes: 2 additions & 8 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
[submodule "kakarot"]
path = lib/kakarot
url = https://github.com/kkrt-labs/kakarot.git
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "lib/madara"]
path = lib/madara
url = https://github.com/keep-starknet-strange/madara
path = lib/kakarot
url = https://github.com/kkrt-labs/kakarot.git
Loading

0 comments on commit 0d54715

Please sign in to comment.