miden-debug 0.7.0

An interactive debugger for Miden VM programs
Documentation
name: CI

on:
  push:
    branches:
      - next
    paths-ignore:
      - "**.md"
      - "**.txt"
  pull_request:
    paths-ignore:
      - "**.md"
      - "**.txt"

env:
  # Set the new value when the cache grows too much and we hit the runner's disk space limit
  # via https://github.com/rust-lang/docs.rs/pull/2433
  RUST_CACHE_KEY: rust-cache-20251006

permissions:
  contents: read

jobs:
  lint:
    name: lint
    runs-on: ubuntu-latest
    steps:
      - &checkout
        uses: actions/checkout@v5
        with:
          fetch-depth: 0
          persist-credentials: false
      - &install-rust
        name: Install Rust
        run: |
          rustup update --no-self-update
          rustc --version
      - &cache-rust
        name: Cache Cargo
        uses: Swatinem/rust-cache@v2
        with:
          # Use a common cache for the basic compilation/formatter/clippy checks
          shared-key: ${{ github.workflow }}-shared
          prefix-key: ${{ env.RUST_CACHE_KEY }}
          save-if: ${{ github.ref == 'refs/heads/next' }}
      - &install-cargo-make
        name: Install cargo-make
        run: |
          if ! cargo make --version 2>/dev/null; then
            cargo install cargo-make --force
          fi
      - name: Clippy
        run: |
          cargo make clippy

  check_format:
    name: check formatting
    runs-on: ubuntu-latest
    # Run this job after the linter, so the cache is hot
    needs: [lint]
    # But run this check even if the lint check failed
    if: ${{ always() }}
    steps:
      - *checkout
      - *install-rust
      - name: Cache Cargo
        uses: Swatinem/rust-cache@v2
        with:
          # Use a common cache for the basic compilation/formatter/clippy checks
          shared-key: ${{ github.workflow }}-shared
          prefix-key: ${{ env.RUST_CACHE_KEY }}
          # But do not save this cache, just use it
          save-if: false
      - *install-cargo-make
      - name: Check Formatting
        run: |
          cargo make check-format

  unit_tests:
    name: unit tests
    runs-on: ubuntu-latest
    steps:
      - *checkout
      - *install-rust
      - name: Cache Cargo
        uses: Swatinem/rust-cache@v2
        with:
          # NOTE: We use a different cache for the tests, so they can be run in parallel, but we
          # also share the cache for the tests for efficiency
          shared-key: ${{ github.workflow }}-shared-tests
          prefix-key: ${{ env.RUST_CACHE_KEY }}
          save-if: ${{ github.ref == 'refs/heads/next' }}
      - *install-cargo-make
      - uses: taiki-e/install-action@nextest
      - name: Check
        # We run `cargo check` to verify that the workspace compiles correctly before attempting
        # to execute the tests. This produces easier to read output if a compilation error occurs
        run: |
          cargo make check --tests
      - name: Test
        run: |
          cargo make test

  check_release:
    name: release checks
    runs-on: ubuntu-latest
    steps:
      - *checkout
      - *install-rust
      - name: Cache Cargo
        uses: Swatinem/rust-cache@v2
        with:
          # NOTE: We use a different cache for the these release checks
          shared-key: ${{ github.workflow }}-shared-release-checks
          prefix-key: ${{ env.RUST_CACHE_KEY }}
          save-if: ${{ github.ref == 'refs/heads/next' }}
      - *install-cargo-make
      - name: Build all targets in release configuration
        run: |
          cargo make build --release --all-targets