Merge branch 'main' into feat/account_get_bytecode #594
Workflow file for this run
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: rust-vm-CI | |
| on: | |
| push: | |
| branches: | |
| - "**" | |
| jobs: | |
| check: | |
| name: Format and Lint | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v3 | |
| with: | |
| submodules: true | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: Set up Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - name: Cargo cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Set up Scarb | |
| uses: software-mansion/setup-scarb@v1 | |
| - name: Set up Cairo (Linux) | |
| if: runner.os == 'Linux' | |
| run: uv sync | |
| - name: Set up Cairo (macOS) | |
| if: runner.os == 'macOS' | |
| run: CFLAGS=-I/opt/homebrew/opt/gmp/include LDFLAGS=-L/opt/homebrew/opt/gmp/lib uv sync | |
| - name: Run fmt check | |
| run: cargo fmt --all -- --check | |
| - name: Run clippy check | |
| run: cargo clippy | |
| - name: Run Cairo fmt check | |
| run: make format-check | |
| test: | |
| name: Run Tests | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v3 | |
| with: | |
| submodules: true | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: Set up Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - name: Install Nextest | |
| uses: taiki-e/install-action@nextest | |
| - name: Set up Scarb | |
| uses: software-mansion/setup-scarb@v1 | |
| - name: Cargo cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Set up Cairo (Linux) | |
| if: runner.os == 'Linux' | |
| run: uv sync | |
| - name: Set up Cairo (macOS) | |
| if: runner.os == 'macOS' | |
| run: CFLAGS=-I/opt/homebrew/opt/gmp/include LDFLAGS=-L/opt/homebrew/opt/gmp/lib uv sync | |
| - name: Build Test Contracts | |
| run: scarb build | |
| - name: Run Nextest Tests | |
| env: | |
| RPC_URL_ETHEREUM_MAINNET: ${{ secrets.RPC_URL_ETHEREUM_MAINNET }} | |
| RPC_URL_ETHEREUM_TESTNET: ${{ secrets.RPC_URL_ETHEREUM_TESTNET }} | |
| RPC_URL_HERODOTUS_INDEXER: ${{ secrets.RPC_URL_HERODOTUS_INDEXER }} | |
| RPC_URL_STARKNET_MAINNET: ${{ secrets.RPC_URL_STARKNET_MAINNET }} | |
| RPC_URL_STARKNET_TESTNET: ${{ secrets.RPC_URL_STARKNET_TESTNET }} | |
| RPC_URL_OPTIMISM_MAINNET: ${{ secrets.RPC_URL_OPTIMISM_MAINNET }} | |
| RPC_URL_OPTIMISM_SEPOLIA: ${{ secrets.RPC_URL_OPTIMISM_SEPOLIA }} | |
| run: cargo nextest run --profile ci |