starknet_committer,starknet_committer_and_os_cli,starknet_patricia: make fetch_nodes layout dependent #89718
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
| name: Main-CI-Flow | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - main-v[0-9].** | |
| tags: | |
| - v[0-9].** | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| - edited | |
| env: | |
| CI: 1 | |
| RUSTFLAGS: "-D warnings" | |
| RUSTDOCFLAGS: "-D warnings" | |
| EXTRA_RUST_TOOLCHAINS: nightly-2024-04-29 | |
| # On PR events, cancel existing CI runs on this same PR for this workflow. | |
| # Also, create different concurrency groups for different pushed commits, on push events. | |
| concurrency: | |
| group: > | |
| ${{ github.workflow }}- | |
| ${{ github.ref }}- | |
| ${{ github.event_name == 'pull_request' && 'PR' || github.sha }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| code_style: | |
| runs-on: namespace-profile-medium-ubuntu-24-04-amd64 | |
| steps: | |
| # Environment setup. | |
| - uses: actions/checkout@v4 | |
| with: | |
| # Fetch the entire history. Required to checkout the merge target commit, so the diff can | |
| # be computed. | |
| fetch-depth: 0 | |
| # Install rust components + lld. | |
| - uses: ./.github/actions/bootstrap | |
| with: | |
| extra_rust_toolchains: ${{ env.EXTRA_RUST_TOOLCHAINS }} | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| # Setup pypy and link to the location expected by .cargo/config.toml. | |
| - uses: actions/setup-python@v5 | |
| 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 | |
| # Check Cargo.lock is up to date. | |
| - name: "Check Cargo.lock" | |
| run: | | |
| cargo update -w --locked | |
| git diff --exit-code Cargo.lock | |
| # Run code style on PR. | |
| - name: "Run TODO style pull request" | |
| if: github.event_name == 'pull_request' | |
| 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: 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: scripts/run_tests.py --command doc --changes_only --commit_id ${{ github.event.pull_request.base.sha }} | |
| - name: "Run python code style pull request" | |
| if: github.event_name == 'pull_request' | |
| run: scripts/py_code_style.py | |
| # Run code style on push. | |
| - name: "Run rustfmt" | |
| # The nightly here is coupled with the one in install_rust/action.yml. | |
| # If we move the install here we can use a const. | |
| run: cargo +"$EXTRA_RUST_TOOLCHAINS" fmt --all -- --check | |
| - name: "Run clippy on push" | |
| if: github.event_name == 'push' | |
| run: scripts/run_tests.py --command clippy | |
| - name: "Run cargo doc on push" | |
| if: github.event_name == 'push' | |
| run: scripts/run_tests.py --command doc | |
| - name: "Run taplo" | |
| run: scripts/taplo.sh | |
| - name: Run Machete (detect unused dependencies) | |
| run: cargo machete | |
| run-workspace-tests: | |
| runs-on: namespace-profile-medium-ubuntu-24-04-amd64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/bootstrap | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| - run: cargo test -p workspace_tests | |
| run-tests: | |
| runs-on: namespace-profile-xlarge-ubuntu-24-04-amd64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| # Fetch the entire history. | |
| fetch-depth: 0 | |
| - uses: ./.github/actions/bootstrap | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| # Setup pypy and link to the location expected by .cargo/config.toml. | |
| - uses: actions/setup-python@v5 | |
| 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 | |
| - name: "Run tests pull request" | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| scripts/run_tests.py --command test --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: | | |
| scripts/run_tests.py --command test | |
| env: | |
| SEED: 0 | |
| run-integration-tests: | |
| runs-on: namespace-profile-large-ubuntu-24-04-amd64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| # Fetch the entire history. | |
| fetch-depth: 0 | |
| - uses: ./.github/actions/bootstrap | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| # Setup pypy and link to the location expected by .cargo/config.toml. | |
| - uses: actions/setup-python@v5 | |
| 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 | |
| - name: "Run integration tests pull request" | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| scripts/run_tests.py --command integration --changes_only --include_dependencies --commit_id ${{ github.event.pull_request.base.sha }} | |
| env: | |
| SEED: 0 |