memory_addresses 0.4.0

Unified virtual and physical address types for the Hermit ecosystem and beyond
Documentation
name: CI

on:
  push:
    branches:
      - main
  pull_request:
  merge_group:

jobs:
  test:
    name: Test
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest]
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
        with:
          save-if: ${{ github.ref == 'refs/heads/main' }}
      - name: Test
        run: |
          cargo test
    env:
      RUST_BACKTRACE: 1

  fmt:
    name: Format
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Format
        run: cargo fmt --all -- --check

  clippy:
    name: Clippy
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest]
        include:
          - os: ubuntu-latest
            targets: x86_64-unknown-linux-gnu
            flags: --target x86_64-unknown-linux-gnu
          - os: macos-latest
            targets: x86_64-apple-darwin, aarch64-apple-darwin
            flags: --target x86_64-apple-darwin --target aarch64-apple-darwin
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          targets: ${{ matrix.targets }}
          components: clippy
      - uses: Swatinem/rust-cache@v2
        with:
          save-if: ${{ github.ref == 'refs/heads/main' }}
      - name: Clippy
        run: cargo clippy --all-targets ${{ matrix.flags }} -- -D warnings