Skip to content

Commit abb9966

Browse files
authored
Merge branch 'main' into patch/sync-check-all
2 parents f11f72a + a7a3100 commit abb9966

284 files changed

Lines changed: 4736 additions & 4160 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ switch_case_indent = true
5757
end_of_line = crlf
5858
insert_final_newline = false
5959

60+
[*.toml]
61+
indent_size = 2
62+
indent_style = space
63+
6064
[*.{yaml,yml,[Yy][Mm][Ll],[Yy][Aa][Mm][Ll]}]
6165
# YAML
6266
indent_size = 2

.github/workflows/CICD.yml

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -548,14 +548,14 @@ jobs:
548548
--arg multisize "$SIZE_MULTI" \
549549
'{($date): { sha: $sha, size: $size, multisize: $multisize, }}' > size-result.json
550550
- name: Download the previous individual size result
551-
uses: dawidd6/action-download-artifact@v13
551+
uses: dawidd6/action-download-artifact@v14
552552
with:
553553
workflow: CICD.yml
554554
name: individual-size-result
555555
repo: uutils/coreutils
556556
path: dl
557557
- name: Download the previous size result
558-
uses: dawidd6/action-download-artifact@v13
558+
uses: dawidd6/action-download-artifact@v14
559559
with:
560560
workflow: CICD.yml
561561
name: size-result
@@ -701,7 +701,11 @@ jobs:
701701
outputs TARGET_ARCH TARGET_OS
702702
# package name
703703
PKG_suffix=".tar.gz" ; case '${{ matrix.job.target }}' in *-pc-windows-*) PKG_suffix=".zip" ;; esac;
704-
PKG_BASENAME=${PROJECT_NAME}-${{ matrix.job.target }}
704+
# Some 3rd party utils need version at file names
705+
# But we remove it from tag/latest-commit
706+
test ${REF_TAG} \
707+
&& PKG_BASENAME=${PROJECT_NAME}-${REF_TAG}-${{ matrix.job.target }} \
708+
|| PKG_BASENAME=${PROJECT_NAME}-${{ matrix.job.target }}
705709
PKG_NAME=${PKG_BASENAME}${PKG_suffix}
706710
outputs PKG_suffix PKG_BASENAME PKG_NAME
707711
# deployable tag? (ie, leading "vM" or "M"; M == version number)
@@ -841,12 +845,6 @@ jobs:
841845
echo "## dependency list"
842846
cargo fetch --locked --quiet --target $(rustc --print host-tuple)
843847
cargo tree --locked --target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} ${{ steps.vars.outputs.CARGO_DEFAULT_FEATURES_OPTION }} --no-dedupe -e=no-dev --prefix=none | grep -vE "$PWD" | sort --unique
844-
- name: Build
845-
shell: bash
846-
run: |
847-
## Build
848-
${{ steps.vars.outputs.CARGO_CMD }} ${{ steps.vars.outputs.CARGO_CMD_OPTIONS }} build --release --config=profile.release.strip=true \
849-
--target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} ${{ steps.vars.outputs.CARGO_DEFAULT_FEATURES_OPTION }}
850848
- name: Test
851849
if: matrix.job.skip-tests != true
852850
shell: bash
@@ -857,13 +855,15 @@ jobs:
857855
${{ steps.dep_vars.outputs.CARGO_UTILITY_LIST_OPTIONS }} -p coreutils
858856
env:
859857
RUST_BACKTRACE: "1"
860-
- name: Archive executable artifacts
861-
uses: actions/upload-artifact@v6
862-
with:
863-
name: ${{ env.PROJECT_NAME }}-${{ matrix.job.target }}${{ steps.vars.outputs.ARTIFACTS_SUFFIX }}
864-
path: target/${{ matrix.job.target }}/release/${{ env.PROJECT_NAME }}${{ steps.vars.outputs.EXE_suffix }}
858+
- name: Build
859+
shell: bash
860+
if: matrix.job.skip-publish != true
861+
run: |
862+
## Build
863+
${{ steps.vars.outputs.CARGO_CMD }} ${{ steps.vars.outputs.CARGO_CMD_OPTIONS }} build --release --config=profile.release.strip=true \
864+
--target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} ${{ steps.vars.outputs.CARGO_DEFAULT_FEATURES_OPTION }}
865865
- name: Package
866-
if: matrix.job.skip-package != true
866+
if: matrix.job.skip-publish != true
867867
shell: bash
868868
run: |
869869
## Package artifact(s)
@@ -910,6 +910,8 @@ jobs:
910910
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && matrix.job.skip-publish != true
911911
with:
912912
tag_name: latest-commit
913+
body: |
914+
commit: ${{ github.sha }}
913915
draft: false
914916
prerelease: true
915917
files: |
@@ -1225,7 +1227,8 @@ jobs:
12251227
fail_ci_if_error: false
12261228

