libdeno 0.1.3

Embed the Deno runtime in Rust with direct npm: specifier support
Documentation
name: CI

on:
  push:
    branches: [main]
  pull_request:

env:
  CARGO_TERM_COLOR: always
  RUST_BACKTRACE: 1

jobs:
  test:
    name: build + test (${{ matrix.os }})
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        # macos-15 = arm64, macos-15-intel = x86_64 (both standard labels;
        # macos-13 is retired and macos-14 is deprecated).
        os: [ubuntu-latest, macos-15, macos-15-intel, windows-latest]
    steps:
      - uses: actions/checkout@v7

      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy

      - uses: Swatinem/rust-cache@v2
        with:
          # V8 snapshot compilation is heavy; cache the whole target dir.
          cache-on-failure: true

      - name: Format
        run: cargo fmt --check

      - name: Lint
        run: cargo clippy --all-targets -- -D warnings

      - name: Test
        # --locked keeps CI in sync with the committed Cargo.lock (the release
        # publish is --locked too, so lockfile drift fails here, not at tag).
        run: cargo test --all-targets --locked

  release-build:
    name: release build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7

      - uses: dtolnay/rust-toolchain@stable

      - uses: Swatinem/rust-cache@v2
        with:
          cache-on-failure: true

      - name: Build (release)
        # Exercises the release profile (optimizations + final link) that the
        # dev-profile test job never touches.
        run: cargo build --release --all-targets --locked

  msrv:
    name: MSRV check (1.95.0)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7

      - uses: dtolnay/rust-toolchain@1.95.0

      - uses: Swatinem/rust-cache@v2
        with:
          cache-on-failure: true

      - name: Check (MSRV)
        run: cargo check --locked