axhash 0.8.1

Simple Rust entrypoint for the AxHash engine.
Documentation
name: CI

on:
  push:
    branches: ["main", "master"]
  pull_request:
  workflow_dispatch:

jobs:
  test-workspace:
    name: Test Workspace
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
      - name: Test workspace
        run: cargo test --workspace --quiet
      - name: Validate no_std core
        run: cargo build -p axhash-core --no-default-features --quiet

  native-build:
    name: Build ${{ matrix.artifact_name }}
    strategy:
      fail-fast: false
      matrix:
        include:
          - os: macos-14
            target: aarch64-apple-darwin
            artifact_name: axhash-native-aarch64-apple-darwin
          - os: macos-14
            target: x86_64-apple-darwin
            artifact_name: axhash-native-x86_64-apple-darwin
          - os: ubuntu-22.04
            target: x86_64-unknown-linux-gnu
            artifact_name: axhash-native-x86_64-unknown-linux-gnu
          - os: ubuntu-22.04
            target: aarch64-unknown-linux-gnu
            artifact_name: axhash-native-aarch64-unknown-linux-gnu
          - os: windows-2022
            target: x86_64-pc-windows-msvc
            artifact_name: axhash-native-x86_64-pc-windows-msvc
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v4

      - uses: dtolnay/rust-toolchain@stable
        with:
          targets: ${{ matrix.target }}

      - name: Install ARM64 linker
        if: matrix.target == 'aarch64-unknown-linux-gnu'
        run: |
          sudo apt-get update
          sudo apt-get install -y gcc-aarch64-linux-gnu

      - name: Set linker for ARM64
        if: matrix.target == 'aarch64-unknown-linux-gnu'
        run: echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV

      - uses: actions/setup-python@v5
        with:
          python-version: "3.11"

      - uses: Swatinem/rust-cache@v2

      - name: Build axhash-ffi
        run: cargo build --release --target ${{ matrix.target }} -p axhash-ffi

      - name: Package artifacts
        run: python scripts/package-release.py "${{ matrix.target }}" release "$PWD/dist"

      - name: Upload artifact
        uses: actions/upload-artifact@v4
        with:
          name: ${{ matrix.artifact_name }}
          path: dist/*