mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
Merge branch 'main' into fix-doc-hashs
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
linker = "x86_64-unknown-redox-gcc"
|
||||
[target.aarch64-unknown-linux-gnu]
|
||||
linker = "aarch64-linux-gnu-gcc"
|
||||
[target.riscv64gc-unknown-linux-musl]
|
||||
rustflags = ["-C", "target-feature=+crt-static"]
|
||||
|
||||
[env]
|
||||
# See feat_external_libstdbuf in src/uu/stdbuf/Cargo.toml
|
||||
|
||||
@@ -5,9 +5,15 @@ final-status-level = "skip"
|
||||
failure-output = "immediate-final"
|
||||
fail-fast = false
|
||||
|
||||
[profile.ci.junit]
|
||||
path = "junit.xml"
|
||||
|
||||
[profile.coverage]
|
||||
retries = 0
|
||||
status-level = "all"
|
||||
final-status-level = "skip"
|
||||
failure-output = "immediate-final"
|
||||
fail-fast = false
|
||||
|
||||
[profile.coverage.junit]
|
||||
path = "junit.xml"
|
||||
|
||||
@@ -57,6 +57,10 @@ switch_case_indent = true
|
||||
end_of_line = crlf
|
||||
insert_final_newline = false
|
||||
|
||||
[*.toml]
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
|
||||
[*.{yaml,yml,[Yy][Mm][Ll],[Yy][Aa][Mm][Ll]}]
|
||||
# YAML
|
||||
indent_size = 2
|
||||
|
||||
+151
-102
File diff suppressed because it is too large
Load Diff
@@ -46,7 +46,7 @@ jobs:
|
||||
# Ensure updated '*/Cargo.lock'
|
||||
# * '*/Cargo.lock' is required to be in a format that `cargo` of MinSRV can interpret (eg, v1-format for MinSRV < v1.38)
|
||||
for dir in "." "fuzz"; do
|
||||
( cd "$dir" && (cargo fetch --locked --quiet || cargo +${{ steps.vars.outputs.RUST_MIN_SRV }} update) )
|
||||
( cd "$dir" && (cargo fetch --locked --quiet --target $(rustc --print host-tuple) || cargo +${{ steps.vars.outputs.RUST_MIN_SRV }} update) )
|
||||
done
|
||||
- name: Info
|
||||
shell: bash
|
||||
@@ -65,9 +65,9 @@ jobs:
|
||||
cargo tree -V
|
||||
## dependencies
|
||||
echo "## dependency list"
|
||||
cargo fetch --locked --quiet
|
||||
cargo fetch --locked --quiet --target $(rustc --print host-tuple)
|
||||
## * using the 'stable' toolchain is necessary to avoid "unexpected '--filter-platform'" errors
|
||||
RUSTUP_TOOLCHAIN=stable cargo tree --locked --no-dedupe -e=no-dev --prefix=none --features ${{ matrix.job.features }} | grep -vE "$PWD" | sort --unique
|
||||
cargo +stable tree --locked --no-dedupe -e=no-dev --prefix=none --features ${{ matrix.job.features }} | grep -vE "$PWD" | sort --unique
|
||||
- name: Commit any changes (to '${{ env.BRANCH_TARGET }}')
|
||||
uses: EndBug/add-and-commit@v9
|
||||
with:
|
||||
|
||||
@@ -2,11 +2,11 @@ name: GnuTests
|
||||
|
||||
# spell-checker:ignore (abbrev/names) CodeCov gnulib GnuTests Swatinem
|
||||
# spell-checker:ignore (jargon) submodules devel
|
||||
# spell-checker:ignore (libs/utils) autopoint chksum dpkg getenforce getlimits gperf lcov libexpect limactl pyinotify setenforce shopt texinfo valgrind libattr libcap taiki-e zstd cpio
|
||||
# spell-checker:ignore (libs/utils) chksum dpkg getenforce getlimits gperf lcov libexpect limactl pyinotify setenforce shopt valgrind libattr libcap taiki-e zstd cpio
|
||||
# spell-checker:ignore (options) Ccodegen Coverflow Cpanic Zpanic
|
||||
# spell-checker:ignore (people) Dawid Dziurla * dawidd dtolnay
|
||||
# spell-checker:ignore (vars) FILESET SUBDIRS XPASS
|
||||
# spell-checker:ignore userns
|
||||
# spell-checker:ignore userns nodocs
|
||||
|
||||
# * note: to run a single test => `REPO/util/run-gnu-test.sh PATH/TO/TEST/SCRIPT`
|
||||
|
||||
@@ -31,7 +31,7 @@ env:
|
||||
TEST_STTY_FULL_SUMMARY_FILE: 'gnu-stty-full-result.json'
|
||||
TEST_SELINUX_FULL_SUMMARY_FILE: 'selinux-gnu-full-result.json'
|
||||
TEST_SELINUX_ROOT_FULL_SUMMARY_FILE: 'selinux-root-gnu-full-result.json'
|
||||
TEST_SMACK_FULL_SUMMARY_FILE: 'smack-gnu-full-result.json'
|
||||
TEST_QEMU_FULL_SUMMARY_FILE: 'qemu-gnu-full-result.json'
|
||||
|
||||
jobs:
|
||||
native:
|
||||
@@ -44,10 +44,6 @@ jobs:
|
||||
with:
|
||||
path: 'uutils'
|
||||
persist-credentials: false
|
||||
- uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
components: rustfmt
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: "./uutils -> target"
|
||||
@@ -69,7 +65,7 @@ jobs:
|
||||
## Install dependencies
|
||||
sudo apt-get update
|
||||
## Check that build-gnu.sh works on the non SELinux system by installing libselinux only on lima
|
||||
sudo apt-get install -y autopoint gperf gdb python3-pyinotify valgrind libexpect-perl libacl1-dev libattr1-dev libcap-dev attr quilt
|
||||
sudo apt-get install -y gperf gdb python3-pyinotify valgrind libexpect-perl libacl1-dev libattr1-dev libcap-dev attr quilt
|
||||
curl http://launchpadlibrarian.net/831710181/automake_1.18.1-3_all.deb > automake-1.18.deb
|
||||
sudo dpkg -i --force-depends automake-1.18.deb
|
||||
- name: Add various locales
|
||||
@@ -105,7 +101,7 @@ jobs:
|
||||
## Build binaries
|
||||
cd 'uutils'
|
||||
env PROFILE=release-small bash util/build-gnu.sh
|
||||
|
||||
|
||||
- name: Save files for faster configure and skipping make
|
||||
uses: actions/cache/save@v5
|
||||
if: always() && steps.cache-config-gnu.outputs.cache-hit != 'true'
|
||||
@@ -208,13 +204,6 @@ jobs:
|
||||
with:
|
||||
path: 'uutils'
|
||||
persist-credentials: false
|
||||
- uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
components: rustfmt
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: "./uutils -> target"
|
||||
- name: Checkout code (GNU coreutils)
|
||||
run: (mkdir -p gnu && cd gnu && bash ../uutils/util/fetch-gnu.sh)
|
||||
|
||||
@@ -235,20 +224,10 @@ jobs:
|
||||
lima ls -laZ /etc/selinux
|
||||
lima sudo sestatus
|
||||
|
||||
# Ensure we're running in enforcing mode
|
||||
lima sudo setenforce 1
|
||||
lima getenforce
|
||||
|
||||
# Create test files with SELinux contexts for testing
|
||||
lima sudo mkdir -p /var/test_selinux
|
||||
lima sudo touch /var/test_selinux/test_file
|
||||
lima sudo chcon -t etc_t /var/test_selinux/test_file
|
||||
lima ls -Z /var/test_selinux/test_file # Verify context
|
||||
- name: Install dependencies in VM
|
||||
run: |
|
||||
lima sudo dnf -y update
|
||||
lima sudo dnf -y install git autoconf autopoint bison texinfo gperf gcc gdb jq libacl-devel libattr-devel libcap-devel libselinux-devel attr rustup clang-devel texinfo-tex automake patch quilt
|
||||
lima rustup-init -y --default-toolchain stable
|
||||
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
|
||||
lima rustup-init -y --profile=minimal --default-toolchain stable
|
||||
- name: Copy the sources to VM
|
||||
run: |
|
||||
rsync -a -e ssh . lima-default:~/work/
|
||||
@@ -269,8 +248,16 @@ jobs:
|
||||
lima bash -c "cd ~/work/uutils/ && echo 'Found SELinux tests:'; wc -l selinux-tests.txt"
|
||||
- name: Run GNU SELinux tests
|
||||
run: |
|
||||
# Ensure we're running in enforcing mode
|
||||
lima sudo setenforce 1
|
||||
lima getenforce
|
||||
|
||||
# Create test files with SELinux contexts for testing
|
||||
lima sudo mkdir -p /var/test_selinux
|
||||
lima sudo touch /var/test_selinux/test_file
|
||||
lima sudo chcon -t etc_t /var/test_selinux/test_file
|
||||
lima ls -Z /var/test_selinux/test_file # Verify context
|
||||
|
||||
lima cat /proc/filesystems
|
||||
lima bash -c "cd ~/work/uutils/ && bash util/run-gnu-test.sh \$(cat selinux-tests.txt)"
|
||||
- name: Extract testing info from individual logs into JSON
|
||||
@@ -319,8 +306,8 @@ jobs:
|
||||
gnu/tests-selinux/*.log
|
||||
gnu/tests-selinux/*/*.log.gz
|
||||
|
||||
smack:
|
||||
name: Run GNU tests (SMACK)
|
||||
qemu:
|
||||
name: Run GNU tests (SMACK/ROOTFS)
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout code (uutils)
|
||||
@@ -328,10 +315,6 @@ jobs:
|
||||
with:
|
||||
path: 'uutils'
|
||||
persist-credentials: false
|
||||
- uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
components: rustfmt
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: "./uutils -> target"
|
||||
@@ -341,30 +324,30 @@ jobs:
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y qemu-system-x86 zstd cpio
|
||||
- name: Run GNU SMACK tests
|
||||
- name: Run GNU SMACK/ROOTFS tests
|
||||
run: |
|
||||
cd uutils
|
||||
bash util/run-gnu-tests-smack-ci.sh "$GITHUB_WORKSPACE/gnu" "$GITHUB_WORKSPACE/gnu/tests-smack"
|
||||
bash util/run-gnu-tests-smack-ci.sh "$GITHUB_WORKSPACE/gnu" "$GITHUB_WORKSPACE/gnu/tests-qemu"
|
||||
- name: Extract testing info into JSON
|
||||
run: |
|
||||
python3 uutils/util/gnu-json-result.py gnu/tests-smack > ${{ env.TEST_SMACK_FULL_SUMMARY_FILE }}
|
||||
- name: Upload SMACK json results
|
||||
python3 uutils/util/gnu-json-result.py gnu/tests-qemu > ${{ env.TEST_QEMU_FULL_SUMMARY_FILE }}
|
||||
- name: Upload SMACK/ROOTFS json results
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: smack-gnu-full-result
|
||||
path: ${{ env.TEST_SMACK_FULL_SUMMARY_FILE }}
|
||||
- name: Compress SMACK test logs
|
||||
run: gzip gnu/tests-smack/*/*.log 2>/dev/null || true
|
||||
- name: Upload SMACK test logs
|
||||
name: qemu-gnu-full-result
|
||||
path: ${{ env.TEST_QEMU_FULL_SUMMARY_FILE }}
|
||||
- name: Compress SMACK/ROOTFS test logs
|
||||
run: gzip gnu/tests-qemu/*/*.log 2>/dev/null || true
|
||||
- name: Upload SMACK/ROOTFS test logs
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: smack-test-logs
|
||||
name: qemu-test-logs
|
||||
path: |
|
||||
gnu/tests-smack/*.log
|
||||
gnu/tests-smack/*/*.log.gz
|
||||
gnu/tests-qemu/*.log
|
||||
gnu/tests-qemu/*/*.log.gz
|
||||
|
||||
aggregate:
|
||||
needs: [native, selinux, smack]
|
||||
needs: [native, selinux, qemu]
|
||||
permissions:
|
||||
actions: read # for dawidd6/action-download-artifact to query and download artifacts
|
||||
contents: read # for actions/checkout to fetch code
|
||||
@@ -389,7 +372,7 @@ jobs:
|
||||
path: 'uutils'
|
||||
persist-credentials: false
|
||||
- name: Retrieve reference artifacts
|
||||
uses: dawidd6/action-download-artifact@v12
|
||||
uses: dawidd6/action-download-artifact@v13
|
||||
# ref: <https://github.com/dawidd6/action-download-artifact>
|
||||
continue-on-error: true ## don't break the build for missing reference artifacts (may be expired or just not generated yet)
|
||||
with:
|
||||
@@ -429,10 +412,10 @@ jobs:
|
||||
name: selinux-root-gnu-full-result
|
||||
path: results
|
||||
merge-multiple: true
|
||||
- name: Download smack json results
|
||||
- name: Download SMACK/ROOTFS json results
|
||||
uses: actions/download-artifact@v7
|
||||
with:
|
||||
name: smack-gnu-full-result
|
||||
name: qemu-gnu-full-result
|
||||
path: results
|
||||
merge-multiple: true
|
||||
- name: Extract/summarize testing info
|
||||
|
||||
@@ -22,7 +22,7 @@ concurrency:
|
||||
env:
|
||||
TERMUX: v0.118.0
|
||||
KEY_POSTFIX: nextest+rustc-hash+adb+sshd+upgrade+XGB+inc18
|
||||
COMMON_EMULATOR_OPTIONS: -no-window -noaudio -no-boot-anim -camera-back none -gpu off
|
||||
COMMON_EMULATOR_OPTIONS: -no-metrics -no-window -noaudio -no-boot-anim -camera-back none -gpu off
|
||||
EMULATOR_DISK_SIZE: 12GB
|
||||
EMULATOR_HEAP_SIZE: 2048M
|
||||
EMULATOR_BOOT_TIMEOUT: 1200 # 20min
|
||||
@@ -39,7 +39,7 @@ jobs:
|
||||
ram: [4096]
|
||||
api-level: [28]
|
||||
target: [google_apis_playstore]
|
||||
arch: [x86, x86_64] # , arm64-v8a
|
||||
arch: [x86_64] # ,x86 ,arm64-v8a
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
EMULATOR_RAM_SIZE: ${{ matrix.ram }}
|
||||
|
||||
@@ -18,33 +18,42 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
benchmarks:
|
||||
name: Run benchmarks (CodSpeed)
|
||||
name: Run ${{ matrix.type }} benchmarks for ${{ matrix.package }} (CodSpeed)
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
RUSTC_WRAPPER: sccache
|
||||
CARGO_INCREMENTAL: 0
|
||||
SCCACHE_GHA_ENABLED: "true"
|
||||
strategy:
|
||||
matrix:
|
||||
benchmark-target:
|
||||
- { package: uu_base64 }
|
||||
- { package: uu_cksum }
|
||||
- { package: uu_cp }
|
||||
- { package: uu_cut }
|
||||
- { package: uu_du }
|
||||
- { package: uu_expand }
|
||||
- { package: uu_fold }
|
||||
- { package: uu_hashsum }
|
||||
- { package: uu_ls }
|
||||
- { package: uu_mv }
|
||||
- { package: uu_nl }
|
||||
- { package: uu_numfmt }
|
||||
- { package: uu_rm }
|
||||
- { package: uu_seq }
|
||||
- { package: uu_shuf }
|
||||
- { package: uu_sort }
|
||||
- { package: uu_split }
|
||||
- { package: uu_tsort }
|
||||
- { package: uu_unexpand }
|
||||
- { package: uu_uniq }
|
||||
- { package: uu_wc }
|
||||
- { package: uu_factor }
|
||||
type: [simulation] # , memory] # memory profile disabled due to variance
|
||||
package: [
|
||||
uu_base64,
|
||||
uu_cksum,
|
||||
uu_cp,
|
||||
uu_cut,
|
||||
uu_dd,
|
||||
uu_df,
|
||||
uu_du,
|
||||
uu_expand,
|
||||
uu_fold,
|
||||
uu_join,
|
||||
uu_ls,
|
||||
uu_mv,
|
||||
uu_nl,
|
||||
uu_numfmt,
|
||||
uu_rm,
|
||||
uu_seq,
|
||||
uu_shuf,
|
||||
uu_sort,
|
||||
uu_split,
|
||||
uu_tsort,
|
||||
uu_unexpand,
|
||||
uu_uniq,
|
||||
uu_wc,
|
||||
uu_factor,
|
||||
uu_date
|
||||
]
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
@@ -57,23 +66,31 @@ jobs:
|
||||
- name: Run sccache-cache
|
||||
uses: mozilla-actions/sccache-action@v0.0.9
|
||||
|
||||
- name: Install locales
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y locales
|
||||
sudo locale-gen fr_FR.UTF-8
|
||||
sudo update-locale
|
||||
|
||||
- name: Install cargo-codspeed
|
||||
shell: bash
|
||||
run: cargo install cargo-codspeed --locked
|
||||
|
||||
- name: Build benchmarks for ${{ matrix.benchmark-target.package }}
|
||||
- name: Build benchmarks for ${{ matrix.package }} (${{ matrix.type }})
|
||||
shell: bash
|
||||
run: |
|
||||
echo "Building benchmarks for ${{ matrix.benchmark-target.package }}"
|
||||
cargo codspeed build -p ${{ matrix.benchmark-target.package }}
|
||||
echo "Building ${{ matrix.type }} benchmarks for ${{ matrix.package }}"
|
||||
cargo codspeed build -m ${{ matrix.type }} -p ${{ matrix.package }}
|
||||
|
||||
- name: Run benchmarks for ${{ matrix.benchmark-target.package }}
|
||||
- name: Run ${{ matrix.type }} benchmarks for ${{ matrix.package }}
|
||||
uses: CodSpeedHQ/action@v4
|
||||
env:
|
||||
CODSPEED_LOG: debug
|
||||
with:
|
||||
mode: instrumentation
|
||||
mode: ${{ matrix.type }}
|
||||
run: |
|
||||
echo "Running benchmarks for ${{ matrix.benchmark-target.package }}"
|
||||
cargo codspeed run -p ${{ matrix.benchmark-target.package }} > /dev/null
|
||||
echo "Running ${{ matrix.type }} benchmarks for ${{ matrix.package }}"
|
||||
cargo codspeed run -p ${{ matrix.package }} > /dev/null
|
||||
token: ${{ secrets.CODSPEED_TOKEN }}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: Code Quality
|
||||
|
||||
# spell-checker:ignore (people) reactivecircus Swatinem dtolnay juliangruber pell taplo
|
||||
# spell-checker:ignore (people) dtolnay juliangruber pell reactivecircus Swatinem taiki-e taplo
|
||||
# spell-checker:ignore (misc) TERMUX noaudio pkill swiftshader esac sccache pcoreutils shopt subshell dequote libsystemd
|
||||
|
||||
on:
|
||||
@@ -74,6 +74,7 @@ jobs:
|
||||
env:
|
||||
SCCACHE_GHA_ENABLED: "true"
|
||||
RUSTC_WRAPPER: "sccache"
|
||||
CARGO_INCREMENTAL: 0
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -147,6 +148,12 @@ jobs:
|
||||
CARGO_UTILITY_LIST_OPTIONS="$(for u in ${UTILITY_LIST}; do echo -n "-puu_${u} "; done;)"
|
||||
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 ; }
|
||||
if [ -n "${{ steps.vars.outputs.FAIL_ON_FAULT }}" ] && [ -n "$fault" ]; then exit 1 ; fi
|
||||
- name: "cargo clippy on fuzz dir"
|
||||
if: runner.os != 'Windows'
|
||||
shell: bash
|
||||
run: |
|
||||
cd fuzz
|
||||
cargo clippy --workspace --all-targets --all-features -- -D warnings
|
||||
|
||||
style_spellcheck:
|
||||
name: Style/spelling
|
||||
@@ -198,8 +205,13 @@ jobs:
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install taplo-cli
|
||||
uses: taiki-e/install-action@v2
|
||||
with:
|
||||
tool: taplo-cli
|
||||
|
||||
- name: Check
|
||||
run: npx --yes @taplo/cli fmt --check
|
||||
run: taplo fmt --check --diff
|
||||
|
||||
python:
|
||||
name: Style/Python
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: FreeBSD
|
||||
|
||||
# spell-checker:ignore sshfs usesh vmactions taiki Swatinem esac fdescfs fdesc sccache nextest copyback logind
|
||||
# spell-checker:ignore sshfs usesh vmactions taiki Swatinem esac fdescfs fdesc nextest copyback logind
|
||||
|
||||
env:
|
||||
# * style job configuration
|
||||
@@ -30,18 +30,10 @@ jobs:
|
||||
matrix:
|
||||
job:
|
||||
- { os: ubuntu-24.04 , features: unix }
|
||||
env:
|
||||
SCCACHE_GHA_ENABLED: "true"
|
||||
RUSTC_WRAPPER: "sccache"
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- name: Run sccache-cache
|
||||
uses: mozilla-actions/sccache-action@v0.0.9
|
||||
with:
|
||||
disable_annotations: true
|
||||
- name: Prepare, build and test
|
||||
uses: vmactions/freebsd-vm@v1.2.9
|
||||
with:
|
||||
@@ -101,6 +93,7 @@ jobs:
|
||||
# To ensure that files are cleaned up, we don't want to exit on error
|
||||
set +e
|
||||
unset FAULT
|
||||
export CARGO_INCREMENTAL=0
|
||||
## cargo fmt testing
|
||||
echo "## cargo fmt testing"
|
||||
# * 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,17 +120,12 @@ jobs:
|
||||
- { os: ubuntu-24.04 , features: unix }
|
||||
env:
|
||||
mem: 4096
|
||||
SCCACHE_GHA_ENABLED: "true"
|
||||
RUSTC_WRAPPER: "sccache"
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- name: Run sccache-cache
|
||||
uses: mozilla-actions/sccache-action@v0.0.9
|
||||
with:
|
||||
disable_annotations: true
|
||||
- name: Avoid no space left on device (Ubuntu runner)
|
||||
run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android &
|
||||
- name: Prepare, build and test
|
||||
uses: vmactions/freebsd-vm@v1.2.9
|
||||
with:
|
||||
@@ -192,6 +180,8 @@ jobs:
|
||||
set +e
|
||||
cd "${WORKSPACE}"
|
||||
unset FAULT
|
||||
export CARGO_INCREMENTAL=0
|
||||
export RUSTFLAGS="-C strip=symbols" # for disk space
|
||||
cargo build || FAULT=1
|
||||
export PATH=~/.cargo/bin:${PATH}
|
||||
export RUST_BACKTRACE=1
|
||||
|
||||
@@ -58,15 +58,16 @@ jobs:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: dtolnay/rust-toolchain@nightly
|
||||
- name: Install `cargo-fuzz`
|
||||
run: cargo install cargo-fuzz
|
||||
run: |
|
||||
echo "RUSTC_BOOTSTRAP=1" >> "${GITHUB_ENV}" # Use -Z
|
||||
cargo install cargo-fuzz --locked
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
shared-key: "cargo-fuzz-cache-key"
|
||||
cache-directories: "fuzz/target"
|
||||
- name: Run `cargo-fuzz build`
|
||||
run: cargo +nightly fuzz build
|
||||
run: cargo fuzz build
|
||||
|
||||
fuzz-run:
|
||||
needs: fuzz-build
|
||||
@@ -92,18 +93,20 @@ jobs:
|
||||
- { name: fuzz_env, should_pass: false }
|
||||
- { name: fuzz_cksum, should_pass: false }
|
||||
- { name: fuzz_parse_glob, should_pass: true }
|
||||
- { name: fuzz_parse_size, should_pass: true }
|
||||
- { name: fuzz_parse_time, should_pass: true }
|
||||
- { name: fuzz_seq_parse_number, should_pass: true }
|
||||
- { name: fuzz_parse_size, should_pass: false }
|
||||
- { name: fuzz_parse_time, should_pass: false }
|
||||
- { name: fuzz_seq_parse_number, should_pass: false }
|
||||
- { name: fuzz_non_utf8_paths, should_pass: true }
|
||||
- { name: fuzz_dirname, should_pass: true }
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: dtolnay/rust-toolchain@nightly
|
||||
- name: Install `cargo-fuzz`
|
||||
run: cargo install cargo-fuzz
|
||||
run: |
|
||||
echo "RUSTC_BOOTSTRAP=1" >> "${GITHUB_ENV}" # Use nightly
|
||||
cargo install cargo-fuzz --locked
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
shared-key: "cargo-fuzz-cache-key"
|
||||
@@ -117,11 +120,11 @@ jobs:
|
||||
- name: Run ${{ matrix.test-target.name }} for XX seconds
|
||||
id: run_fuzzer
|
||||
shell: bash
|
||||
continue-on-error: ${{ !matrix.test-target.name.should_pass }}
|
||||
continue-on-error: ${{ !matrix.test-target.should_pass }}
|
||||
run: |
|
||||
mkdir -p fuzz/stats
|
||||
STATS_FILE="fuzz/stats/${{ matrix.test-target.name }}.txt"
|
||||
cargo +nightly 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"
|
||||
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"
|
||||
|
||||
# Extract key stats from the output
|
||||
if grep -q "stat::number_of_executed_units" "$STATS_FILE"; then
|
||||
@@ -155,7 +158,7 @@ jobs:
|
||||
echo "Runs: $(grep -q "stat::number_of_executed_units" "$STATS_FILE" && grep "stat::number_of_executed_units" "$STATS_FILE" | awk '{print $2}' || echo "unknown")"
|
||||
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"
|
||||
echo "New Units: $(grep -q "stat::new_units_added" "$STATS_FILE" && grep "stat::new_units_added" "$STATS_FILE" | awk '{print $2}' || echo "unknown")"
|
||||
echo "Expected: ${{ matrix.test-target.name.should_pass }}"
|
||||
echo "Expected: ${{ matrix.test-target.should_pass }}"
|
||||
if grep -q "SUMMARY: " "$STATS_FILE"; then
|
||||
echo "Status: $(grep "SUMMARY: " "$STATS_FILE" | head -1)"
|
||||
else
|
||||
|
||||
@@ -2,6 +2,10 @@ tests/tail/inotify-dir-recreate
|
||||
tests/tail/overlay-headers
|
||||
tests/timeout/timeout
|
||||
tests/rm/rm1
|
||||
tests/shuf/shuf-reservoir
|
||||
tests/sort/sort-stale-thread-mem
|
||||
tests/tty/tty-eof
|
||||
tests/misc/stdbuf
|
||||
tests/misc/usage_vs_getopt
|
||||
tests/misc/tee
|
||||
tests/tail/follow-name
|
||||
|
||||
@@ -28,6 +28,7 @@ jobs:
|
||||
env:
|
||||
SCCACHE_GHA_ENABLED: "true"
|
||||
RUSTC_WRAPPER: "sccache"
|
||||
CARGO_INCREMENTAL: 0
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -130,6 +131,7 @@ jobs:
|
||||
env:
|
||||
SCCACHE_GHA_ENABLED: "true"
|
||||
RUSTC_WRAPPER: "sccache"
|
||||
CARGO_INCREMENTAL: 0
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
@@ -300,6 +302,7 @@ jobs:
|
||||
env:
|
||||
SCCACHE_GHA_ENABLED: "true"
|
||||
RUSTC_WRAPPER: "sccache"
|
||||
CARGO_INCREMENTAL: 0
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
@@ -409,6 +412,7 @@ jobs:
|
||||
env:
|
||||
SCCACHE_GHA_ENABLED: "true"
|
||||
RUSTC_WRAPPER: "sccache"
|
||||
CARGO_INCREMENTAL: 0
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -560,6 +564,7 @@ jobs:
|
||||
env:
|
||||
SCCACHE_GHA_ENABLED: "true"
|
||||
RUSTC_WRAPPER: "sccache"
|
||||
CARGO_INCREMENTAL: 0
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -735,7 +740,7 @@ jobs:
|
||||
run: |
|
||||
## Download additional locale files from coreutils-l10n repository
|
||||
echo "Downloading additional locale files from coreutils-l10n..."
|
||||
git clone https://github.com/uutils/coreutils-l10n.git coreutils-l10n-repo
|
||||
git clone --depth=1 https://github.com/uutils/coreutils-l10n.git coreutils-l10n-repo
|
||||
|
||||
# Create installation directory
|
||||
CARGO_INSTALL_DIR="$PWD/cargo-install-dir"
|
||||
@@ -899,6 +904,7 @@ jobs:
|
||||
env:
|
||||
SCCACHE_GHA_ENABLED: "true"
|
||||
RUSTC_WRAPPER: "sccache"
|
||||
CARGO_INCREMENTAL: 0
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
@@ -1130,6 +1136,7 @@ jobs:
|
||||
env:
|
||||
SCCACHE_GHA_ENABLED: "true"
|
||||
RUSTC_WRAPPER: "sccache"
|
||||
CARGO_INCREMENTAL: 0
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
@@ -1251,6 +1258,7 @@ jobs:
|
||||
env:
|
||||
SCCACHE_GHA_ENABLED: "true"
|
||||
RUSTC_WRAPPER: "sccache"
|
||||
CARGO_INCREMENTAL: 0
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
|
||||
@@ -47,10 +47,10 @@ jobs:
|
||||
prepare: |
|
||||
# Clean up disk space before installing packages
|
||||
df -h
|
||||
rm -rf /usr/share/doc/* /usr/share/man/* /var/cache/* /tmp/* || true
|
||||
pkg_add curl sudo-- jq coreutils bash rust rust-clippy rust-rustfmt llvm--
|
||||
rm -rf /usr/share/relink/* /usr/X11R6/* /usr/share/doc/* /usr/share/man/* &
|
||||
# Clean up package cache after installation
|
||||
pkg_delete -a || true
|
||||
pkg_delete -a &
|
||||
df -h
|
||||
run: |
|
||||
## Prepare, build, and test
|
||||
@@ -58,6 +58,7 @@ jobs:
|
||||
# * NOTE: All steps need to be run in this block, otherwise, we are operating back on the mac host
|
||||
set -e
|
||||
#
|
||||
export CARGO_INCREMENTAL=0
|
||||
TEST_USER=tester
|
||||
REPO_NAME=${GITHUB_WORKSPACE##*/}
|
||||
WORKSPACE_PARENT="/home/runner/work/${REPO_NAME}"
|
||||
@@ -115,8 +116,6 @@ jobs:
|
||||
fi
|
||||
# Clean to avoid to rsync back the files and free up disk space
|
||||
cargo clean
|
||||
# Additional cleanup to free disk space
|
||||
rm -rf ~/.cargo/registry/cache ~/.cargo/git/db || true
|
||||
if [ -n "\${FAIL_ON_FAULT}" ] && [ -n "\${FAULT}" ]; then exit 1 ; fi
|
||||
EOF
|
||||
|
||||
@@ -139,15 +138,15 @@ jobs:
|
||||
usesh: true
|
||||
sync: rsync
|
||||
copyback: false
|
||||
mem: 4096
|
||||
mem: 6144
|
||||
# Install rust and build dependencies from OpenBSD packages (llvm provides libclang for bindgen)
|
||||
prepare: |
|
||||
# Clean up disk space before installing packages
|
||||
df -h
|
||||
rm -rf /usr/share/doc/* /usr/share/man/* /var/cache/* /tmp/* || true
|
||||
rm -rf /usr/share/relink/* /usr/X11R6/* /usr/share/doc/* /usr/share/man/* &
|
||||
pkg_add curl gmake sudo-- jq rust llvm--
|
||||
# Clean up package cache after installation
|
||||
pkg_delete -a || true
|
||||
pkg_delete -a &
|
||||
df -h
|
||||
run: |
|
||||
## Prepare, build, and test
|
||||
@@ -155,6 +154,7 @@ jobs:
|
||||
# * NOTE: All steps need to be run in this block, otherwise, we are operating back on the mac host
|
||||
set -e
|
||||
#
|
||||
export CARGO_INCREMENTAL=0
|
||||
TEST_USER=tester
|
||||
REPO_NAME=${GITHUB_WORKSPACE##*/}
|
||||
WORKSPACE_PARENT="/home/runner/work/${REPO_NAME}"
|
||||
@@ -196,9 +196,7 @@ jobs:
|
||||
set +e
|
||||
cd "${WORKSPACE}"
|
||||
unset FAULT
|
||||
cargo build || FAULT=1
|
||||
# Clean build artifacts to save disk space before testing
|
||||
rm -rf target/debug/build target/debug/incremental || true
|
||||
# openbsd is very slow. Omit duplicated cargo build and do test only
|
||||
export PATH=~/.cargo/bin:${PATH}
|
||||
export RUST_BACKTRACE=1
|
||||
export CARGO_TERM_COLOR=always
|
||||
@@ -212,10 +210,9 @@ jobs:
|
||||
cargo test --features "\$UUCORE_FEATURES" -p uucore || FAULT=1
|
||||
fi
|
||||
# Test building with make
|
||||
if (test -z "\$FAULT"); then make || FAULT=1 ; fi
|
||||
if (test -z "\$FAULT"); then make MULTICALL=Y || FAULT=1 ; fi
|
||||
# Clean to avoid to rsync back the files and free up disk space
|
||||
cargo clean
|
||||
# Additional cleanup to free disk space
|
||||
rm -rf ~/.cargo/registry/cache ~/.cargo/git/db target/debug/deps target/release/deps || true
|
||||
if (test -n "\$FAULT"); then exit 1 ; fi
|
||||
EOF
|
||||
|
||||
@@ -66,4 +66,5 @@ jobs:
|
||||
. "$HOME/.cargo/env"
|
||||
export CARGO_TERM_COLOR=always
|
||||
export RUST_BACKTRACE=1
|
||||
CARGO_INCREMENTAL=0
|
||||
cargo nextest run --hide-progress-bar --profile ci --features '${{ matrix.job.features }}'
|
||||
|
||||
@@ -34,6 +34,7 @@ RISCV
|
||||
RNG # random number generator
|
||||
RNGs
|
||||
Solaris
|
||||
TOCTOU # time-of-check time-of-use
|
||||
UID # user ID
|
||||
UIDs
|
||||
UUID # universally unique identifier
|
||||
|
||||
+29
@@ -55,6 +55,7 @@ fileio
|
||||
filesystem
|
||||
filesystems
|
||||
flamegraph
|
||||
footgun
|
||||
freeram
|
||||
fsxattr
|
||||
fullblock
|
||||
@@ -86,12 +87,14 @@ listxattr
|
||||
llistxattr
|
||||
lossily
|
||||
lstat
|
||||
makedev
|
||||
mebi
|
||||
mebibytes
|
||||
mergeable
|
||||
microbenchmark
|
||||
microbenchmarks
|
||||
microbenchmarking
|
||||
monomorphized
|
||||
multibyte
|
||||
multicall
|
||||
nmerge
|
||||
@@ -106,6 +109,7 @@ nolinks
|
||||
nonblock
|
||||
nonportable
|
||||
nonprinting
|
||||
nonrepeating
|
||||
nonseekable
|
||||
notrunc
|
||||
nowrite
|
||||
@@ -113,8 +117,10 @@ noxfer
|
||||
ofile
|
||||
oflag
|
||||
oflags
|
||||
pdeathsig
|
||||
peekable
|
||||
performant
|
||||
prctl
|
||||
precompiled
|
||||
precompute
|
||||
preload
|
||||
@@ -125,6 +131,7 @@ pseudoprime
|
||||
pseudoprimes
|
||||
quantiles
|
||||
readonly
|
||||
ROOTFS
|
||||
reparse
|
||||
rposition
|
||||
seedable
|
||||
@@ -134,10 +141,21 @@ semiprimes
|
||||
setcap
|
||||
setfacl
|
||||
setfattr
|
||||
SETFL
|
||||
setlocale
|
||||
shortcode
|
||||
shortcodes
|
||||
setpgid
|
||||
sigaction
|
||||
CHLD
|
||||
chld
|
||||
SIGCHLD
|
||||
sigchld
|
||||
siginfo
|
||||
SIGTTIN
|
||||
sigttin
|
||||
SIGTTOU
|
||||
sigttou
|
||||
sigusr
|
||||
strcasecmp
|
||||
subcommand
|
||||
@@ -181,6 +199,7 @@ inacc
|
||||
maint
|
||||
proc
|
||||
procs
|
||||
TOCTOU
|
||||
|
||||
# * constants
|
||||
xffff
|
||||
@@ -199,6 +218,7 @@ nofield
|
||||
# * clippy
|
||||
uninlined
|
||||
nonminimal
|
||||
rposition
|
||||
|
||||
# * CPU/hardware features
|
||||
ASIMD
|
||||
@@ -214,3 +234,12 @@ TUNABLES
|
||||
tunables
|
||||
VMULL
|
||||
vmull
|
||||
ENOTSUP
|
||||
enotsup
|
||||
SETFL
|
||||
tmpfs
|
||||
|
||||
Hijri
|
||||
Nowruz
|
||||
charmap
|
||||
hijri
|
||||
|
||||
@@ -37,6 +37,9 @@ Boden Garman
|
||||
Chirag B Jadwani
|
||||
Chirag
|
||||
Jadwani
|
||||
Daniel Lemire
|
||||
Daniel
|
||||
Lemire
|
||||
Derek Chiang
|
||||
Derek
|
||||
Chiang
|
||||
|
||||
@@ -38,6 +38,7 @@ getrandom
|
||||
globset
|
||||
indicatif
|
||||
itertools
|
||||
itoa
|
||||
iuse
|
||||
langid
|
||||
lscolors
|
||||
@@ -182,6 +183,7 @@ LINESIZE
|
||||
NAMESIZE
|
||||
RTLD_NEXT
|
||||
RTLD
|
||||
SIGABRT
|
||||
SIGINT
|
||||
SIGKILL
|
||||
SIGSTOP
|
||||
@@ -379,6 +381,7 @@ istrip
|
||||
litout
|
||||
opost
|
||||
parodd
|
||||
ENOTTY
|
||||
|
||||
# translation tests
|
||||
CLICOLOR
|
||||
|
||||
+4
-4
@@ -78,11 +78,11 @@ issues and writing documentation are just as important as writing code.
|
||||
We can't fix bugs we don't know about, so good issues are super helpful! Here
|
||||
are some tips for writing good issues:
|
||||
|
||||
- If you find a bug, make sure it's still a problem on the `main` branch.
|
||||
- If you find a bug, make sure it's still a problem on the [`main` branch](https://github.com/uutils/coreutils/releases/tag/latest-commit).
|
||||
- Search through the existing issues to see whether it has already been
|
||||
reported.
|
||||
- Make sure to include all relevant information, such as:
|
||||
- Which version of uutils did you check?
|
||||
- Which version or commit hash of uutils did you check?
|
||||
- Which version of GNU coreutils are you comparing with?
|
||||
- What platform are you on?
|
||||
- Provide a way to reliably reproduce the issue.
|
||||
@@ -250,8 +250,8 @@ gitignore: add temporary files
|
||||
- It's up to you whether you want to use `git merge main` or
|
||||
`git rebase main`.
|
||||
- Feel free to ask for help with merge conflicts.
|
||||
- You do not need to ping maintainers to request a review, but it's fine to do
|
||||
so if you don't get a response within a few days.
|
||||
- You do not need to ping maintainers to request a review immediately after submission. If you do not get a response to your patch within a few days, it is fine to request a review.
|
||||
- If after a week your patch has still not been reviewed, we recommend that you ping the maintainers on our Discord channel in `#coreutils-chat`.
|
||||
|
||||
## Platforms
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user