1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: build
on:
push:
branches:
pull_request:
branches:
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 }}"