Skip to content

Commit 6d8901c

Browse files
authored
Merge branch 'main' into timeout-fixes-squashed
2 parents 69a6e61 + 2839f78 commit 6d8901c

112 files changed

Lines changed: 3189 additions & 1048 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.

.github/workflows/CICD.yml

Lines changed: 16 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ jobs:
9898
env:
9999
SCCACHE_GHA_ENABLED: "true"
100100
RUSTC_WRAPPER: "sccache"
101+
CARGO_INCREMENTAL: 0
101102
strategy:
102103
fail-fast: false
103104
matrix:
@@ -163,6 +164,7 @@ jobs:
163164
env:
164165
SCCACHE_GHA_ENABLED: "true"
165166
RUSTC_WRAPPER: "sccache"
167+
CARGO_INCREMENTAL: 0
166168
strategy:
167169
matrix:
168170
job:
@@ -269,6 +271,7 @@ jobs:
269271
env:
270272
SCCACHE_GHA_ENABLED: "true"
271273
RUSTC_WRAPPER: "sccache"
274+
CARGO_INCREMENTAL: 0
272275
strategy:
273276
fail-fast: false
274277
matrix:
@@ -405,6 +408,7 @@ jobs:
405408
env:
406409
SCCACHE_GHA_ENABLED: "true"
407410
RUSTC_WRAPPER: "sccache"
411+
CARGO_INCREMENTAL: 0
408412
strategy:
409413
fail-fast: false
410414
matrix:
@@ -444,6 +448,7 @@ jobs:
444448
env:
445449
SCCACHE_GHA_ENABLED: "true"
446450
RUSTC_WRAPPER: "sccache"
451+
CARGO_INCREMENTAL: 0
447452
strategy:
448453
fail-fast: false
449454
matrix:
@@ -484,6 +489,7 @@ jobs:
484489
env:
485490
SCCACHE_GHA_ENABLED: "true"
486491
RUSTC_WRAPPER: "sccache"
492+
CARGO_INCREMENTAL: 0
487493
strategy:
488494
fail-fast: false
489495
matrix:
@@ -610,6 +616,7 @@ jobs:
610616
DOCKER_OPTS: '--volume /etc/passwd:/etc/passwd --volume /etc/group:/etc/group'
611617
SCCACHE_GHA_ENABLED: "true"
612618
RUSTC_WRAPPER: "sccache"
619+
CARGO_INCREMENTAL: 0
613620
strategy:
614621
fail-fast: false
615622
matrix:
@@ -848,16 +855,8 @@ jobs:
848855
run: |
849856
## Test
850857
${{ steps.vars.outputs.CARGO_CMD }} ${{ steps.vars.outputs.CARGO_CMD_OPTIONS }} test --target=${{ matrix.job.target }} \
851-
${{ steps.vars.outputs.CARGO_TEST_OPTIONS}} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} ${{ steps.vars.outputs.CARGO_DEFAULT_FEATURES_OPTION }}
852-
env:
853-
RUST_BACKTRACE: "1"
854-
- name: Test individual utilities
855-
if: matrix.job.skip-tests != true
856-
shell: bash
857-
run: |
858-
## Test individual utilities
859-
${{ steps.vars.outputs.CARGO_CMD }} ${{ steps.vars.outputs.CARGO_CMD_OPTIONS }} test --target=${{ matrix.job.target }} \
860-
${{ matrix.job.cargo-options }} ${{ steps.dep_vars.outputs.CARGO_UTILITY_LIST_OPTIONS }}
858+
${{ steps.vars.outputs.CARGO_TEST_OPTIONS}} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} ${{ steps.vars.outputs.CARGO_DEFAULT_FEATURES_OPTION }} \
859+
${{ steps.dep_vars.outputs.CARGO_UTILITY_LIST_OPTIONS }} -p coreutils
861860
env:
862861
RUST_BACKTRACE: "1"
863862
- name: Archive executable artifacts
@@ -928,6 +927,7 @@ jobs:
928927
env:
929928
SCCACHE_GHA_ENABLED: "true"
930929
RUSTC_WRAPPER: "sccache"
930+
CARGO_INCREMENTAL: 0
931931
strategy:
932932
fail-fast: false
933933
matrix:
@@ -1009,6 +1009,7 @@ jobs:
10091009
env:
10101010
SCCACHE_GHA_ENABLED: "true"
10111011
RUSTC_WRAPPER: "sccache"
1012+
CARGO_INCREMENTAL: 0
10121013
strategy:
10131014
fail-fast: false
10141015
matrix:
@@ -1102,6 +1103,7 @@ jobs:
11021103
env:
11031104
SCCACHE_GHA_ENABLED: "true"
11041105
RUSTC_WRAPPER: "sccache"
1106+
CARGO_INCREMENTAL: 0
11051107
strategy:
11061108
fail-fast: false
11071109
matrix:
@@ -1226,7 +1228,7 @@ jobs:
12261228
fail_ci_if_error: false
12271229

