Skip to content

Commit 3356b00

Browse files
committed
Merge remote-tracking branch 'upstream/main' into date_9959
# Conflicts: # src/uu/date/src/date.rs
2 parents efe0067 + 289d701 commit 3356b00

600 files changed

Lines changed: 20572 additions & 8020 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.

.cargo/config.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@ linker = "x86_64-unknown-redox-gcc"
88
linker = "aarch64-linux-gnu-gcc"
99
[target.riscv64gc-unknown-linux-musl]
1010
rustflags = ["-C", "target-feature=+crt-static"]
11+
[target.'cfg(target_env = "msvc")']
12+
rustflags = ["-C", "target-feature=+crt-static"]
1113

1214
[env]
1315
# See feat_external_libstdbuf in src/uu/stdbuf/Cargo.toml
1416
LIBSTDBUF_DIR = "/usr/local/libexec/coreutils"
17+
18+
# remove me
19+
[build]
20+
rustflags = ["-A", "clippy::collapsible_if"]

.clippy.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
msrv = "1.85.0"
21
avoid-breaking-exported-api = false
32
check-private-items = true
43
cognitive-complexity-threshold = 24
54
missing-docs-in-crate-items = true
5+
allow-mixed-uninlined-format-args = false

.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: 97 additions & 114 deletions
Large diffs are not rendered by default.

.github/workflows/FixPR.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
echo "## dependency list"
6868
cargo fetch --locked --quiet --target $(rustc --print host-tuple)
6969
## * using the 'stable' toolchain is necessary to avoid "unexpected '--filter-platform'" errors
70-
RUSTUP_TOOLCHAIN=stable cargo tree --locked --no-dedupe -e=no-dev --prefix=none --features ${{ matrix.job.features }} | grep -vE "$PWD" | sort --unique
70+
cargo +stable tree --locked --no-dedupe -e=no-dev --prefix=none --features ${{ matrix.job.features }} | grep -vE "$PWD" | sort --unique
7171
- name: Commit any changes (to '${{ env.BRANCH_TARGET }}')
7272
uses: EndBug/add-and-commit@v9
7373
with:

.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: 5 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ name: GnuTests
66
# spell-checker:ignore (options) Ccodegen Coverflow Cpanic Zpanic
77
# spell-checker:ignore (people) Dawid Dziurla * dawidd dtolnay
88
# spell-checker:ignore (vars) FILESET SUBDIRS XPASS
9-
# spell-checker:ignore userns
9+
# spell-checker:ignore userns nodocs
1010

1111
# * note: to run a single test => `REPO/util/run-gnu-test.sh PATH/TO/TEST/SCRIPT`
1212

