libperl-macrogen 0.1.13

Generate Rust FFI bindings from C macro functions in Perl headers
Documentation
# push CI: 単体テスト + golden (基準 perl 5.42-threaded) + 代表スモーク。
# フル matrix (5.20〜5.42) は full-matrix.yml (pull_request / workflow_dispatch)。
# ローカルでの同等実行: scripts/multi-perl.tcl (podman) / doc/multi-perl-testing.md
name: CI

on:
  push:
    branches: [ '*' ]

env:
  CARGO_TERM_COLOR: always

jobs:
  # Perl 非依存の単体テスト。runner のシステム perl は基準と異なるため
  # golden 回帰テストは自動 skip される (メッセージがログに出る)
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: actions-rust-lang/setup-rust-toolchain@v1
        with:
          components: rustfmt
          # 既存コードに未解消の warning があるため -D warnings (action の既定) を無効化
          rustflags: ""
      - run: cargo test --locked

  # golden 回帰テストを基準 perl (5.42-threaded) で実走させる
  golden:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: actions-rust-lang/setup-rust-toolchain@v1
        with:
          components: rustfmt
          # 既存コードに未解消の warning があるため -D warnings (action の既定) を無効化
          rustflags: ""
      - uses: shogo82148/actions-setup-perl@v1
        with:
          perl-version: '5.42'
          multi-thread: true
      - run: cargo test --locked --test rust_codegen_regression

  # 代表スモーク: 旧版側 5.30 + 中間 5.36 + 基準 5.42 × 両モード。
  # known_failures (期待値ファイル) により既知の red は XFAIL で green になる
  smoke:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        perl-version: [ '5.30', '5.36', '5.42' ]
        threaded: [ true, false ]
    steps:
      - uses: actions/checkout@v6
      - uses: actions-rust-lang/setup-rust-toolchain@v1
        with:
          components: rustfmt
          # 既存コードに未解消の warning があるため -D warnings (action の既定) を無効化
          rustflags: ""
      - uses: shogo82148/actions-setup-perl@v1
        with:
          perl-version: ${{ matrix.perl-version }}
          multi-thread: ${{ matrix.threaded }}
      - run: cargo build --locked
      - name: Run smoke harness
        env:
          # apidoc cache は leg 毎に隔離 (cache key が APIDOC_DATA_VERSION
          # のみのため)
          LIBPERL_APIDOC_CACHE_DIR: ${{ runner.temp }}/apidoc-${{ matrix.perl-version }}-${{ matrix.threaded }}
        run: |
          MODE=$([ "${{ matrix.threaded }}" = true ] && echo threaded || echo non-threaded)
          perl scripts/multi-perl-smoke.pl \
            --require ${{ matrix.perl-version }}-$MODE \
            --out tmp/multi-perl/out/ci
      - name: Upload artifacts on failure
        if: failure()
        uses: actions/upload-artifact@v4
        with:
          name: smoke-${{ matrix.perl-version }}-${{ matrix.threaded && 'threaded' || 'non-threaded' }}
          path: tmp/multi-perl/out/ci/