12281230
test_separately:
1229-
name: Separate Builds
1231+
name: Separate Builds (individual and coreutils)# duplicated with other CI, but has better appearance
12301232
runs-on: ${{ matrix.job.os }}
12311233
strategy:
12321234
fail-fast: false
@@ -1236,48 +1238,21 @@ jobs:
12361238
- { os: macos-latest , features: feat_os_macos }
12371239
- { os: windows-latest , features: feat_os_windows }
12381240
steps:
1239-
- uses: actions/checkout@v6
1240-
with:
1241-
persist-credentials: false
1242-
- uses: dtolnay/rust-toolchain@stable
1243-
- uses: Swatinem/rust-cache@v2
1244-
- name: build and test all programs individually
1245-
shell: bash
1246-
run: |
1247-
CARGO_FEATURES_OPTION='--features=${{ matrix.job.features }}' ;
1248-
for f in $(util/show-utils.sh ${CARGO_FEATURES_OPTION})
1249-
do
1250-
echo "Building and testing $f"
1251-
cargo test -p "uu_$f"
1252-
done
1253-
1254-
test_all_features:
1255-
name: Test all features separately
1256-
needs: [ min_version, deps ]
1257-
runs-on: ${{ matrix.job.os }}
1258-
strategy:
1259-
fail-fast: false
1260-
matrix:
1261-
job:
1262-
- { os: ubuntu-latest , features: feat_os_unix }
1263-
- { os: macos-latest , features: feat_os_macos }
1264-
# - { os: windows-latest , features: feat_os_windows } https://github.com/uutils/coreutils/issues/7044
1265-
steps:
12661241
- uses: actions/checkout@v6
12671242
with:
12681243
persist-credentials: false
12691244
- name: Avoid no space left on device
12701245
run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android &
12711246
- uses: dtolnay/rust-toolchain@stable
12721247
- uses: Swatinem/rust-cache@v2
1273-
- name: build and test all features individually
1248+
- name: build and test all programs individually
12741249
shell: bash
12751250
run: |
12761251
CARGO_FEATURES_OPTION='--features=${{ matrix.job.features }}' ;
12771252
for f in $(util/show-utils.sh ${CARGO_FEATURES_OPTION})
12781253
do
1279-
echo "Running tests with --features=$f and --no-default-features"
1280-
cargo test --features=$f --no-default-features
1254+
echo "Building and testing $f"
1255+
cargo test -p "uu_$f" -p coreutils --features=$f --no-default-features
12811256
done
12821257
12831258
test_selinux:

