portable_link_section 0.1.0

A portable version of the #[link_section] macro.
Documentation
name: Rust - Continuous Integration

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

# disable running jobs on earlier commits
concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

env:
  # Pin nightly so that it does not invalidate GitHub Actions cache too frequently.
  RUST_NIGHTLY_VERSION: nightly-2025-10-04

jobs:
  fmt:
    name: Formatting
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ env.RUST_NIGHTLY_VERSION }}
          components: rustfmt
      - name: Foramtting
        run: cargo fmt --all -- --check

  test:
    name: Test
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
        with:
          submodules: true
      - uses: dtolnay/rust-toolchain@stable
      - name: Set up Rust cache
        uses: Swatinem/rust-cache@v2
      - name: Build Tests
        env:
          RUSTFLAGS: "-C debug-assertions"
        run: cargo build --tests --verbose
      - name: Run Tests
        env:
          RUSTFLAGS: "-C debug-assertions"
        run: cargo test --locked

  doc:
    name: Documentation
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rust-docs, rust-src
      - name: Set up Rust cache
        uses: Swatinem/rust-cache@v2
      - name: Check Documentation
        env:
          RUSTDOCFLAGS: "-D warnings"
        run: cargo doc --locked --no-deps --document-private-items

  clippy:
    name: Clippy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
        with:
          submodules: true
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ env.RUST_NIGHTLY_VERSION }}
          components: clippy
      - name: Set up Rust cache
        uses: Swatinem/rust-cache@v2
      - name: Run Clippy
        run: cargo clippy --locked -- -D warnings