+95
-23
lines changedFilter options
+95
-23
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
@@ -25,25 +25,57 @@ jobs:
25
25
os:
26
26
- windows-2022
27
27
- ubuntu-latest
28
+
- macos-15 # FIXME(portability): Remove after testing new justfile changes.
28
29
29
30
runs-on: ${{ matrix.os }}
30
31
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
32
+
defaults:
33
+
run:
34
+
shell: bash # Use `bash` even in the Windows job.
36
35
37
36
steps:
38
37
- uses: actions/checkout@v4
39
38
- 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 }}
39
+
- name: Read the MSRV
40
+
run: |
41
+
msrv="$(just msrv)"
42
+
echo "MSRV=$msrv" >> "$GITHUB_ENV"
43
+
- name: Set up MSRV and nightly toolchains
44
+
run: |
45
+
rustup toolchain install "$MSRV" nightly --profile minimal --no-self-update
44
46
- name: Downgrade locked dependencies to lowest allowed versions
45
47
run: |
46
48
# TODO(msrv): Use `cargo update --minimal-versions` when `--minimal-versions` is available.
47
49
cargo +nightly update -Zminimal-versions
48
50
- name: Run some `cargo build` commands on `gix`
49
-
run: just ci-check-msrv
51
+
run: just check-rust-version "$MSRV"
52
+
53
+
check-msrv-badge:
54
+
name: Check MSRV badge
55
+
56
+
runs-on: ubuntu-latest
57
+
58
+
steps:
59
+
- uses: actions/checkout@v4
60
+
- uses: extractions/setup-just@v3
61
+
- name: Regenerate the MSRV badge
62
+
run: just msrv-badge
63
+
- name: Check for changes
64
+
run: git diff --exit-code
65
+
66
+
# Dummy job to have a stable name for the requirement that all MSRV tests pass.
67
+
msrv-pass:
68
+
name: MSRV checks pass
69
+
70
+
needs: [ check-msrv, check-msrv-badge ]
71
+
72
+
if: always() # Always run even if dependencies fail.
73
+
74
+
runs-on: ubuntu-latest
75
+
76
+
steps:
77
+
- name: Fail if ANY dependency has failed or cancelled
78
+
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
79
+
run: exit 1
80
+
- name: OK
81
+
run: exit 0
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
@@ -187,7 +187,8 @@ unit-tests-flaky:
187
187
# Extract cargo metadata, excluding dependencies, and query it
188
188
[private]
189
189
get-metadata jq-query:
190
-
cargo metadata --format-version 1 | jq --exit-status --raw-output -- {{ quote(jq-query) }}
190
+
cargo metadata --format-version 1 --no-deps | \
191
+
jq --exit-status --raw-output -- {{ quote(jq-query) }}
191
192
192
193
# Get the path to the directory where debug binaries are created during builds
193
194
[private]
@@ -240,16 +241,32 @@ cross-test-android: (cross-test 'armv7-linux-androideabi' '--no-default-features
240
241
check-size:
241
242
etc/check-package-size.sh
242
243
243
-
# This assumes the current default toolchain is the Minimal Supported Rust Version and checks
244
-
# against it. This is run on CI in `msrv.yml`, after the MSRV toolchain is installed and set as
245
-
# default, and after dependencies in `Cargo.lock` are downgraded to the latest MSRV-compatible
246
-
# versions. Only if those or similar steps are done first does this work to validate the MSRV.
247
-
#
248
-
# Check the MSRV, *if* the toolchain is set and `Cargo.lock` is downgraded (used on CI)
249
-
ci-check-msrv:
250
-
rustc --version
251
-
cargo build --locked -p gix
252
-
cargo build --locked -p gix --no-default-features --features async-network-client,max-performance
244
+
# Report the Minimum Supported Rust Version (the `rust-version` of `gix`) in X.Y.Z form
245
+
msrv:
246
+
set -eu; \
247
+
query='.packages[] | select(.name == "gix") | .rust_version'; \
248
+
value="$({{ j }} get-metadata "$query")"; \
249
+
case "$value" in \
250
+
*.*.*) \
251
+
echo "$value" ;; \
252
+
*.*) \
253
+
echo "$value.0" ;; \
254
+
*) \
255
+
echo "No '.' in gix rust-version '$value'" >&2; \
256
+
exit 1 ;; \
257
+
esac
258
+
259
+
# Regenerate the MSRV badge SVG
260
+
msrv-badge:
261
+
msrv="$({{ j }} msrv)" && \
262
+
sed "s/{MSRV}/$msrv/g" etc/msrv-badge.template.svg >etc/msrv-badge.svg
263
+
264
+
# Check if `gix` and its dependencies, as currently locked, build with `rust-version`
265
+
check-rust-version rust-version:
266
+
rustc +{{ rust-version }} --version
267
+
cargo +{{ rust-version }} build --locked -p gix
268
+
cargo +{{ rust-version }} build --locked -p gix \
269
+
--no-default-features --features async-network-client,max-performance
253
270
254
271
# Enter a nix-shell able to build on macOS
255
272
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