s3sync 1.58.6

Reliable, flexible, and fast synchronization tool for S3.
Documentation
name: CI
permissions:
  contents: read
  pull-requests: write

on:
  push:

env:
  CARGO_TERM_COLOR: always

jobs:
  test:
    name: test
    strategy:
      matrix:
        toolchain:
          - stable
        # windows-11-arm (aarch64-pc-windows-msvc) suspended: link.exe LNK1322
        # (Cortex-A53 erratum 843419) keeps breaking the build. Re-enable once a
        # stable workaround is in place.
        os:
          - windows-latest
          - macos-latest
        include:
          - os: ubuntu-latest
            target: x86_64-unknown-linux-gnu
          - os: ubuntu-latest
            target: x86_64-unknown-linux-musl
          - os: ubuntu-24.04-arm
            target: aarch64-unknown-linux-gnu
          - os: ubuntu-24.04-arm
            target: aarch64-unknown-linux-musl
          - os: windows-latest
            target: x86_64-pc-windows-msvc
          - os: macos-latest
            target: aarch64-apple-darwin
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v6
      - run: rustup update
      - uses: Swatinem/rust-cache@v2
      - run: rustup target add ${{ matrix.target }}
      - name: Run only musl
        if: matrix.target == 'x86_64-unknown-linux-musl' || matrix.target == 'aarch64-unknown-linux-musl'
        run: sudo apt update && sudo apt install -y musl-dev
      - run: cargo build --target ${{ matrix.target }} --no-default-features --verbose
      - run: cargo build --target ${{ matrix.target }} --verbose
      - run: cargo test  --target ${{ matrix.target }} --verbose

  rustfmt:
    name: rustfmt
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - run: rustup update stable && rustup default stable && rustup component add rustfmt
      - uses: Swatinem/rust-cache@v2
      - run: cargo fmt --all --check --verbose

  clippy:
    name: clippy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - run: rustup update stable && rustup default stable && rustup component add clippy
      - uses: Swatinem/rust-cache@v2
      - run: cargo clippy -- -D warnings

  cargo_deny:
    name: cargo_deny
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - run: rustup update stable && rustup default stable && cargo install cargo-deny
      - uses: Swatinem/rust-cache@v2
      - run: cargo deny -L error check