Repository navigation
146 lines (139 loc) · 8.86 KB
/
Copy pathci.yml
File metadata and controls
146 lines (139 loc) · 8.86 KB
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
name: CI
on:
push:
pull_request:
permissions:
contents: read
jobs:
stable:
name: Stable checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- run: cargo fmt --all -- --check
- run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
- run: cargo test --workspace --all-targets --all-features --locked
# The isolated single-adapter configurations are the crate's entire
# purpose. Without these steps, "curl_only links no Eggfetch code" is
# never checked by any machine. Each configuration is its own step so a
# failure names itself instead of hiding in a loop.
- run: cargo build -p eggup-transport-footprint --no-default-features --features curl --locked
- run: cargo build -p eggup-transport-footprint --no-default-features --features eggfetch --locked
- run: cargo build -p eggup-transport-footprint --no-default-features --features curl,eggfetch --locked
- run: cargo doc --workspace --no-deps --locked
# The packaged service crate is verified against the REGISTRY, strictly:
# the packaged sources are compiled, not merely packaged. The earlier
# deferral is DISCHARGED. It was needed because the service source line
# uses core's bounded-stdin capability (Core M017) and core's
# unconditional execution deadline (Core M014), neither of which was in
# the published `eggup-core 0.1.3`, so the packaged crate's
# `eggup-core = "^0.2"` requirement had nothing to resolve against.
# `eggup-core 0.2.0` is now on the registry, so the requirement resolves
# and the strict verification passes. See registry finding 16.
- run: cargo package -p eggup-service --locked
msrv:
name: MSRV check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.89.0
- run: cargo check --workspace --all-targets --locked
# `cargo check --workspace --all-targets --locked` enables no feature
# (default = []), so it compiled none of the three footprint binaries.
# The MSRV floor must apply to the feature-gated paths too, and the
# dual configuration is where two independent adapter graphs meet.
- run: cargo check -p eggup-transport-footprint --no-default-features --features curl --locked
- run: cargo check -p eggup-transport-footprint --no-default-features --features eggfetch --locked
- run: cargo check -p eggup-transport-footprint --no-default-features --features curl,eggfetch --locked
# The packaged service crate is verified against the REGISTRY, strictly:
# the packaged sources are compiled, not merely packaged. The earlier
# deferral is DISCHARGED. It was needed because the service source line
# uses core's bounded-stdin capability (Core M017) and core's
# unconditional execution deadline (Core M014), neither of which was in
# the published `eggup-core 0.1.3`, so the packaged crate's
# `eggup-core = "^0.2"` requirement had nothing to resolve against.
# `eggup-core 0.2.0` is now on the registry, so the requirement resolves
# and the strict verification passes. See registry finding 16.
- run: cargo package -p eggup-service --locked
service-systemd:
name: Linux systemd service qualification
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo fmt --manifest-path crates/eggup-service/tests/published-api-0.1.2/Cargo.toml -- --check
- run: cargo check --manifest-path crates/eggup-service/tests/published-api-0.1.2/Cargo.toml --locked
# This registry-only 0.1.2 fixture is a deliberate negative control for
# the failed-unit behavior added to the unpublished workspace 0.1.3.
- run: sudo --preserve-env=PATH,HOME,RUSTUP_HOME,CARGO_HOME env EGGUP_SYSTEMD_INTEGRATION=1 "$HOME/.cargo/bin/cargo" test --manifest-path crates/eggup-service/tests/published-api-0.1.2/Cargo.toml --locked -- --nocapture
# This fixture writes disposable unit files under /run/systemd/system.
# Run the test process as root so systemd can load and control them.
- run: sudo --preserve-env=PATH,HOME,RUSTUP_HOME,CARGO_HOME env EGGUP_SYSTEMD_INTEGRATION=1 "$HOME/.cargo/bin/cargo" test -p eggup-service --test systemd_failed_service --locked -- --nocapture
# These tests resolve the published crate and core from crates.io only.
- run: cargo fmt --manifest-path crates/eggup-service/tests/published-api-0.1.3/Cargo.toml -- --check
- run: cargo check --manifest-path crates/eggup-service/tests/published-api-0.1.3/Cargo.toml --locked
- run: sudo --preserve-env=PATH,HOME,RUSTUP_HOME,CARGO_HOME env EGGUP_SYSTEMD_INTEGRATION=1 "$HOME/.cargo/bin/cargo" test --manifest-path crates/eggup-service/tests/published-api-0.1.3/Cargo.toml --locked -- --nocapture
macos:
name: macOS tests
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- run: cargo test --workspace --all-targets --all-features --locked
# macOS is the platform on which the published 3 / 92 / 93 counts were
# captured, so the isolated configurations are built here as well. The
# dual configuration is already built by the lane's --all-features step.
- run: cargo build -p eggup-transport-footprint --no-default-features --features curl --locked
- run: cargo build -p eggup-transport-footprint --no-default-features --features eggfetch --locked
# The packaged service crate is verified against the REGISTRY, strictly:
# the packaged sources are compiled, not merely packaged. The earlier
# deferral is DISCHARGED. It was needed because the service source line
# uses core's bounded-stdin capability (Core M017) and core's
# unconditional execution deadline (Core M014), neither of which was in
# the published `eggup-core 0.1.3`, so the packaged crate's
# `eggup-core = "^0.2"` requirement had nothing to resolve against.
# `eggup-core 0.2.0` is now on the registry, so the requirement resolves
# and the strict verification passes. See registry finding 16.
- run: cargo package -p eggup-service --locked
windows-check:
name: Windows archive, acquisition, and service tests and check
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo test -p eggup-acquisition -p eggup-archive -p eggup-curl --locked
- run: cargo test -p eggup-eggpack --all-targets --all-features --locked
- run: cargo test -p eggup-service --lib diagnostic_byte_bounds_preserve_utf8_at_256_and_512_edges --locked
- run: cargo test -p eggup-service --lib service_errors_output_and_permission_remediation_stay_utf8_bounded --locked
- run: cargo test -p eggup-service --lib lifecycle_failure_detail_is_utf8_safe_bounded_and_control_free --locked
- run: cargo test -p eggup-service --lib windows_scm::tests --locked
# The real Windows SCM fixture registers a disposable service through the
# crate's public API and drives it against the genuine Service Control
# Manager. It needs a hosted Windows runner with administrator rights,
# and it records a skip reason on stdout when those rights are absent --
# so it runs with --nocapture, and the reason is never swallowed by the
# test harness's output capture.
- run: cargo test -p eggup-service --test windows_scm_live --locked -- --nocapture
# Core self-update and stale-lock fixtures exercise real running-image and
# filesystem-race behaviour, so they run natively here rather than only
# being compiled.
- run: cargo test -p eggup-core --test current_executable --locked
- run: cargo test -p eggup-core --test stale_lock_recovery --locked
# --no-fail-fast: this lane is the only Windows test coverage, so a single
# failing target must not hide the state of every other one.
- run: cargo test --workspace --all-targets --locked --no-fail-fast
# The packaged service crate is verified against the REGISTRY, strictly:
# the packaged sources are compiled, not merely packaged. The earlier
# deferral is DISCHARGED. It was needed because the service source line
# uses core's bounded-stdin capability (Core M017) and core's
# unconditional execution deadline (Core M014), neither of which was in
# the published `eggup-core 0.1.3`, so the packaged crate's
# `eggup-core = "^0.2"` requirement had nothing to resolve against.
# `eggup-core 0.2.0` is now on the registry, so the requirement resolves
# and the strict verification passes. See registry finding 16.
- run: cargo package -p eggup-service --locked