12271229
test_separately:
1228-
name: Separate Builds (individual and coreutils)# duplicated with other CI, but has better appearance
1230+
# duplicated with other CI, but has better appearance
1231+
name: Separate Builds (individual and coreutils)
12291232
runs-on: ${{ matrix.job.os }}
12301233
strategy:
12311234
fail-fast: false

.github/workflows/GnuComment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ jobs:
5959
issue_number: issue_number,
6060
body: 'GNU testsuite comparison:\n```\n' + content + '```'
6161
});
62-
}
62+
}

.github/workflows/GnuTests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ jobs:
372372
path: 'uutils'
373373
persist-credentials: false
374374
- name: Retrieve reference artifacts
375-
uses: dawidd6/action-download-artifact@v13
375+
uses: dawidd6/action-download-artifact@v14
376376
# ref: <https://github.com/dawidd6/action-download-artifact>
377377
continue-on-error: true ## don't break the build for missing reference artifacts (may be expired or just not generated yet)
378378
with:

.github/workflows/benchmarks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
SCCACHE_GHA_ENABLED: "true"
2727
strategy:
2828
matrix:
29-
type: [simulation] # , memory] # memory profile disabled due to variance
29+
type: [simulation, memory]
3030
package: [
3131
uu_base64,
3232
uu_cksum,

.github/workflows/freebsd.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
with:
3636
persist-credentials: false
3737
- name: Prepare, build and test
38-
uses: vmactions/freebsd-vm@v1.2.9
38+
uses: vmactions/freebsd-vm@v1.3.9
3939
with:
4040
usesh: true
4141
sync: rsync
@@ -127,7 +127,7 @@ jobs:
127127
- name: Avoid no space left on device (Ubuntu runner)
128128
run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android &
129129
- name: Prepare, build and test
130-
uses: vmactions/freebsd-vm@v1.2.9
130+
uses: vmactions/freebsd-vm@v1.3.9
131131
with:
132132
usesh: true
133133
sync: rsync

.github/workflows/fuzzing.yml

Lines changed: 21 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Fuzzing
22

3-
# spell-checker:ignore fuzzer dtolnay Swatinem
3+
# spell-checker:ignore (people) dtolnay Swatinem taiki-e
4+
# spell-checker:ignore (misc) fuzzer
45

56
on:
67
pull_request:
@@ -19,16 +20,13 @@ concurrency:
1920
jobs:
2021
uufuzz-examples:
2122
name: Build and test uufuzz examples
23+
env:
24+
CARGO_INCREMENTAL: 0
2225
runs-on: ubuntu-latest
2326
steps:
2427
- uses: actions/checkout@v6
2528
with:
2629
persist-credentials: false
27-
- uses: dtolnay/rust-toolchain@stable
28-
- uses: Swatinem/rust-cache@v2
29-
with:
30-
shared-key: "uufuzz-cache-key"
31-
cache-directories: "fuzz/target"
3230
- name: Build uufuzz library
3331
run: |
3432
cd fuzz/uufuzz
@@ -59,15 +57,16 @@ jobs:
5957
with:
6058
persist-credentials: false
6159
- name: Install `cargo-fuzz`
62-
run: |
63-
echo "RUSTC_BOOTSTRAP=1" >> "${GITHUB_ENV}" # Use -Z
64-
cargo install cargo-fuzz --locked
65-
- uses: Swatinem/rust-cache@v2
60+
uses: taiki-e/install-action@v2
6661
with:
67-
shared-key: "cargo-fuzz-cache-key"
68-
cache-directories: "fuzz/target"
62+
tool: cargo-fuzz
63+
- name: Emulate a nightly toolchain
64+
run: |
65+
echo "RUSTC_BOOTSTRAP=1" >> "${GITHUB_ENV}"
6966
- name: Run `cargo-fuzz build`
70-
run: cargo fuzz build
67+
# Force the correct target
68+
# https://github.com/rust-fuzz/cargo-fuzz/issues/398
69+
run: cargo fuzz build --target $(rustc --print host-tuple)
7170

7271
fuzz-run:
7372
needs: fuzz-build
@@ -76,6 +75,7 @@ jobs:
7675
timeout-minutes: 5
7776
env:
7877
RUN_FOR: 60
78+
CARGO_INCREMENTAL: 0
7979
strategy:
8080
matrix:
8181
test-target:
@@ -104,27 +104,22 @@ jobs:
104104
with:
105105
persist-credentials: false
106106
- name: Install `cargo-fuzz`
107-
run: |
108-
echo "RUSTC_BOOTSTRAP=1" >> "${GITHUB_ENV}" # Use nightly
109-
cargo install cargo-fuzz --locked
110-
- uses: Swatinem/rust-cache@v2
107+
uses: taiki-e/install-action@v2
111108
with:
112-
shared-key: "cargo-fuzz-cache-key"
113-
cache-directories: "fuzz/target"
114-
- name: Restore Cached Corpus
115-
uses: actions/cache/restore@v5
116-
with:
117-
key: corpus-cache-${{ matrix.test-target.name }}
118-
path: |
119-
fuzz/corpus/${{ matrix.test-target.name }}
109+
tool: cargo-fuzz
110+
- name: Emulate a nightly toolchain
111+
run: |
112+
echo "RUSTC_BOOTSTRAP=1" >> "${GITHUB_ENV}"
120113
- name: Run ${{ matrix.test-target.name }} for XX seconds
121114
id: run_fuzzer
122115
shell: bash
123116
continue-on-error: ${{ !matrix.test-target.should_pass }}
124117
run: |
125118
mkdir -p fuzz/stats
126119
STATS_FILE="fuzz/stats/${{ matrix.test-target.name }}.txt"
127-
cargo fuzz run ${{ matrix.test-target.name }} -- -max_total_time=${{ env.RUN_FOR }} -timeout=${{ env.RUN_FOR }} -detect_leaks=0 -print_final_stats=1 2>&1 | tee "$STATS_FILE"
120+
# Force the correct target
121+
# https://github.com/rust-fuzz/cargo-fuzz/issues/398
122+
cargo fuzz run --target $(rustc --print host-tuple) ${{ matrix.test-target.name }} -- -max_total_time=${{ env.RUN_FOR }} -timeout=${{ env.RUN_FOR }} -detect_leaks=0 -print_final_stats=1 2>&1 | tee "$STATS_FILE"
128123
129124
# Extract key stats from the output
130125
if grep -q "stat::number_of_executed_units" "$STATS_FILE"; then
@@ -193,12 +188,6 @@ jobs:
193188
fi
194189
195190
echo "" >> $GITHUB_STEP_SUMMARY
196-
- name: Save Corpus Cache
197-
uses: actions/cache/save@v5
198-
with:
199-
key: corpus-cache-${{ matrix.test-target.name }}
200-
path: |
201-
fuzz/corpus/${{ matrix.test-target.name }}
202191
- name: Upload Stats
203192
uses: actions/upload-artifact@v6
204193
with:

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@ lib*.a
2121

2222
### direnv ###
2323
/.direnv/
24+
25+
*.code-workspace

.markdownlint.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@ MD013: false
33
# Disable 'Fenced code blocks should have a language specified'
44
# Doesn't provide much in src/ to enforce it
55
MD040: false
6-

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ repos:
77
- id: check-added-large-files
88
- id: check-executables-have-shebangs
99
- id: check-json
10-
exclude: '.vscode/cSpell\.json' # cSpell.json uses comments
10+
exclude: '\.vscode/(cSpell|extensions)\.json' # cSpell.json and extensions.json use comments
1111
- id: check-shebang-scripts-are-executable
1212
exclude: '.+\.rs' # would be triggered by #![some_attribute]
1313
- id: check-symlinks

0 commit comments

Comments
 (0)