+99
-37
lines changedFilter options
+99
-37
lines changed Original file line number Diff line number Diff line change
@@ -487,7 +487,7 @@ jobs:
487
487
sort -m blocking-jobs.txt expected-nonblocking-jobs.txt |
488
488
diff --color=always -U1000 - all-jobs.txt
489
489
490
-
# Dummy job to have a stable name for the "all tests pass" requirement
490
+
# Dummy job to have a stable name for the "all tests pass" requirement.
491
491
tests-pass:
492
492
name: Tests pass
493
493
@@ -504,7 +504,7 @@ jobs:
504
504
- check-packetline
505
505
- check-blocking
506
506
507
-
if: always() # always run even if dependencies fail
507
+
if: always() # Always run even if dependencies fail.
508
508
509
509
runs-on: ubuntu-latest
510
510
Original file line number Diff line number Diff line change
@@ -28,22 +28,55 @@ jobs:
28
28
29
29
runs-on: ${{ matrix.os }}
30
30
31
-
env:
32
-
# This is dictated by `firefox` to support the `helix` editor, but now probably effectively
33
-
# be controlled by `jiff`, which also aligns with `regex`.
34
-
# IMPORTANT: When adjusting, change all occurrences in `etc/msrv-badge.svg` as well.
35
-
RUST_VERSION: 1.75.0
31
+
defaults:
32
+
run:
33
+
shell: bash # Use `bash` even in the Windows job.
36
34
37
35
steps:
38
36
- uses: actions/checkout@v4
39
37
- uses: extractions/setup-just@v3
40
-
- name: Set up ${{ env.RUST_VERSION }} (MSRV) and nightly toolchains
41
-
run: rustup toolchain install ${{ env.RUST_VERSION }} nightly --profile minimal --no-self-update
42
-
- name: Set ${{ env.RUST_VERSION }} (MSRV) as default
43
-
run: rustup default ${{ env.RUST_VERSION }}
38
+
- name: Read the MSRV
39
+
run: |
40
+
msrv="$(just msrv)"
41
+
tee -a "$GITHUB_ENV" <<<"MSRV=$msrv"
42
+
- name: Set up MSRV and nightly toolchains
43
+
run: |
44
+
rustup toolchain install "$MSRV" nightly --profile minimal --no-self-update
44
45
- name: Downgrade locked dependencies to lowest allowed versions
45
46
run: |
46
47
# TODO(msrv): Use `cargo update --minimal-versions` when `--minimal-versions` is available.
47
48
cargo +nightly update -Zminimal-versions
48
49
- name: Run some `cargo build` commands on `gix`
49
-
run: just ci-check-msrv
50
+
run: just check-rust-version "$MSRV"
51
+
52
+
check-msrv-badge:
53
+
name: Check MSRV badge
54
+
55
+
runs-on: ubuntu-latest
56
+
57
+
steps:
58
+
- uses: actions/checkout@v4
59
+
- uses: extractions/setup-just@v3
60
+
- name: Ensure we start out clean
61
+
run: git diff --exit-code
62
+
- name: Regenerate the MSRV badge
63
+
run: just msrv-badge
64
+
- name: Check for changes
65
+
run: git diff --exit-code
66
+
67
+
# Dummy job to have a stable name for the requirement that all MSRV checks pass.
68
+
msrv-pass:
69
+
name: MSRV checks pass
70
+
71
+
needs: [ check-msrv, check-msrv-badge ]
72
+
73
+
if: always() # Always run even if dependencies fail.
74
+
75
+
runs-on: ubuntu-latest
76
+
77
+
steps:
78
+
- name: Fail if ANY dependency has failed or cancelled
79
+
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
80
+
run: exit 1
81
+
- name: OK
82
+
run: exit 0
Original file line number Diff line number Diff line change
@@ -124,11 +124,6 @@ stress-commitgraph: release-lean $(commit_graphs)
124
124
bench-gix-config:
125
125
cd gix-config && cargo bench
126
126
127
-
check-msrv-on-ci: ## Check the minimal support rust version for currently installed Rust version
128
-
rustc --version
129
-
cargo build --locked --package gix
130
-
cargo build --locked --package gix --no-default-features --features async-network-client,max-performance
131
-
132
127
##@ Maintenance
133
128
134
129
baseline_asset_dir = gix/src/assets/baseline-init
Original file line number Diff line number Diff line change
@@ -9,6 +9,8 @@ version = "0.72.1"
9
9
authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"]
10
10
edition = "2021"
11
11
include = ["src/**/*", "LICENSE-*"]
12
+
# This MSRV is dictated by `firefox` to support the `helix` editor, but is now probably
13
+
# effectively controlled by `jiff`, which also aligns with `regex`.
12
14
rust-version = "1.75"
13
15
14
16
[lib]
Original file line number Diff line number Diff line change
@@ -184,34 +184,36 @@ unit-tests:
184
184
unit-tests-flaky:
185
185
cargo test -p gix --features async-network-client-async-std
186
186
187
-
# Depend on this to pre-generate metadata, and/or use it inside a recipe as `"$({{ j }} dbg)"`
187
+
# Extract cargo metadata, excluding dependencies, and query it
188
188
[private]
189
-
dbg:
190
-
set -eu; \
191
-
target_dir="$(cargo metadata --format-version 1 | jq -r .target_directory)"; \
192
-
test -n "$target_dir"; \
193
-
echo "$target_dir/debug"
189
+
query-meta jq-query:
190
+
meta="$(cargo metadata --format-version 1 --no-deps)" && \
191
+
printf '%s\n' "$meta" | jq --exit-status --raw-output -- {{ quote(jq-query) }}
192
+
193
+
# Get the path to the directory where debug binaries are created during builds
194
+
[private]
195
+
dbg: (query-meta '.target_directory + "/debug"')
194
196
195
197
# Run journey tests (`max`)
196
-
journey-tests: dbg
198
+
journey-tests:
197
199
cargo build --features http-client-curl-rustls
198
200
cargo build -p gix-testtools --bin jtt
199
201
dbg="$({{ j }} dbg)" && tests/journey.sh "$dbg/ein" "$dbg/gix" "$dbg/jtt" max
200
202
201
203
# Run journey tests (`max-pure`)
202
-
journey-tests-pure: dbg
204
+
journey-tests-pure:
203
205
cargo build --no-default-features --features max-pure
204
206
cargo build -p gix-testtools --bin jtt
205
207
dbg="$({{ j }} dbg)" && tests/journey.sh "$dbg/ein" "$dbg/gix" "$dbg/jtt" max-pure
206
208
207
209
# Run journey tests (`small`)
208
-
journey-tests-small: dbg
210
+
journey-tests-small:
209
211
cargo build --no-default-features --features small
210
212
cargo build -p gix-testtools
211
213
dbg="$({{ j }} dbg)" && tests/journey.sh "$dbg/ein" "$dbg/gix" "$dbg/jtt" small
212
214
213
215
# Run journey tests (`lean-async`)
214
-
journey-tests-async: dbg
216
+
journey-tests-async:
215
217
cargo build --no-default-features --features lean-async
216
218
cargo build -p gix-testtools
217
219
dbg="$({{ j }} dbg)" && tests/journey.sh "$dbg/ein" "$dbg/gix" "$dbg/jtt" async
@@ -238,16 +240,25 @@ cross-test-android: (cross-test 'armv7-linux-androideabi' '--no-default-features
238
240
check-size:
239
241
etc/check-package-size.sh
240
242
241
-
# This assumes the current default toolchain is the Minimal Supported Rust Version and checks
242
-
# against it. This is run on CI in `msrv.yml`, after the MSRV toolchain is installed and set as
243
-
# default, and after dependencies in `Cargo.lock` are downgraded to the latest MSRV-compatible
244
-
# versions. Only if those or similar steps are done first does this work to validate the MSRV.
245
-
#
246
-
# Check the MSRV, *if* the toolchain is set and `Cargo.lock` is downgraded (used on CI)
247
-
ci-check-msrv:
248
-
rustc --version
249
-
cargo build --locked -p gix
250
-
cargo build --locked -p gix --no-default-features --features async-network-client,max-performance
243
+
# Report the Minimum Supported Rust Version (the `rust-version` of `gix`) in X.Y.Z form
244
+
msrv: (query-meta '''
245
+
.packages[]
246
+
| select(.name == "gix")
247
+
| .rust_version
248
+
| sub("(?<xy>^[0-9]+[.][0-9]+$)"; "\(.xy).0")
249
+
''')
250
+
251
+
# Regenerate the MSRV badge SVG
252
+
msrv-badge:
253
+
msrv="$({{ j }} msrv)" && \
254
+
sed "s/{MSRV}/$msrv/g" etc/msrv-badge.template.svg >etc/msrv-badge.svg
255
+
256
+
# Check if `gix` and its dependencies, as currently locked, build with `rust-version`
257
+
check-rust-version rust-version:
258
+
rustc +{{ rust-version }} --version
259
+
cargo +{{ rust-version }} build --locked -p gix
260
+
cargo +{{ rust-version }} build --locked -p gix \
261
+
--no-default-features --features async-network-client,max-performance
251
262
252
263
# Enter a nix-shell able to build on macOS
253
264
nix-shell-macos:
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4