mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 12:07:46 +00:00
Merge pull request #4157 from miles170/ci-update-actions
CI: update actions to run on Node 16
This commit is contained in:
commit
e6ff094e54
3 changed files with 98 additions and 180 deletions
230
.github/workflows/CICD.yml
vendored
230
.github/workflows/CICD.yml
vendored
|
@ -45,7 +45,6 @@ jobs:
|
||||||
- { os: windows-latest , features: feat_os_windows }
|
- { os: windows-latest , features: feat_os_windows }
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
- name: Initialize workflow variables
|
- name: Initialize workflow variables
|
||||||
id: vars
|
id: vars
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -66,17 +65,12 @@ jobs:
|
||||||
## note: requires 'nightly' toolchain b/c `cargo-udeps` uses the `rustc` '-Z save-analysis' option
|
## note: requires 'nightly' toolchain b/c `cargo-udeps` uses the `rustc` '-Z save-analysis' option
|
||||||
## * ... ref: <https://github.com/est31/cargo-udeps/issues/73>
|
## * ... ref: <https://github.com/est31/cargo-udeps/issues/73>
|
||||||
- name: Install `rust` toolchain
|
- name: Install `rust` toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
run: |
|
||||||
with:
|
rustup toolchain install nightly --profile minimal
|
||||||
toolchain: nightly
|
rustup default nightly
|
||||||
default: true
|
- uses: Swatinem/rust-cache@v2
|
||||||
profile: minimal
|
|
||||||
- name: Install `cargo-udeps`
|
- name: Install `cargo-udeps`
|
||||||
uses: actions-rs/install@v0.1
|
run: cargo install cargo-udeps
|
||||||
with:
|
|
||||||
crate: cargo-udeps
|
|
||||||
version: latest
|
|
||||||
use-tool-cache: false
|
|
||||||
env:
|
env:
|
||||||
RUSTUP_TOOLCHAIN: stable
|
RUSTUP_TOOLCHAIN: stable
|
||||||
- name: Detect unused dependencies
|
- name: Detect unused dependencies
|
||||||
|
@ -103,7 +97,6 @@ jobs:
|
||||||
- { os: ubuntu-latest , features: feat_os_unix }
|
- { os: ubuntu-latest , features: feat_os_unix }
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
- name: Initialize workflow variables
|
- name: Initialize workflow variables
|
||||||
id: vars
|
id: vars
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -122,12 +115,11 @@ jobs:
|
||||||
if [ -n "${{ matrix.job.features }}" ]; then CARGO_FEATURES_OPTION='--features "${{ matrix.job.features }}"' ; fi
|
if [ -n "${{ matrix.job.features }}" ]; then CARGO_FEATURES_OPTION='--features "${{ matrix.job.features }}"' ; fi
|
||||||
outputs CARGO_FEATURES_OPTION
|
outputs CARGO_FEATURES_OPTION
|
||||||
- name: Install `rust` toolchain
|
- name: Install `rust` toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
run: |
|
||||||
with:
|
rm -f "${HOME}/.cargo/bin/"{rustfmt,cargo-fmt}
|
||||||
toolchain: stable
|
rustup toolchain install stable -c rustfmt --profile minimal
|
||||||
default: true
|
rustup default stable
|
||||||
profile: minimal # minimal component installation (ie, no documentation)
|
- uses: Swatinem/rust-cache@v2
|
||||||
components: rustfmt
|
|
||||||
- name: "`cargo fmt` testing"
|
- name: "`cargo fmt` testing"
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
@ -153,7 +145,6 @@ jobs:
|
||||||
- { os: windows-latest , features: feat_os_windows }
|
- { os: windows-latest , features: feat_os_windows }
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
- name: Initialize workflow variables
|
- name: Initialize workflow variables
|
||||||
id: vars
|
id: vars
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -183,12 +174,10 @@ jobs:
|
||||||
macos-latest) brew install coreutils ;; # needed for show-utils.sh
|
macos-latest) brew install coreutils ;; # needed for show-utils.sh
|
||||||
esac
|
esac
|
||||||
- name: Install `rust` toolchain
|
- name: Install `rust` toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
run: |
|
||||||
with:
|
rustup toolchain install stable -c clippy --profile minimal
|
||||||
toolchain: stable
|
rustup default stable
|
||||||
default: true
|
- uses: Swatinem/rust-cache@v2
|
||||||
profile: minimal # minimal component installation (ie, no documentation)
|
|
||||||
components: clippy
|
|
||||||
- name: "`cargo clippy` lint testing"
|
- name: "`cargo clippy` lint testing"
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
@ -263,7 +252,6 @@ jobs:
|
||||||
# - { os: windows-latest , features: feat_os_windows }
|
# - { os: windows-latest , features: feat_os_windows }
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
- name: Initialize workflow variables
|
- name: Initialize workflow variables
|
||||||
id: vars
|
id: vars
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -287,12 +275,10 @@ jobs:
|
||||||
CARGO_UTILITY_LIST_OPTIONS="$(for u in ${UTILITY_LIST}; do echo -n "-puu_${u} "; done;)"
|
CARGO_UTILITY_LIST_OPTIONS="$(for u in ${UTILITY_LIST}; do echo -n "-puu_${u} "; done;)"
|
||||||
outputs CARGO_UTILITY_LIST_OPTIONS
|
outputs CARGO_UTILITY_LIST_OPTIONS
|
||||||
- name: Install `rust` toolchain
|
- name: Install `rust` toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
run: |
|
||||||
with:
|
rustup toolchain install stable -c clippy --profile minimal
|
||||||
toolchain: stable
|
rustup default stable
|
||||||
default: true
|
- uses: Swatinem/rust-cache@v2
|
||||||
profile: minimal # minimal component installation (ie, no documentation)
|
|
||||||
components: clippy
|
|
||||||
- name: "`cargo doc` with warnings"
|
- name: "`cargo doc` with warnings"
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
@ -308,7 +294,6 @@ jobs:
|
||||||
- { os: ubuntu-latest , features: feat_os_unix }
|
- { os: ubuntu-latest , features: feat_os_unix }
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
- name: Initialize workflow variables
|
- name: Initialize workflow variables
|
||||||
id: vars
|
id: vars
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -321,11 +306,10 @@ jobs:
|
||||||
if [ -n "${{ matrix.job.features }}" ]; then CARGO_FEATURES_OPTION='--features "${{ matrix.job.features }}"' ; fi
|
if [ -n "${{ matrix.job.features }}" ]; then CARGO_FEATURES_OPTION='--features "${{ matrix.job.features }}"' ; fi
|
||||||
outputs CARGO_FEATURES_OPTION
|
outputs CARGO_FEATURES_OPTION
|
||||||
- name: Install `rust` toolchain (v${{ env.RUST_MIN_SRV }})
|
- name: Install `rust` toolchain (v${{ env.RUST_MIN_SRV }})
|
||||||
uses: actions-rs/toolchain@v1
|
run: |
|
||||||
with:
|
rustup toolchain install ${{ env.RUST_MIN_SRV }} --profile minimal
|
||||||
toolchain: ${{ env.RUST_MIN_SRV }}
|
rustup default ${{ env.RUST_MIN_SRV }}
|
||||||
default: true
|
- uses: Swatinem/rust-cache@v2
|
||||||
profile: minimal # minimal component installation (ie, no documentation)
|
|
||||||
- name: Confirm MinSRV compatible 'Cargo.lock'
|
- name: Confirm MinSRV compatible 'Cargo.lock'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
@ -360,10 +344,7 @@ jobs:
|
||||||
RUSTUP_TOOLCHAIN=stable cargo fetch --locked --quiet
|
RUSTUP_TOOLCHAIN=stable cargo fetch --locked --quiet
|
||||||
RUSTUP_TOOLCHAIN=stable cargo tree --all --locked --no-dev-dependencies --no-indent ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} | grep -vE "$PWD" | sort --unique
|
RUSTUP_TOOLCHAIN=stable cargo tree --all --locked --no-dev-dependencies --no-indent ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} | grep -vE "$PWD" | sort --unique
|
||||||
- name: Test
|
- name: Test
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo test -v ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} -p uucore -p coreutils
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: -v ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} -p uucore -p coreutils
|
|
||||||
env:
|
env:
|
||||||
RUSTFLAGS: "-Awarnings --cfg unsound_local_offset"
|
RUSTFLAGS: "-Awarnings --cfg unsound_local_offset"
|
||||||
|
|
||||||
|
@ -377,13 +358,11 @@ jobs:
|
||||||
- { os: ubuntu-latest , features: feat_os_unix }
|
- { os: ubuntu-latest , features: feat_os_unix }
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
- name: Install `rust` toolchain
|
- name: Install `rust` toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
run: |
|
||||||
with:
|
rustup toolchain install stable --profile minimal
|
||||||
toolchain: stable
|
rustup default stable
|
||||||
default: true
|
- uses: Swatinem/rust-cache@v2
|
||||||
profile: minimal # minimal component installation (ie, no documentation)
|
|
||||||
- name: "`cargo update` testing"
|
- name: "`cargo update` testing"
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
@ -402,13 +381,11 @@ jobs:
|
||||||
- { os: ubuntu-latest , features: feat_os_unix }
|
- { os: ubuntu-latest , features: feat_os_unix }
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
- name: Install `rust` toolchain
|
- name: Install `rust` toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
run: |
|
||||||
with:
|
rustup toolchain install stable --profile minimal
|
||||||
toolchain: stable
|
rustup default stable
|
||||||
default: true
|
- uses: Swatinem/rust-cache@v2
|
||||||
profile: minimal # minimal component installation (ie, no documentation)
|
|
||||||
- name: "`make build`"
|
- name: "`make build`"
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
@ -433,18 +410,13 @@ jobs:
|
||||||
- { os: windows-latest , features: feat_os_windows }
|
- { os: windows-latest , features: feat_os_windows }
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
- name: Install `rust` toolchain
|
- name: Install `rust` toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
run: |
|
||||||
with:
|
rustup toolchain install stable --profile minimal
|
||||||
toolchain: stable
|
rustup default stable
|
||||||
default: true
|
- uses: Swatinem/rust-cache@v2
|
||||||
profile: minimal # minimal component installation (ie, no documentation)
|
|
||||||
- name: Test
|
- name: Test
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo test ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }}
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }}
|
|
||||||
|
|
||||||
build_rust_nightly:
|
build_rust_nightly:
|
||||||
name: Build/nightly
|
name: Build/nightly
|
||||||
|
@ -460,18 +432,13 @@ jobs:
|
||||||
- { os: windows-latest , features: feat_os_windows }
|
- { os: windows-latest , features: feat_os_windows }
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
- name: Install `rust` toolchain
|
- name: Install `rust` toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
run: |
|
||||||
with:
|
rustup toolchain install nightly --profile minimal
|
||||||
toolchain: nightly
|
rustup default nightly
|
||||||
default: true
|
- uses: Swatinem/rust-cache@v2
|
||||||
profile: minimal # minimal component installation (ie, no documentation)
|
|
||||||
- name: Test
|
- name: Test
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo test ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }}
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }}
|
|
||||||
|
|
||||||
compute_size:
|
compute_size:
|
||||||
name: Binary sizes
|
name: Binary sizes
|
||||||
|
@ -484,7 +451,6 @@ jobs:
|
||||||
- { os: ubuntu-latest , features: feat_os_unix }
|
- { os: ubuntu-latest , features: feat_os_unix }
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
@ -492,11 +458,10 @@ jobs:
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install jq
|
sudo apt-get install jq
|
||||||
- name: Install `rust` toolchain
|
- name: Install `rust` toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
run: |
|
||||||
with:
|
rustup toolchain install stable --profile minimal
|
||||||
toolchain: stable
|
rustup default stable
|
||||||
default: true
|
- uses: Swatinem/rust-cache@v2
|
||||||
profile: minimal # minimal component installation (ie, no documentation)
|
|
||||||
- name: "`make install`"
|
- name: "`make install`"
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
@ -556,7 +521,6 @@ jobs:
|
||||||
- { os: windows-latest , target: x86_64-pc-windows-msvc , features: feat_os_windows }
|
- { os: windows-latest , target: x86_64-pc-windows-msvc , features: feat_os_windows }
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
- name: Initialize workflow variables
|
- name: Initialize workflow variables
|
||||||
id: vars
|
id: vars
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -627,11 +591,11 @@ jobs:
|
||||||
CARGO_FEATURES_OPTION='' ;
|
CARGO_FEATURES_OPTION='' ;
|
||||||
if [ -n "${{ matrix.job.features }}" ]; then CARGO_FEATURES_OPTION='--features=${{ matrix.job.features }}' ; fi
|
if [ -n "${{ matrix.job.features }}" ]; then CARGO_FEATURES_OPTION='--features=${{ matrix.job.features }}' ; fi
|
||||||
outputs CARGO_FEATURES_OPTION
|
outputs CARGO_FEATURES_OPTION
|
||||||
# * CARGO_USE_CROSS (truthy)
|
# * CARGO_CMD
|
||||||
CARGO_USE_CROSS='true' ; case '${{ matrix.job.use-cross }}' in ''|0|f|false|n|no) unset CARGO_USE_CROSS ;; esac;
|
CARGO_CMD='cross' ; case '${{ matrix.job.use-cross }}' in ''|0|f|false|n|no) CARGO_CMD='cargo' ;; esac;
|
||||||
outputs CARGO_USE_CROSS
|
outputs CARGO_CMD
|
||||||
# ** pass needed environment into `cross` container (iff `cross` not already configured via "Cross.toml")
|
# ** pass needed environment into `cross` container (iff `cross` not already configured via "Cross.toml")
|
||||||
if [ -n "${CARGO_USE_CROSS}" ] && [ ! -e "Cross.toml" ] ; then
|
if [ "${CARGO_CMD}" = 'cross' ] && [ ! -e "Cross.toml" ] ; then
|
||||||
cargo install --version 0.2.1 cross
|
cargo install --version 0.2.1 cross
|
||||||
printf "[build.env]\npassthrough = [\"CI\"]\n" > Cross.toml
|
printf "[build.env]\npassthrough = [\"CI\"]\n" > Cross.toml
|
||||||
fi
|
fi
|
||||||
|
@ -680,12 +644,12 @@ jobs:
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
- name: rust toolchain ~ install
|
- name: rust toolchain ~ install
|
||||||
uses: actions-rs/toolchain@v1
|
run: |
|
||||||
|
rustup toolchain install ${{ env.RUST_MIN_SRV }} -t ${{ matrix.job.target }} --profile minimal
|
||||||
|
rustup default ${{ env.RUST_MIN_SRV }}
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ env.RUST_MIN_SRV }}
|
key: ${{ matrix.job.os }}-${{ matrix.job.target }}
|
||||||
target: ${{ matrix.job.target }}
|
|
||||||
default: true
|
|
||||||
profile: minimal # minimal component installation (ie, no documentation)
|
|
||||||
- name: Initialize toolchain-dependent workflow variables
|
- name: Initialize toolchain-dependent workflow variables
|
||||||
id: dep_vars
|
id: dep_vars
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -721,26 +685,20 @@ jobs:
|
||||||
cargo fetch --locked --quiet
|
cargo fetch --locked --quiet
|
||||||
cargo tree --locked --target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} --all --no-dev-dependencies --no-indent | grep -vE "$PWD" | sort --unique
|
cargo tree --locked --target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} --all --no-dev-dependencies --no-indent | grep -vE "$PWD" | sort --unique
|
||||||
- name: Build
|
- name: Build
|
||||||
uses: actions-rs/cargo@v1
|
shell: bash
|
||||||
with:
|
run: |
|
||||||
use-cross: ${{ steps.vars.outputs.CARGO_USE_CROSS }}
|
${{ steps.vars.outputs.CARGO_CMD }} +${{ env.RUST_MIN_SRV }} build --release \
|
||||||
command: build
|
--target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }}
|
||||||
args: --release --target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }}
|
|
||||||
toolchain: ${{ env.RUST_MIN_SRV }}
|
|
||||||
- name: Test
|
- name: Test
|
||||||
uses: actions-rs/cargo@v1
|
shell: bash
|
||||||
with:
|
run: |
|
||||||
use-cross: ${{ steps.vars.outputs.CARGO_USE_CROSS }}
|
${{ steps.vars.outputs.CARGO_CMD }} +${{ env.RUST_MIN_SRV }} test --target=${{ matrix.job.target }} \
|
||||||
command: test
|
${{ steps.vars.outputs.CARGO_TEST_OPTIONS}} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }}
|
||||||
args: --target=${{ matrix.job.target }} ${{ steps.vars.outputs.CARGO_TEST_OPTIONS}} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }}
|
|
||||||
toolchain: ${{ env.RUST_MIN_SRV }}
|
|
||||||
- name: Test individual utilities
|
- name: Test individual utilities
|
||||||
uses: actions-rs/cargo@v1
|
shell: bash
|
||||||
with:
|
run: |
|
||||||
use-cross: ${{ steps.vars.outputs.CARGO_USE_CROSS }}
|
${{ steps.vars.outputs.CARGO_CMD }} +${{ env.RUST_MIN_SRV }} test --target=${{ matrix.job.target }} \
|
||||||
command: test
|
${{ steps.vars.outputs.CARGO_TEST_OPTIONS}} ${{ matrix.job.cargo-options }} ${{ steps.dep_vars.outputs.CARGO_UTILITY_LIST_OPTIONS }}
|
||||||
args: --target=${{ matrix.job.target }} ${{ steps.vars.outputs.CARGO_TEST_OPTIONS}} ${{ matrix.job.cargo-options }} ${{ steps.dep_vars.outputs.CARGO_UTILITY_LIST_OPTIONS }}
|
|
||||||
toolchain: ${{ env.RUST_MIN_SRV }}
|
|
||||||
- name: Archive executable artifacts
|
- name: Archive executable artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
|
@ -801,18 +759,16 @@ jobs:
|
||||||
- { os: ubuntu-latest }
|
- { os: ubuntu-latest }
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
- name: Install/setup prerequisites
|
- name: Install/setup prerequisites
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
## Install/setup prerequisites
|
## Install/setup prerequisites
|
||||||
make prepare-busytest
|
make prepare-busytest
|
||||||
- name: Install `rust` toolchain
|
- name: Install `rust` toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
run: |
|
||||||
with:
|
rustup toolchain install stable --profile minimal
|
||||||
toolchain: stable
|
rustup default stable
|
||||||
default: true
|
- uses: Swatinem/rust-cache@v2
|
||||||
profile: minimal # minimal component installation (ie, no documentation)
|
|
||||||
- name: "Run BusyBox test suite"
|
- name: "Run BusyBox test suite"
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
@ -967,7 +923,6 @@ jobs:
|
||||||
- { os: windows-latest , features: windows }
|
- { os: windows-latest , features: windows }
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
# - name: Reattach HEAD ## may be needed for accurate code coverage info
|
# - name: Reattach HEAD ## may be needed for accurate code coverage info
|
||||||
# run: git checkout ${{ github.head_ref }}
|
# run: git checkout ${{ github.head_ref }}
|
||||||
- name: Initialize workflow variables
|
- name: Initialize workflow variables
|
||||||
|
@ -1017,11 +972,10 @@ jobs:
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
- name: rust toolchain ~ install
|
- name: rust toolchain ~ install
|
||||||
uses: actions-rs/toolchain@v1
|
run: |
|
||||||
with:
|
rustup toolchain install ${{ steps.vars.outputs.TOOLCHAIN }} --profile minimal
|
||||||
toolchain: ${{ steps.vars.outputs.TOOLCHAIN }}
|
rustup default ${{ steps.vars.outputs.TOOLCHAIN }}
|
||||||
default: true
|
- uses: Swatinem/rust-cache@v2
|
||||||
profile: minimal # minimal component installation (ie, no documentation)
|
|
||||||
- name: Initialize toolchain-dependent workflow variables
|
- name: Initialize toolchain-dependent workflow variables
|
||||||
id: dep_vars
|
id: dep_vars
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -1033,10 +987,7 @@ jobs:
|
||||||
CARGO_UTILITY_LIST_OPTIONS="$(for u in ${UTILITY_LIST}; do echo -n "-puu_${u} "; done;)"
|
CARGO_UTILITY_LIST_OPTIONS="$(for u in ${UTILITY_LIST}; do echo -n "-puu_${u} "; done;)"
|
||||||
outputs CARGO_UTILITY_LIST_OPTIONS
|
outputs CARGO_UTILITY_LIST_OPTIONS
|
||||||
- name: Test uucore
|
- name: Test uucore
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo test --no-fail-fast -p uucore
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --no-fail-fast -p uucore
|
|
||||||
env:
|
env:
|
||||||
CARGO_INCREMENTAL: "0"
|
CARGO_INCREMENTAL: "0"
|
||||||
RUSTC_WRAPPER: ""
|
RUSTC_WRAPPER: ""
|
||||||
|
@ -1044,10 +995,7 @@ jobs:
|
||||||
RUSTDOCFLAGS: "-Cpanic=abort"
|
RUSTDOCFLAGS: "-Cpanic=abort"
|
||||||
# RUSTUP_TOOLCHAIN: ${{ steps.vars.outputs.TOOLCHAIN }}
|
# RUSTUP_TOOLCHAIN: ${{ steps.vars.outputs.TOOLCHAIN }}
|
||||||
- name: Test
|
- name: Test
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo test ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} --no-fail-fast
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} --no-fail-fast
|
|
||||||
env:
|
env:
|
||||||
CARGO_INCREMENTAL: "0"
|
CARGO_INCREMENTAL: "0"
|
||||||
RUSTC_WRAPPER: ""
|
RUSTC_WRAPPER: ""
|
||||||
|
@ -1055,10 +1003,7 @@ jobs:
|
||||||
RUSTDOCFLAGS: "-Cpanic=abort"
|
RUSTDOCFLAGS: "-Cpanic=abort"
|
||||||
# RUSTUP_TOOLCHAIN: ${{ steps.vars.outputs.TOOLCHAIN }}
|
# RUSTUP_TOOLCHAIN: ${{ steps.vars.outputs.TOOLCHAIN }}
|
||||||
- name: Test individual utilities
|
- name: Test individual utilities
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo test --no-fail-fast ${{ steps.dep_vars.outputs.CARGO_UTILITY_LIST_OPTIONS }}
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --no-fail-fast ${{ steps.dep_vars.outputs.CARGO_UTILITY_LIST_OPTIONS }}
|
|
||||||
env:
|
env:
|
||||||
CARGO_INCREMENTAL: "0"
|
CARGO_INCREMENTAL: "0"
|
||||||
RUSTC_WRAPPER: ""
|
RUSTC_WRAPPER: ""
|
||||||
|
@ -1067,22 +1012,7 @@ jobs:
|
||||||
# RUSTUP_TOOLCHAIN: ${{ steps.vars.outputs.TOOLCHAIN }}
|
# RUSTUP_TOOLCHAIN: ${{ steps.vars.outputs.TOOLCHAIN }}
|
||||||
- name: "`grcov` ~ install"
|
- name: "`grcov` ~ install"
|
||||||
id: build_grcov
|
id: build_grcov
|
||||||
shell: bash
|
run: cargo install grcov
|
||||||
run: |
|
|
||||||
git clone https://github.com/mozilla/grcov.git ~/grcov/
|
|
||||||
cd ~/grcov
|
|
||||||
# Hardcode the version of crossbeam-epoch. See
|
|
||||||
# https://github.com/uutils/coreutils/issues/3680
|
|
||||||
sed -i -e "s|tempfile =|crossbeam-epoch = \"=0.9.8\"\ntempfile =|" Cargo.toml
|
|
||||||
cargo install --path .
|
|
||||||
cd -
|
|
||||||
# Uncomment when the upstream issue
|
|
||||||
# https://github.com/mozilla/grcov/issues/849 is fixed
|
|
||||||
# uses: actions-rs/install@v0.1
|
|
||||||
# with:
|
|
||||||
# crate: grcov
|
|
||||||
# version: latest
|
|
||||||
# use-tool-cache: false
|
|
||||||
- name: Generate coverage data (via `grcov`)
|
- name: Generate coverage data (via `grcov`)
|
||||||
id: coverage
|
id: coverage
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -1094,9 +1024,9 @@ jobs:
|
||||||
# GRCOV_EXCLUDE_OPTION='--excl-br-line "^\s*((debug_)?assert(_eq|_ne)?!|#\[derive\()"' ## `grcov` ignores these params when passed as an environment variable (why?)
|
# GRCOV_EXCLUDE_OPTION='--excl-br-line "^\s*((debug_)?assert(_eq|_ne)?!|#\[derive\()"' ## `grcov` ignores these params when passed as an environment variable (why?)
|
||||||
mkdir -p "${COVERAGE_REPORT_DIR}"
|
mkdir -p "${COVERAGE_REPORT_DIR}"
|
||||||
# display coverage files
|
# display coverage files
|
||||||
~/.cargo/bin/grcov . --output-types files --ignore build.rs --ignore "vendor/*" --ignore "/*" --ignore "[a-zA-Z]:/*" --excl-br-line "^\s*((debug_)?assert(_eq|_ne)?!|#\[derive\()" | sort --unique
|
~/.cargo/bin/grcov . --output-type files --ignore build.rs --ignore "vendor/*" --ignore "/*" --ignore "[a-zA-Z]:/*" --excl-br-line "^\s*((debug_)?assert(_eq|_ne)?!|#\[derive\()" | sort --unique
|
||||||
# generate coverage report
|
# generate coverage report
|
||||||
~/.cargo/bin/grcov . --output-types lcov --output-path "${COVERAGE_REPORT_FILE}" --branch --ignore build.rs --ignore "vendor/*" --ignore "/*" --ignore "[a-zA-Z]:/*" --excl-br-line "^\s*((debug_)?assert(_eq|_ne)?!|#\[derive\()"
|
~/.cargo/bin/grcov . --output-type lcov --output-path "${COVERAGE_REPORT_FILE}" --branch --ignore build.rs --ignore "vendor/*" --ignore "/*" --ignore "[a-zA-Z]:/*" --excl-br-line "^\s*((debug_)?assert(_eq|_ne)?!|#\[derive\()"
|
||||||
echo "report=${COVERAGE_REPORT_FILE}" >> $GITHUB_OUTPUT
|
echo "report=${COVERAGE_REPORT_FILE}" >> $GITHUB_OUTPUT
|
||||||
- name: Upload coverage results (to Codecov.io)
|
- name: Upload coverage results (to Codecov.io)
|
||||||
uses: codecov/codecov-action@v3
|
uses: codecov/codecov-action@v3
|
||||||
|
|
22
.github/workflows/FixPR.yml
vendored
22
.github/workflows/FixPR.yml
vendored
|
@ -27,7 +27,6 @@ jobs:
|
||||||
- { os: ubuntu-latest , features: feat_os_unix }
|
- { os: ubuntu-latest , features: feat_os_unix }
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
- name: Initialize job variables
|
- name: Initialize job variables
|
||||||
id: vars
|
id: vars
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -38,11 +37,10 @@ jobs:
|
||||||
RUST_MIN_SRV=$(grep -P "^\s+RUST_MIN_SRV:" .github/workflows/CICD.yml | grep -Po "(?<=\x22)\d+[.]\d+(?:[.]\d+)?(?=\x22)" )
|
RUST_MIN_SRV=$(grep -P "^\s+RUST_MIN_SRV:" .github/workflows/CICD.yml | grep -Po "(?<=\x22)\d+[.]\d+(?:[.]\d+)?(?=\x22)" )
|
||||||
outputs RUST_MIN_SRV
|
outputs RUST_MIN_SRV
|
||||||
- name: Install `rust` toolchain (v${{ steps.vars.outputs.RUST_MIN_SRV }})
|
- name: Install `rust` toolchain (v${{ steps.vars.outputs.RUST_MIN_SRV }})
|
||||||
uses: actions-rs/toolchain@v1
|
run: |
|
||||||
with:
|
rustup toolchain install ${{ steps.vars.outputs.RUST_MIN_SRV }} --profile minimal
|
||||||
toolchain: ${{ steps.vars.outputs.RUST_MIN_SRV }}
|
rustup default ${{ steps.vars.outputs.RUST_MIN_SRV }}
|
||||||
default: true
|
- uses: Swatinem/rust-cache@v2
|
||||||
profile: minimal # minimal component installation (ie, no documentation)
|
|
||||||
- name: Ensure updated 'Cargo.lock'
|
- name: Ensure updated 'Cargo.lock'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
@ -91,7 +89,6 @@ jobs:
|
||||||
- { os: ubuntu-latest , features: feat_os_unix }
|
- { os: ubuntu-latest , features: feat_os_unix }
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
- name: Initialize job variables
|
- name: Initialize job variables
|
||||||
id: vars
|
id: vars
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -104,12 +101,11 @@ jobs:
|
||||||
if [ -n "${{ matrix.job.features }}" ]; then CARGO_FEATURES_OPTION='--features "${{ matrix.job.features }}"' ; fi
|
if [ -n "${{ matrix.job.features }}" ]; then CARGO_FEATURES_OPTION='--features "${{ matrix.job.features }}"' ; fi
|
||||||
outputs CARGO_FEATURES_OPTION
|
outputs CARGO_FEATURES_OPTION
|
||||||
- name: Install `rust` toolchain
|
- name: Install `rust` toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
run: |
|
||||||
with:
|
rm -f "${HOME}/.cargo/bin/"{rustfmt,cargo-fmt}
|
||||||
toolchain: stable
|
rustup toolchain install stable -c rustfmt --profile minimal
|
||||||
default: true
|
rustup default stable
|
||||||
profile: minimal # minimal component installation (ie, no documentation)
|
- uses: Swatinem/rust-cache@v2
|
||||||
components: rustfmt
|
|
||||||
- name: "`cargo fmt`"
|
- name: "`cargo fmt`"
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|
26
.github/workflows/GnuTests.yml
vendored
26
.github/workflows/GnuTests.yml
vendored
|
@ -66,12 +66,10 @@ jobs:
|
||||||
workflow_conclusion: completed ## continually recalibrates to last commit of default branch with a successful GnuTests (ie, "self-heals" from GnuTest regressions, but needs more supervision for/of regressions)
|
workflow_conclusion: completed ## continually recalibrates to last commit of default branch with a successful GnuTests (ie, "self-heals" from GnuTest regressions, but needs more supervision for/of regressions)
|
||||||
path: "${{ steps.vars.outputs.path_reference }}"
|
path: "${{ steps.vars.outputs.path_reference }}"
|
||||||
- name: Install `rust` toolchain
|
- name: Install `rust` toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
run: |
|
||||||
with:
|
rm -f "${HOME}/.cargo/bin/"{rustfmt,cargo-fmt}
|
||||||
toolchain: stable
|
rustup toolchain install stable -c rustfmt --profile minimal
|
||||||
default: true
|
rustup default stable
|
||||||
profile: minimal # minimal component installation (ie, no documentation)
|
|
||||||
components: rustfmt
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
@ -281,12 +279,10 @@ jobs:
|
||||||
ref: 'v9.1'
|
ref: 'v9.1'
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: Install `rust` toolchain
|
- name: Install `rust` toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
run: |
|
||||||
with:
|
rm -f "${HOME}/.cargo/bin/"{rustfmt,cargo-fmt}
|
||||||
toolchain: nightly
|
rustup toolchain install nightly -c rustfmt --profile minimal
|
||||||
default: true
|
rustup default nightly
|
||||||
profile: minimal # minimal component installation (ie, no documentation)
|
|
||||||
components: rustfmt
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
|
@ -314,11 +310,7 @@ jobs:
|
||||||
- name: Run GNU tests
|
- name: Run GNU tests
|
||||||
run: bash uutils/util/run-gnu-test.sh
|
run: bash uutils/util/run-gnu-test.sh
|
||||||
- name: "`grcov` ~ install"
|
- name: "`grcov` ~ install"
|
||||||
uses: actions-rs/install@v0.1
|
run: cargo install grcov
|
||||||
with:
|
|
||||||
crate: grcov
|
|
||||||
version: latest
|
|
||||||
use-tool-cache: false
|
|
||||||
- name: Generate coverage data (via `grcov`)
|
- name: Generate coverage data (via `grcov`)
|
||||||
id: coverage
|
id: coverage
|
||||||
run: |
|
run: |
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue