Skip to content

Commit 57beee7

Browse files
Merge branch 'uutils:main' into Fix-both-files-can-return-an-error
2 parents d446f97 + c624dc4 commit 57beee7

File tree

4 files changed

+30
-8
lines changed

4 files changed

+30
-8
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,15 @@ jobs:
5757
- run: cargo clippy -- -D warnings
5858

5959
gnu-testsuite:
60+
permissions:
61+
contents: write # Publish diffutils instead of discarding
6062
name: GNU test suite
6163
runs-on: ubuntu-latest
6264
steps:
6365
- uses: actions/checkout@v4
64-
- run: cargo build --release
66+
- run: |
67+
cargo build --config=profile.release.strip=true --profile=release #-fast
68+
zstd -19 target/release/diffutils -o diffutils-x86_64-unknown-linux-gnu.zst
6569
# do not fail, the report is merely informative (at least until all tests pass reliably)
6670
- run: ./tests/run-upstream-testsuite.sh release || true
6771
env:
@@ -71,6 +75,17 @@ jobs:
7175
name: test-results.json
7276
path: tests/test-results.json
7377
- run: ./tests/print-test-results.sh tests/test-results.json
78+
- name: Publish latest commit
79+
uses: softprops/action-gh-release@v2
80+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
81+
with:
82+
tag_name: latest-commit
83+
draft: false
84+
prerelease: true
85+
files: |
86+
diffutils-x86_64-unknown-linux-gnu.zst
87+
env:
88+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7489

7590
coverage:
7691
name: Code Coverage

.github/workflows/codspeed.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- uses: actions/checkout@v4
2222

2323
- name: Setup rust toolchain, cache and cargo-codspeed binary
24-
uses: moonrepo/setup-rust@v0
24+
uses: moonrepo/setup-rust@v1
2525
with:
2626
channel: stable
2727
cache-target: release

.github/workflows/fuzzing.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,17 @@ jobs:
2121
runs-on: ubuntu-latest
2222
steps:
2323
- uses: actions/checkout@v4
24-
- uses: dtolnay/rust-toolchain@nightly
2524
- name: Install `cargo-fuzz`
26-
run: cargo install cargo-fuzz
25+
run: |
26+
echo "RUSTC_BOOTSTRAP=1" >> "${GITHUB_ENV}"
27+
echo "CARGO_INCREMENTAL=0" >> "${GITHUB_ENV}"
28+
cargo install cargo-fuzz --locked
2729
- uses: Swatinem/rust-cache@v2
2830
with:
2931
shared-key: "cargo-fuzz-cache-key"
3032
cache-directories: "fuzz/target"
3133
- name: Run `cargo-fuzz build`
32-
run: cargo +nightly fuzz build
34+
run: cargo fuzz build
3335

3436
fuzz-run:
3537
needs: fuzz-build
@@ -49,9 +51,11 @@ jobs:
4951
- { name: fuzz_side, should_pass: true }
5052
steps:
5153
- uses: actions/checkout@v4
52-
- uses: dtolnay/rust-toolchain@nightly
5354
- name: Install `cargo-fuzz`
54-
run: cargo install cargo-fuzz
55+
run: |
56+
echo "RUSTC_BOOTSTRAP=1" >> "${GITHUB_ENV}"
57+
echo "CARGO_INCREMENTAL=0" >> "${GITHUB_ENV}"
58+
cargo install cargo-fuzz --locked
5559
- uses: Swatinem/rust-cache@v2
5660
with:
5761
shared-key: "cargo-fuzz-cache-key"
@@ -66,7 +70,7 @@ jobs:
6670
shell: bash
6771
continue-on-error: ${{ !matrix.test-target.name.should_pass }}
6872
run: |
69-
cargo +nightly fuzz run ${{ matrix.test-target.name }} -- -max_total_time=${{ env.RUN_FOR }} -detect_leaks=0
73+
cargo fuzz run ${{ matrix.test-target.name }} -- -max_total_time=${{ env.RUN_FOR }} -detect_leaks=0
7074
- name: Save Corpus Cache
7175
uses: actions/cache/save@v5
7276
with:

src/cmp.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,6 +1085,9 @@ mod tests {
10851085
from: os("foo"),
10861086
to: os("bar"),
10871087
skip_a: Some(1_000_000_000),
1088+
#[cfg(target_pointer_width = "32")]
1089+
skip_b: Some((2_147_483_647.5 * 2.0) as usize),
1090+
#[cfg(target_pointer_width = "64")]
10881091
skip_b: Some(1_152_921_504_606_846_976 * 2),
10891092
..Default::default()
10901093
}),

0 commit comments

Comments
 (0)