Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/blockifier_compiled_cairo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ jobs:
id: setup-pypy
with:
python-version: 'pypy3.9'
cache: 'pip'
- run: ln -s '${{ steps.setup-pypy.outputs.python-path }}' /usr/local/bin/pypy3.9
- env:
LD_LIBRARY_PATH: ${{ env.Python3_ROOT_DIR }}/bin
run: echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV
- run: pip install -r scripts/requirements.txt

# Checkout sequencer into a dedicated directory - technical requirement in order to be able to checkout `cairo` in a sibling directory.
- name: checkout sequencer into `sequencer` directory.
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/blockifier_post-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
id: setup-pypy
with:
python-version: 'pypy3.9'
cache: 'pip'
- run: ln -s '${{ steps.setup-pypy.outputs.python-path }}' /usr/local/bin/pypy3.9
- env:
LD_LIBRARY_PATH: ${{ env.Python3_ROOT_DIR }}/bin
Expand Down
32 changes: 13 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,19 @@ jobs:
id: setup-pypy
with:
python-version: "pypy3.9"
cache: 'pip'
- run: ln -s '${{ steps.setup-pypy.outputs.python-path }}' /usr/local/bin/pypy3.9
- env:
LD_LIBRARY_PATH: ${{ steps.setup-pypy.outputs.pythonLocation }}/bin
run: echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV
- run: pip install -r scripts/requirements.txt

# Install rust components.
- uses: ./.github/actions/bootstrap
with:
extra_rust_toolchains: ${{ env.EXTRA_RUST_TOOLCHAINS }}
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Python venv
run: |
python3 -m venv ci
ci/bin/pip install -r scripts/requirements.txt

# Check Cargo.lock is up to date.
- name: "Check Cargo.lock"
run: |
Expand All @@ -77,13 +74,13 @@ jobs:
# Run code style on PR.
- name: "Run TODO style pull request"
if: github.event_name == 'pull_request'
run: ci/bin/python scripts/named_todos.py --commit_id ${{ github.event.pull_request.base.sha }}
run: scripts/named_todos.py --commit_id ${{ github.event.pull_request.base.sha }}
- name: "Run clippy pull request"
if: github.event_name == 'pull_request'
run: ci/bin/python scripts/run_tests.py --command clippy --changes_only --commit_id ${{ github.event.pull_request.base.sha }}
run: scripts/run_tests.py --command clippy --changes_only --commit_id ${{ github.event.pull_request.base.sha }}
- name: "Run cargo doc pull request"
if: github.event_name == 'pull_request'
run: ci/bin/python scripts/run_tests.py --command doc --changes_only --commit_id ${{ github.event.pull_request.base.sha }}
run: scripts/run_tests.py --command doc --changes_only --commit_id ${{ github.event.pull_request.base.sha }}

# Run code style on push.
- name: "Run rustfmt"
Expand All @@ -93,10 +90,10 @@ jobs:

- name: "Run clippy on push"
if: github.event_name == 'push'
run: ci/bin/python scripts/run_tests.py --command clippy
run: scripts/run_tests.py --command clippy
- name: "Run cargo doc on push"
if: github.event_name == 'push'
run: ci/bin/python scripts/run_tests.py --command doc
run: scripts/run_tests.py --command doc

- name: "Run taplo"
run: scripts/taplo.sh
Expand Down Expand Up @@ -128,42 +125,39 @@ jobs:
id: setup-pypy
with:
python-version: "pypy3.9"
cache: 'pip'
- run: ln -s '${{ steps.setup-pypy.outputs.python-path }}' /usr/local/bin/pypy3.9
- env:
LD_LIBRARY_PATH: ${{ env.Python3_ROOT_DIR }}/bin
run: echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV
- run: pip install -r scripts/requirements.txt

# TODO(Gilad): only one test needs this (base_layer_test.rs), once it migrates to
# anvil, remove.
- run: npm install -g ganache@7.4.3

- name: "Run tests pull request"
if: github.event_name == 'pull_request'
run: |
python3 -m venv ci
ci/bin/pip install -r scripts/requirements.txt
ci/bin/python scripts/run_tests.py --command test --changes_only --include_dependencies --commit_id ${{ github.event.pull_request.base.sha }}
scripts/run_tests.py --command test --changes_only --include_dependencies --commit_id ${{ github.event.pull_request.base.sha }}
env:
SEED: 0

- name: "Run integration tests pull request"
if: github.event_name == 'pull_request'
# TODO(Tsabary): Find a better way to set the ephemeral port range.
run: |
python3 -m venv ci
ci/bin/pip install -r scripts/requirements.txt
echo "net.ipv4.ip_local_port_range = 40000 40200" | sudo tee /etc/sysctl.conf
sudo sysctl -p
ci/bin/python scripts/run_tests.py --command integration --changes_only --include_dependencies --commit_id ${{ github.event.pull_request.base.sha }}
scripts/run_tests.py --command integration --changes_only --include_dependencies --commit_id ${{ github.event.pull_request.base.sha }}
env:
SEED: 0