.github/workflows/benchmarks.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,13 @@ jobs:
2020
benchmarks:
2121
name: Run ${{ matrix.type }} benchmarks for ${{ matrix.package }} (CodSpeed)
2222
runs-on: ubuntu-latest
23+
env:
24+
RUSTC_WRAPPER: sccache
25+
CARGO_INCREMENTAL: 0
26+
SCCACHE_GHA_ENABLED: "true"
2327
strategy:
2428
matrix:
25-
type: [performance] # , memory] # memory profile disabled due to variance
29+
type: [simulation] # , memory] # memory profile disabled due to variance
2630
package: [
2731
uu_base64,
2832
uu_cksum,
@@ -78,18 +82,14 @@ jobs:
7882
shell: bash
7983
run: |
8084
echo "Building ${{ matrix.type }} benchmarks for ${{ matrix.package }}"
81-
if [ "${{ matrix.type }}" = "memory" ]; then
82-
cargo codspeed build -m analysis -p ${{ matrix.package }}
83-
else
84-
cargo codspeed build -p ${{ matrix.package }}
85-
fi
85+
cargo codspeed build -m ${{ matrix.type }} -p ${{ matrix.package }}
8686
8787
- name: Run ${{ matrix.type }} benchmarks for ${{ matrix.package }}
8888
uses: CodSpeedHQ/action@v4
8989
env:
9090
CODSPEED_LOG: debug
9191
with:
92-
mode: ${{ matrix.type == 'memory' && 'memory' || 'simulation' }}
92+
mode: ${{ matrix.type }}
9393
run: |
9494
echo "Running ${{ matrix.type }} benchmarks for ${{ matrix.package }}"
9595
cargo codspeed run -p ${{ matrix.package }} > /dev/null

.github/workflows/code-quality.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ jobs:
7474
env:
7575
SCCACHE_GHA_ENABLED: "true"
7676
RUSTC_WRAPPER: "sccache"
77+
CARGO_INCREMENTAL: 0
7778
strategy:
7879
fail-fast: false
7980
matrix:
@@ -147,6 +148,12 @@ jobs:
147148
CARGO_UTILITY_LIST_OPTIONS="$(for u in ${UTILITY_LIST}; do echo -n "-puu_${u} "; done;)"
148149
S=$(cargo clippy --all-targets $extra --tests --benches -pcoreutils ${CARGO_UTILITY_LIST_OPTIONS} -- -D warnings 2>&1) && printf "%s\n" "$S" || { printf "%s\n" "$S" ; printf "%s" "$S" | sed -E -n -e '/^error:/{' -e "N; s/^error:[[:space:]]+(.*)\\n[[:space:]]+-->[[:space:]]+(.*):([0-9]+):([0-9]+).*$/::${fault_type} file=\2,line=\3,col=\4::${fault_prefix}: \`cargo clippy\`: \1 (file:'\2', line:\3)/p;" -e '}' ; fault=true ; }
149150
if [ -n "${{ steps.vars.outputs.FAIL_ON_FAULT }}" ] && [ -n "$fault" ]; then exit 1 ; fi
151+
- name: "cargo clippy on fuzz dir"
152+
if: runner.os != 'Windows'
153+
shell: bash
154+
run: |
155+
cd fuzz
156+
cargo clippy --workspace --all-targets --all-features -- -D warnings
150157
151158
style_spellcheck:
152159
name: Style/spelling

.github/workflows/freebsd.yml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: FreeBSD
22

3-
# spell-checker:ignore sshfs usesh vmactions taiki Swatinem esac fdescfs fdesc sccache nextest copyback logind
3+
# spell-checker:ignore sshfs usesh vmactions taiki Swatinem esac fdescfs fdesc nextest copyback logind
44

55
env:
66
# * style job configuration
@@ -30,18 +30,10 @@ jobs:
3030
matrix:
3131
job:
3232
- { os: ubuntu-24.04 , features: unix }
33-
env:
34-
SCCACHE_GHA_ENABLED: "true"
35-
RUSTC_WRAPPER: "sccache"
3633
steps:
3734
- uses: actions/checkout@v6
3835
with:
3936
persist-credentials: false
40-
- uses: Swatinem/rust-cache@v2
41-
- name: Run sccache-cache
42-
uses: mozilla-actions/sccache-action@v0.0.9
43-
with:
44-
disable_annotations: true
4537
- name: Prepare, build and test
4638
uses: vmactions/freebsd-vm@v1.2.9
4739
with:
@@ -101,6 +93,7 @@ jobs:
10193
# To ensure that files are cleaned up, we don't want to exit on error
10294
set +e
10395
unset FAULT
96+
export CARGO_INCREMENTAL=0
10497
## cargo fmt testing
10598
echo "## cargo fmt testing"
10699
# * convert any errors/warnings to GHA UI annotations; ref: <https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-a-warning-message>
@@ -127,19 +120,12 @@ jobs:
127120
- { os: ubuntu-24.04 , features: unix }
128121
env:
129122
mem: 4096
130-
SCCACHE_GHA_ENABLED: "true"
131-
RUSTC_WRAPPER: "sccache"
132123
steps:
133124
- uses: actions/checkout@v6
134125
with:
135126
persist-credentials: false
136127
- name: Avoid no space left on device (Ubuntu runner)
137128
run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android &
138-
- uses: Swatinem/rust-cache@v2
139-
- name: Run sccache-cache
140-
uses: mozilla-actions/sccache-action@v0.0.9
141-
with:
142-
disable_annotations: true
143129
- name: Prepare, build and test
144130
uses: vmactions/freebsd-vm@v1.2.9
145131
with:
@@ -194,6 +180,7 @@ jobs:
194180
set +e
195181
cd "${WORKSPACE}"
196182
unset FAULT
183+
export CARGO_INCREMENTAL=0
197184
export RUSTFLAGS="-C strip=symbols" # for disk space
198185
cargo build || FAULT=1
199186
export PATH=~/.cargo/bin:${PATH}

.github/workflows/fuzzing.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,11 @@ jobs:
9292
- { name: fuzz_env, should_pass: false }
9393
- { name: fuzz_cksum, should_pass: false }
9494
- { name: fuzz_parse_glob, should_pass: true }
95-
- { name: fuzz_parse_size, should_pass: true }
96-
- { name: fuzz_parse_time, should_pass: true }
95+
- { name: fuzz_parse_size, should_pass: false }
96+
- { name: fuzz_parse_time, should_pass: false }
9797
- { name: fuzz_seq_parse_number, should_pass: false }
9898
- { name: fuzz_non_utf8_paths, should_pass: true }
99+
- { name: fuzz_dirname, should_pass: true }
99100

100101
steps:
101102
- uses: actions/checkout@v6
@@ -117,7 +118,7 @@ jobs:
117118
- name: Run ${{ matrix.test-target.name }} for XX seconds
118119
id: run_fuzzer
119120
shell: bash
120-
continue-on-error: ${{ !matrix.test-target.name.should_pass }}
121+
continue-on-error: ${{ !matrix.test-target.should_pass }}
121122
run: |
122123
mkdir -p fuzz/stats
123124
STATS_FILE="fuzz/stats/${{ matrix.test-target.name }}.txt"
@@ -155,7 +156,7 @@ jobs:
155156
echo "Runs: $(grep -q "stat::number_of_executed_units" "$STATS_FILE" && grep "stat::number_of_executed_units" "$STATS_FILE" | awk '{print $2}' || echo "unknown")"
156157
echo "Execution Rate: $(grep -q "stat::average_exec_per_sec" "$STATS_FILE" && grep "stat::average_exec_per_sec" "$STATS_FILE" | awk '{print $2}' || echo "unknown") execs/sec"
157158
echo "New Units: $(grep -q "stat::new_units_added" "$STATS_FILE" && grep "stat::new_units_added" "$STATS_FILE" | awk '{print $2}' || echo "unknown")"
158-
echo "Expected: ${{ matrix.test-target.name.should_pass }}"
159+
echo "Expected: ${{ matrix.test-target.should_pass }}"
159160
if grep -q "SUMMARY: " "$STATS_FILE"; then
160161
echo "Status: $(grep "SUMMARY: " "$STATS_FILE" | head -1)"
161162
else

.github/workflows/l10n.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
env:
2929
SCCACHE_GHA_ENABLED: "true"
3030
RUSTC_WRAPPER: "sccache"
31+
CARGO_INCREMENTAL: 0
3132
strategy:
3233
fail-fast: false
3334
matrix:
@@ -130,6 +131,7 @@ jobs:
130131
env:
131132
SCCACHE_GHA_ENABLED: "true"
132133
RUSTC_WRAPPER: "sccache"
134+
CARGO_INCREMENTAL: 0
133135
steps:
134136
- uses: actions/checkout@v6
135137
with:
@@ -300,6 +302,7 @@ jobs:
300302
env:
301303
SCCACHE_GHA_ENABLED: "true"
302304
RUSTC_WRAPPER: "sccache"
305+
CARGO_INCREMENTAL: 0
303306
steps:
304307
- uses: actions/checkout@v6
305308
with:
@@ -409,6 +412,7 @@ jobs:
409412
env:
410413
SCCACHE_GHA_ENABLED: "true"
411414
RUSTC_WRAPPER: "sccache"
415+
CARGO_INCREMENTAL: 0
412416
strategy:
413417
fail-fast: false
414418
matrix:
@@ -560,6 +564,7 @@ jobs:
560564
env:
561565
SCCACHE_GHA_ENABLED: "true"
562566
RUSTC_WRAPPER: "sccache"
567+
CARGO_INCREMENTAL: 0
563568
strategy:
564569
fail-fast: false
565570
matrix:
@@ -899,6 +904,7 @@ jobs:
899904
env:
900905
SCCACHE_GHA_ENABLED: "true"
901906
RUSTC_WRAPPER: "sccache"
907+
CARGO_INCREMENTAL: 0
902908
steps:
903909
- uses: actions/checkout@v6
904910
with:
@@ -1130,6 +1136,7 @@ jobs:
11301136
env:
11311137
SCCACHE_GHA_ENABLED: "true"
11321138
RUSTC_WRAPPER: "sccache"
1139+
CARGO_INCREMENTAL: 0
11331140
steps:
11341141
- uses: actions/checkout@v6
11351142
with:
@@ -1251,6 +1258,7 @@ jobs:
12511258
env:
12521259
SCCACHE_GHA_ENABLED: "true"
12531260
RUSTC_WRAPPER: "sccache"
1261+
CARGO_INCREMENTAL: 0
12541262
steps:
12551263
- uses: actions/checkout@v6
12561264
with:

0 commit comments

Comments
 (0)