@@ -38,29 +38,17 @@ jobs:
3838
name: Run GNU tests (native)
3939
runs-on: ubuntu-24.04
4040
steps:
41-
#### Get the code, setup cache
41+
#### Get the code
4242
- name: Checkout code (uutils)
4343
uses: actions/checkout@v6
4444
with:
4545
path: 'uutils'
4646
persist-credentials: false
47-
- uses: dtolnay/rust-toolchain@master
48-
with:
49-
toolchain: stable
5047
- uses: Swatinem/rust-cache@v2
5148
with:
5249
workspaces: "./uutils -> target"
5350
- name: Checkout code (GNU coreutils)
5451
run: (mkdir -p gnu && cd gnu && bash ../uutils/util/fetch-gnu.sh)
55-
- name: Restore files for faster configure and skipping make
56-
uses: actions/cache@v5
57-
id: cache-config-gnu
58-
with:
59-
path: |
60-
gnu/config.cache
61-
gnu/src/getlimits
62-
key: ${{ runner.os }}-gnu-config-${{ hashFiles('gnu/NEWS') }}-${{ hashFiles('uutils/util/build-gnu.sh') }} # use build-gnu.sh for extremely safe caching
63-
6452
#### Build environment setup
6553
- name: Install dependencies
6654
shell: bash
@@ -105,15 +93,6 @@ jobs:
10593
cd 'uutils'
10694
env PROFILE=release-small bash util/build-gnu.sh
10795
108-
- name: Save files for faster configure and skipping make
109-
uses: actions/cache/save@v5
110-
if: always() && steps.cache-config-gnu.outputs.cache-hit != 'true'
111-
with:
112-
path: |
113-
gnu/config.cache
114-
gnu/src/getlimits
115-
key: ${{ runner.os }}-gnu-config-${{ hashFiles('gnu/NEWS') }}-${{ hashFiles('uutils/util/build-gnu.sh') }}
116-
11796
### Run tests as user
11897
- name: Run GNU tests
11998
shell: bash
@@ -201,18 +180,12 @@ jobs:
201180
name: Run GNU tests (SELinux)
202181
runs-on: ubuntu-24.04
203182
steps:
204-
#### Get the code, setup cache
183+
#### Get the code
205184
- name: Checkout code (uutils)
206185
uses: actions/checkout@v6
207186
with:
208187
path: 'uutils'
209188
persist-credentials: false
210-
- uses: dtolnay/rust-toolchain@master
211-
with:
212-
toolchain: stable
213-
- uses: Swatinem/rust-cache@v2
214-
with:
215-
workspaces: "./uutils -> target"
216189
- name: Checkout code (GNU coreutils)
217190
run: (mkdir -p gnu && cd gnu && bash ../uutils/util/fetch-gnu.sh)
218191

@@ -235,8 +208,7 @@ jobs:
235208
236209
- name: Install dependencies in VM
237210
run: |
238-
lima sudo dnf -y update
239-
lima sudo dnf -y install autoconf bison gperf gcc gdb jq libacl-devel libattr-devel libcap-devel libselinux-devel attr rustup clang-devel automake patch quilt
211+
lima sudo dnf -y install --nodocs autoconf bison gperf gcc gdb jq libacl-devel libattr-devel libcap-devel libselinux-devel attr rustup clang-devel automake patch quilt
240212
lima rustup-init -y --profile=minimal --default-toolchain stable
241213
- name: Copy the sources to VM
242214
run: |
@@ -325,9 +297,6 @@ jobs:
325297
with:
326298
path: 'uutils'
327299
persist-credentials: false
328-
- uses: dtolnay/rust-toolchain@master
329-
with:
330-
toolchain: stable
331300
- uses: Swatinem/rust-cache@v2
332301
with:
333302
workspaces: "./uutils -> target"
@@ -385,7 +354,7 @@ jobs:
385354
path: 'uutils'
386355
persist-credentials: false
387356
- name: Retrieve reference artifacts
388-
uses: dawidd6/action-download-artifact@v12
357+
uses: dawidd6/action-download-artifact@v14
389358
# ref: <https://github.com/dawidd6/action-download-artifact>
390359
continue-on-error: true ## don't break the build for missing reference artifacts (may be expired or just not generated yet)
391360
with:

