gossiphs 0.11.6

A Rust lib for general code file relationship analysis. Based on tree-sitter and git analysis.
Documentation
# This file is autogenerated by maturin v1.7.4
# To update, run
#
#    maturin generate-ci github
#
name: Release Py

on:
  push:
    tags:
      - 'v*'

permissions:
  contents: read

jobs:
  linux:
    runs-on: ${{ matrix.platform.runner }}
    strategy:
      matrix:
        platform:
          - runner: ubuntu-latest
            target: x86_64
          - runner: ubuntu-latest
            target: x86
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: 3.x
      - uses: dtolnay/rust-toolchain@stable
      - name: Install SSL
        run: |
          sudo apt-get update
          sudo apt-get install -y pkg-config libssl-dev build-essential gcc-multilib g++-multilib
      - name: Build wheels
        uses: PyO3/maturin-action@v1
        with:
          target: ${{ matrix.platform.target }}
          args: --release --out dist
          sccache: 'true'
          manylinux: auto
          container: 'off'
      - name: Upload wheels
        uses: actions/upload-artifact@v4
        with:
          name: wheels-linux-${{ matrix.platform.target }}
          path: dist
      - name: Build Binary
        run: |
          cargo build --release
          mv target/release/gossiphs target/release/gossiphs-linux-${{ matrix.platform.target }}
      - name: Upload Binary
        uses: actions/upload-artifact@v4
        with:
          name: gossiphs-linux-${{ matrix.platform.target }}
          path: target/release/gossiphs-linux-${{ matrix.platform.target }}

  windows:
    runs-on: ${{ matrix.platform.runner }}
    strategy:
      matrix:
        platform:
          - runner: windows-latest
            target: x64
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: 3.x
          architecture: ${{ matrix.platform.target }}
      - name: Build wheels
        uses: PyO3/maturin-action@v1
        with:
          target: ${{ matrix.platform.target }}
          args: --release --out dist
          sccache: 'true'
      - name: Upload wheels
        uses: actions/upload-artifact@v4
        with:
          name: wheels-windows-${{ matrix.platform.target }}
          path: dist
      - name: Build Binary
        run: |
          cargo build --release
          move target/release/gossiphs.exe target/release/gossiphs-windows-${{ matrix.platform.target }}.exe
      - name: Upload Binary
        uses: actions/upload-artifact@v4
        with:
          name: gossiphs-windows-${{ matrix.platform.target }}
          path: target/release/gossiphs-windows-${{ matrix.platform.target }}.exe

  macos:
    runs-on: ${{ matrix.platform.runner }}
    strategy:
      matrix:
        platform:
          - runner: macos-13
            target: x86_64
          - runner: macos-14
            target: aarch64
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: 3.x
      - name: Build wheels
        uses: PyO3/maturin-action@v1
        with:
          target: ${{ matrix.platform.target }}
          args: --release --out dist
          sccache: 'true'
      - name: Upload wheels
        uses: actions/upload-artifact@v4
        with:
          name: wheels-macos-${{ matrix.platform.target }}
          path: dist
      - name: Build Binary
        run: |
          cargo build --release
          mv target/release/gossiphs target/release/gossiphs-macos-${{ matrix.platform.target }}
      - name: Upload Binary
        uses: actions/upload-artifact@v4
        with:
          name: gossiphs-macos-${{ matrix.platform.target }}
          path: target/release/gossiphs-macos-${{ matrix.platform.target }}

  sdist:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Build sdist
        uses: PyO3/maturin-action@v1
        with:
          command: sdist
          args: --out dist
      - name: Upload sdist
        uses: actions/upload-artifact@v4
        with:
          name: wheels-sdist
          path: dist

  release:
    name: Release
    runs-on: ubuntu-latest
    if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
    needs: [linux, windows, macos, sdist]
    permissions:
      # Use to sign the release artifacts
      id-token: write
      # Used to upload release artifacts
      contents: write
      # Used to generate artifact attestation
      attestations: write
    steps:
      - uses: actions/download-artifact@v4
      - run: ls -l
      - name: Generate artifact attestation
        uses: actions/attest-build-provenance@v1
        with:
          subject-path: 'wheels-*/*'
      - name: Publish to PyPI
        if: "startsWith(github.ref, 'refs/tags/')"
        uses: PyO3/maturin-action@v1
        env:
          MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
        with:
          command: upload
          args: --non-interactive --skip-existing wheels-*/*
      - name: Release
        uses: softprops/action-gh-release@v2
        if: startsWith(github.ref, 'refs/tags/')
        with:
          files: |
            gossiphs-macos-aarch64/*
            gossiphs-macos-x86_64/*
            gossiphs-linux-x86_64/*
            gossiphs-windows-x64/*
      - uses: actions/checkout@v4
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          override: true
      - uses: katyo/publish-crates@v2
        with:
          registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}