- name: "Run tests on push"
if: github.event_name == 'push'
# TODO(AdiY/Dori): Better support for running tests on push.
run: |
python3 -m venv ci
ci/bin/pip install -r scripts/requirements.txt
ci/bin/python scripts/run_tests.py --command test
scripts/run_tests.py --command test
env:
SEED: 0

14 changes: 5 additions & 9 deletions .github/workflows/main_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,21 @@ jobs:
id: setup-pypy
with:
python-version: "pypy3.9"
cache: 'pip'
- run: ln -s '${{ steps.setup-pypy.outputs.python-path }}' /usr/local/bin/pypy3.9
- env:
LD_LIBRARY_PATH: ${{ steps.setup-pypy.outputs.pythonLocation }}/bin
run: echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV
- run: pip install -r scripts/requirements.txt

# Install rust components.
- uses: ./.github/actions/bootstrap
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Python venv
run: |
python3 -m venv ci
ci/bin/pip install -r scripts/requirements.txt

# Run feature combo test.
- name: "Run feature combo on all crates."
run: ci/bin/python scripts/run_feature_combos_test.py
run: scripts/run_feature_combos_test.py

run-integration-tests:
runs-on: starkware-ubuntu-24.04-large
Expand All @@ -75,14 +72,13 @@ jobs:
- env:
LD_LIBRARY_PATH: ${{ env.Python3_ROOT_DIR }}/bin
run: echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV
- run: pip install -r scripts/requirements.txt
# TODO(Gilad): only one test needs this (base_layer_test.rs), once it migrates to
# anvil, remove.
- run: npm install -g ganache@7.4.3

- name: "Run integration tests pull request"
run: |
python3 -m venv ci
ci/bin/pip install -r scripts/requirements.txt
ci/bin/python scripts/run_tests.py --command integration --is_nightly
scripts/run_tests.py --command integration --is_nightly
env:
SEED: 0
1 change: 1 addition & 0 deletions .github/workflows/merge_paths_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: 'pip'
- run: |
python -m pip install --upgrade pip
pip install pytest
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/merge_queue_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,27 @@ jobs:
id: setup-pypy
with:
python-version: "pypy3.9"
cache: 'pip'
- run: ln -s '${{ steps.setup-pypy.outputs.python-path }}' /usr/local/bin/pypy3.9
- env:
LD_LIBRARY_PATH: ${{ steps.setup-pypy.outputs.pythonLocation }}/bin
run: echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV
- run: pip install -r scripts/requirements.txt

# Install rust components.
- uses: ./.github/actions/bootstrap
with:
extra_rust_toolchains: ${{ env.EXTRA_RUST_TOOLCHAINS }}
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Python venv
run: |
python3 -m venv ci
ci/bin/pip install -r scripts/requirements.txt

# Check Cargo.lock is up to date.
- name: "Check Cargo.lock"
run: |
cargo update -w --locked
git diff --exit-code Cargo.lock

- name: "Run clippy on merge queue"
run: ci/bin/python scripts/run_tests.py --command clippy
run: scripts/run_tests.py --command clippy

- name: "Run rustfmt on merge queue"
# The nightly here is coupled with the one in install_rust/action.yml.
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ CLI_TARGET/
*.pdb

*.egg-info
build
/build
dist
target
*/.vscode/*
*.DS_Store
tmp_venv/*
sequencer_venv/*
.vscode/settings.json
/data
/logs
Expand All @@ -30,6 +31,9 @@ __pycache__/
.idea/
**/.venv

# Native blockifier artifacts.
/crates/native_blockifier/build

# Python artifacts.
scripts/__pycache__
monitoring_venv/
Expand Down
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion crates/apollo_infra_utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license-file.workspace = true
description = "Infrastructure utility."

[features]
testing = ["cached", "colored", "dep:assert-json-diff", "socket2", "toml"]
testing = ["cached", "colored", "dep:assert-json-diff", "socket2", "tempfile", "toml"]

[lints]
workspace = true
Expand All @@ -20,16 +20,21 @@ num_enum.workspace = true
serde = { workspace = true, features = ["derive"] }
serde_json.workspace = true
socket2 = { workspace = true, optional = true }
tempfile = { workspace = true, optional = true }
thiserror.workspace = true
tokio = { workspace = true, features = ["process", "rt", "time"] }
toml = { workspace = true, optional = true }
tracing.workspace = true

[dev-dependencies]
assert-json-diff.workspace = true
cached.workspace = true
colored.workspace = true
nix.workspace = true
pretty_assertions.workspace = true
rstest.workspace = true
socket2.workspace = true
tempfile.workspace = true
tokio = { workspace = true, features = ["macros", "rt", "signal", "sync"] }
toml.workspace = true
tracing-subscriber = { workspace = true, features = ["env-filter"] }
Loading