self_update 1.2.0

Self updates for standalone executables
Documentation
name: build

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

env:
  CARGO_TERM_COLOR: always
  # The full per-client feature sets, for the jobs that cannot run `make` (the Makefile is the source
  # of truth for the lanes; `make check/workflow-features` fails if these drift from it).
  REQWEST_FEATURES: github gitlab gitea gitee manifest s3 archive-tar archive-zip compression-tar-gz compression-tar-xz compression-zip-deflate compression-zip-bzip2 signatures checksums s3-auth
  UREQ_FEATURES: ureq native-tls github gitlab gitea gitee manifest s3 archive-tar archive-zip compression-tar-gz compression-tar-xz compression-zip-deflate compression-zip-bzip2 signatures checksums s3-auth

jobs:
  ci:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4

    - uses: dtolnay/rust-toolchain@stable
      with:
        components: rustfmt, clippy

    - name: Cache cargo dir
      uses: actions/cache@v4
      with:
        path: ~/.cargo
        key: ${{ runner.os }}-ci-${{ hashFiles('**/Cargo.lock') }}
        restore-keys: |
          ${{ runner.os }}-ci-
          ${{ runner.os }}-

    - name: Cache target dir
      uses: actions/cache@v4
      with:
        path: ./target
        key: ${{ runner.os }}-ci-target-${{ hashFiles('**/Cargo.lock') }}
        restore-keys: |
          ${{ runner.os }}-ci-target-
          ${{ runner.os }}-ci-

    - run: cargo install cargo-readme
    # `make ci` runs fmt + README drift + clippy (-D warnings) on every client, the test suite on
    # the default/reqwest/ureq/async feature sets, the `--all-features` build, and the example builds.
    - run: make ci

  msrv:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: dtolnay/rust-toolchain@1.88.0
    # Pin the declared MSRV: the full reqwest feature set must build on 1.88 (zip 8 requires 1.88).
    - run: cargo build --features "${{ env.REQWEST_FEATURES }}"

  macos:
    # macOS is the target platform for directory-bundle (`.app`) installs, so run the suite there.
    # `macos-latest` is arm64 (Apple Silicon). Beyond the bundle swap this covers APFS's
    # case-insensitive filenames, macOS symlink and rename semantics, and `self_replace`. None of
    # that is architecture-dependent, so arm64 alone is enough. Runners are free for public repos.
    runs-on: macos-latest
    steps:
    - uses: actions/checkout@v4
    - uses: dtolnay/rust-toolchain@stable
    # `make` is available here, but the fmt/README lanes are already covered on linux, so run the
    # test lanes directly on both clients.
    - run: cargo test --features "${{ env.REQWEST_FEATURES }}"
    - run: cargo test --no-default-features --features "${{ env.UREQ_FEATURES }}"

  windows:
    runs-on: windows-latest
    steps:
    - uses: actions/checkout@v4
    - uses: dtolnay/rust-toolchain@stable
    # Exercise the Windows-sensitive paths (asset-name guard, zip extraction, self-replace, the
    # bundle swap's file-locking caveat) on both clients. `make` is not available on the Windows
    # runner, so run the lanes directly.
    - run: cargo test --features "${{ env.REQWEST_FEATURES }}"
    - run: cargo test --no-default-features --features "${{ env.UREQ_FEATURES }}"