.github/workflows/android.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ concurrency:
2222
env:
2323
TERMUX: v0.118.0
2424
KEY_POSTFIX: nextest+rustc-hash+adb+sshd+upgrade+XGB+inc18
25-
COMMON_EMULATOR_OPTIONS: -no-window -noaudio -no-boot-anim -camera-back none -gpu off
25+
COMMON_EMULATOR_OPTIONS: -no-metrics -no-window -noaudio -no-boot-anim -camera-back none -gpu off
2626
EMULATOR_DISK_SIZE: 12GB
2727
EMULATOR_HEAP_SIZE: 2048M
2828
EMULATOR_BOOT_TIMEOUT: 1200 # 20min
@@ -39,7 +39,7 @@ jobs:
3939
ram: [4096]
4040
api-level: [28]
4141
target: [google_apis_playstore]
42-
arch: [x86, x86_64] # , arm64-v8a
42+
arch: [x86_64] # ,x86 ,arm64-v8a
4343
runs-on: ${{ matrix.os }}
4444
env:
4545
EMULATOR_RAM_SIZE: ${{ matrix.ram }}
@@ -166,7 +166,7 @@ jobs:
166166
disk-size: ${{ env.EMULATOR_DISK_SIZE }}
167167
cores: ${{ env.EMULATOR_CORES }}
168168
force-avd-creation: false
169-
emulator-options: ${{ env.COMMON_EMULATOR_OPTIONS }} -no-metrics -no-snapshot-save -snapshot ${{ env.AVD_CACHE_KEY }}
169+
emulator-options: ${{ env.COMMON_EMULATOR_OPTIONS }} -no-snapshot-save -snapshot ${{ env.AVD_CACHE_KEY }}
170170
emulator-boot-timeout: ${{ env.EMULATOR_BOOT_TIMEOUT }}
171171
# This is not a usual script. Every line is executed in a separate shell with `sh -c`. If
172172
# one of the lines returns with error the whole script is failed (like running a script with

.github/workflows/audit.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Security audit
2+
3+
# spell-checker:ignore (misc) rustsec
4+
5+
on:
6+
schedule:
7+
- cron: "0 0 * * *"
8+
jobs:
9+
audit:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v6
13+
- uses: rustsec/audit-check@v2
14+
with:
15+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/benchmarks.yml

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

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

56
on:
67
pull_request:
@@ -20,9 +21,13 @@ jobs:
2021
benchmarks:
2122
name: Run ${{ matrix.type }} benchmarks for ${{ matrix.package }} (CodSpeed)
2223
runs-on: ubuntu-latest
24+
env:
25+
RUSTC_WRAPPER: sccache
26+
CARGO_INCREMENTAL: 0
27+
SCCACHE_GHA_ENABLED: "true"
2328
strategy:
2429
matrix:
25-
type: [performance, memory]
30+
type: [simulation, memory]
2631
package: [
2732
uu_base64,
2833
uu_cksum,
@@ -48,7 +53,8 @@ jobs:
4853
uu_uniq,
4954
uu_wc,
5055
uu_factor,
51-
uu_date
56+
uu_date,
57+
uu_csplit
5258
]
5359
steps:
5460
- uses: actions/checkout@v6
@@ -62,26 +68,29 @@ jobs:
6268
- name: Run sccache-cache
6369
uses: mozilla-actions/sccache-action@v0.0.9
6470

65-
- name: Install cargo-codspeed
71+
- name: Install locales
6672
shell: bash
67-
run: cargo install cargo-codspeed --locked
73+
run: |
74+
sudo locale-gen fr_FR.UTF-8
75+
sudo update-locale
76+
77+
- name: Install tools
78+
uses: taiki-e/install-action@v2
79+
with:
80+
tool: cargo-codspeed
6881

6982
- name: Build benchmarks for ${{ matrix.package }} (${{ matrix.type }})
7083
shell: bash
7184
run: |
7285
echo "Building ${{ matrix.type }} benchmarks for ${{ matrix.package }}"
73-
if [ "${{ matrix.type }}" = "memory" ]; then
74-
cargo codspeed build -m analysis -p ${{ matrix.package }}
75-
else
76-
cargo codspeed build -p ${{ matrix.package }}
77-
fi
86+
cargo codspeed build -m ${{ matrix.type }} -p ${{ matrix.package }}
7887
7988
- name: Run ${{ matrix.type }} benchmarks for ${{ matrix.package }}
8089
uses: CodSpeedHQ/action@v4
8190
env:
8291
CODSPEED_LOG: debug
8392
with:
84-
mode: ${{ matrix.type == 'memory' && 'memory' || 'simulation' }}
93+
mode: ${{ matrix.type }}
8594
run: |
8695
echo "Running ${{ matrix.type }} benchmarks for ${{ matrix.package }}"
8796
cargo codspeed run -p ${{ matrix.package }} > /dev/null

0 commit comments

Comments
 (0)