From 80a9eaf8ab1f9ade649251b9549e948ea94f14eb Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Tue, 22 Feb 2022 17:12:12 -0600 Subject: [PATCH 1/6] maint/CICD ~ normalize to use expanded 10 digit SHAs --- .github/workflows/CICD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 79f8dd933..ae03ff457 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -553,7 +553,7 @@ jobs: REF_NAME=${GITHUB_REF#refs/*/} unset REF_BRANCH ; case "${GITHUB_REF}" in refs/heads/*) REF_BRANCH=${GITHUB_REF#refs/heads/} ;; esac; unset REF_TAG ; case "${GITHUB_REF}" in refs/tags/*) REF_TAG=${GITHUB_REF#refs/tags/} ;; esac; - REF_SHAS=${GITHUB_SHA:0:8} + REF_SHAS=${GITHUB_SHA:0:10} outputs REF_NAME REF_BRANCH REF_TAG REF_SHAS # parse target unset TARGET_ARCH From 0b4ef62eedd35f6e3efa0f575faba0df776e4d13 Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Wed, 18 Jan 2023 11:43:07 -0600 Subject: [PATCH 2/6] maint/CICD ~ refactor to standard use of `outputs()` --- .github/workflows/CICD.yml | 4 +++- .github/workflows/GnuTests.yml | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index ae03ff457..c4ed13049 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -846,7 +846,9 @@ jobs: shell: bash run: | ## VARs setup - echo "TEST_SUMMARY_FILE=toybox-result.json" >> $GITHUB_OUTPUT + outputs() { step_id="vars"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } + TEST_SUMMARY_FILE="toybox-result.json" + outputs TEST_SUMMARY_FILE - uses: actions/checkout@v3 - uses: Swatinem/rust-cache@v2 - name: rust toolchain ~ install diff --git a/.github/workflows/GnuTests.yml b/.github/workflows/GnuTests.yml index 1000792f3..123805644 100644 --- a/.github/workflows/GnuTests.yml +++ b/.github/workflows/GnuTests.yml @@ -23,7 +23,7 @@ jobs: shell: bash run: | ## VARs setup - outputs() { step_id="vars"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } + outputs() { step_id="${{ github.action }}"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } # * config path_GNU="gnu" path_GNU_tests="${path_GNU}/tests" @@ -123,7 +123,7 @@ jobs: run: | path_UUTILS='${{ steps.vars.outputs.path_UUTILS }}' ## Extract/summarize testing info - outputs() { step_id="summary"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } + outputs() { step_id="${{ github.action }}"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } # SUITE_LOG_FILE='${{ steps.vars.outputs.SUITE_LOG_FILE }}' ROOT_SUITE_LOG_FILE='${{ steps.vars.outputs.ROOT_SUITE_LOG_FILE }}' From f0ce605f4be8bc779c8692bb23df8fb3a6f5cf4f Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Wed, 18 Jan 2023 11:34:08 -0600 Subject: [PATCH 3/6] maint/CICD ~ improve/update `outputs()` function --- .github/workflows/CICD.yml | 22 +++++++++++----------- .github/workflows/FixPR.yml | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index c4ed13049..e8e3dd903 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -50,7 +50,7 @@ jobs: shell: bash run: | ## VARs setup - outputs() { step_id="vars"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } + outputs() { step_id="${{ github.action }}"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } # failure mode unset FAIL_ON_FAULT ; case '${{ env.STYLE_FAIL_ON_FAULT }}' in ''|0|f|false|n|no|off) FAULT_TYPE=warning ;; @@ -102,7 +102,7 @@ jobs: shell: bash run: | ## VARs setup - outputs() { step_id="vars"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } + outputs() { step_id="${{ github.action }}"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } # failure mode unset FAIL_ON_FAULT ; case '${{ env.STYLE_FAIL_ON_FAULT }}' in ''|0|f|false|n|no|off) FAULT_TYPE=warning ;; @@ -150,7 +150,7 @@ jobs: shell: bash run: | ## VARs setup - outputs() { step_id="vars"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } + outputs() { step_id="${{ github.action }}"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } # failure mode unset FAIL_ON_FAULT ; case '${{ env.STYLE_FAIL_ON_FAULT }}' in ''|0|f|false|n|no|off) FAULT_TYPE=warning ;; @@ -206,7 +206,7 @@ jobs: shell: bash run: | ## VARs setup - outputs() { step_id="vars"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } + outputs() { step_id="${{ github.action }}"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } # failure mode unset FAIL_ON_FAULT ; case '${{ env.STYLE_FAIL_ON_FAULT }}' in ''|0|f|false|n|no|off) FAULT_TYPE=warning ;; @@ -257,7 +257,7 @@ jobs: shell: bash run: | ## VARs setup - outputs() { step_id="vars"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } + outputs() { step_id="${{ github.action }}"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } # failure mode unset FAIL_ON_FAULT ; case '${{ env.STYLE_FAIL_ON_FAULT }}' in ''|0|f|false|n|no|off) FAULT_TYPE=warning ;; @@ -299,7 +299,7 @@ jobs: shell: bash run: | ## VARs setup - outputs() { step_id="vars"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } + outputs() { step_id="${{ github.action }}"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } # target-specific options # * CARGO_FEATURES_OPTION unset CARGO_FEATURES_OPTION @@ -533,7 +533,7 @@ jobs: shell: bash run: | ## VARs setup - outputs() { step_id="vars"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } + outputs() { step_id="${{ github.action }}"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } # toolchain TOOLCHAIN="stable" ## default to "stable" toolchain # * specify alternate/non-default TOOLCHAIN for *-pc-windows-gnu targets; gnu targets on Windows are broken for the standard *-pc-windows-msvc toolchain (refs: GH:rust-lang/rust#47048, GH:rust-lang/rust#53454, GH:rust-lang/cargo#6754) @@ -662,7 +662,7 @@ jobs: shell: bash run: | ## Dependent VARs setup - outputs() { step_id="dep_vars"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } + outputs() { step_id="${{ github.action }}"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } # * determine sub-crate utility list UTILITY_LIST="$(./util/show-utils.sh ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }})" echo UTILITY_LIST=${UTILITY_LIST} @@ -846,7 +846,7 @@ jobs: shell: bash run: | ## VARs setup - outputs() { step_id="vars"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } + outputs() { step_id="${{ github.action }}"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } TEST_SUMMARY_FILE="toybox-result.json" outputs TEST_SUMMARY_FILE - uses: actions/checkout@v3 @@ -1064,7 +1064,7 @@ jobs: shell: bash run: | ## VARs setup - outputs() { step_id="vars"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } + outputs() { step_id="${{ github.action }}"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } # toolchain TOOLCHAIN="nightly" ## default to "nightly" toolchain (required for certain required unstable compiler flags) ## !maint: refactor when stable channel has needed support # * specify gnu-type TOOLCHAIN for windows; `grcov` requires gnu-style code coverage data files @@ -1115,7 +1115,7 @@ jobs: shell: bash run: | ## Dependent VARs setup - outputs() { step_id="dep_vars"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } + outputs() { step_id="${{ github.action }}"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } # * determine sub-crate utility list UTILITY_LIST="$(./util/show-utils.sh ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }})" CARGO_UTILITY_LIST_OPTIONS="$(for u in ${UTILITY_LIST}; do echo -n "-puu_${u} "; done;)" diff --git a/.github/workflows/FixPR.yml b/.github/workflows/FixPR.yml index f2e9e7bb3..0227a5fa9 100644 --- a/.github/workflows/FixPR.yml +++ b/.github/workflows/FixPR.yml @@ -32,7 +32,7 @@ jobs: shell: bash run: | ## VARs setup - outputs() { step_id="vars"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } + outputs() { step_id="${{ github.action }}"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } # surface MSRV from CICD workflow RUST_MIN_SRV=$(grep -P "^\s+RUST_MIN_SRV:" .github/workflows/CICD.yml | grep -Po "(?<=\x22)\d+[.]\d+(?:[.]\d+)?(?=\x22)" ) outputs RUST_MIN_SRV @@ -94,7 +94,7 @@ jobs: shell: bash run: | ## VARs setup - outputs() { step_id="vars"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } + outputs() { step_id="${{ github.action }}"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } # target-specific options # * CARGO_FEATURES_OPTION CARGO_FEATURES_OPTION='' ; From 6f5f3736ce2767f761c22d30f2064b43578dbb5e Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Wed, 18 Jan 2023 11:35:26 -0600 Subject: [PATCH 4/6] docs ~ update spell-checker exceptions --- .github/workflows/CICD.yml | 8 ++++---- .github/workflows/GnuTests.yml | 7 ++++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index e8e3dd903..3ff7fdf31 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -1,11 +1,11 @@ name: CICD -# spell-checker:ignore (acronyms) CICD MSVC musl +# spell-checker:ignore (abbrev/names) CICD CodeCOV MacOS MinGW MSVC musl # spell-checker:ignore (env/flags) Awarnings Ccodegen Coverflow Cpanic Dwarnings RUSTDOCFLAGS RUSTFLAGS Zpanic # spell-checker:ignore (jargon) SHAs deps dequote softprops subshell toolchain -# spell-checker:ignore (names) CodeCOV MacOS MinGW Peltoche rivy -# spell-checker:ignore (shell/tools) choco clippy dmake dpkg esac fakeroot gmake grcov halium lcov libssl mkdir popd printf pushd rsync rustc rustfmt rustup shopt xargs -# spell-checker:ignore (misc) aarch alnum armhf bindir busytest coreutils gnueabihf issuecomment maint nullglob onexitbegin onexitend pell runtest tempfile testsuite uutils DESTDIR multisize Swatinem +# spell-checker:ignore (people) Peltoche rivy +# spell-checker:ignore (shell/tools) choco clippy dmake dpkg esac fakeroot fdesc fdescfs gmake grcov halium lcov libssl mkdir popd printf pushd rsync rustc rustfmt rustup shopt utmpdump xargs +# spell-checker:ignore (misc) aarch alnum armhf bindir busytest coreutils defconfig DESTDIR gecos gnueabihf issuecomment maint multisize nullglob onexitbegin onexitend pell runtest Swatinem tempfile testsuite toybox uutils env: PROJECT_NAME: coreutils diff --git a/.github/workflows/GnuTests.yml b/.github/workflows/GnuTests.yml index 123805644..fe6ba6e01 100644 --- a/.github/workflows/GnuTests.yml +++ b/.github/workflows/GnuTests.yml @@ -1,6 +1,11 @@ name: GnuTests -# spell-checker:ignore (names) gnulib ; (jargon) submodules ; (people) Dawid Dziurla * dawidd ; (utils) autopoint chksum gperf pyinotify shopt texinfo ; (vars) FILESET SUBDIRS XPASS +# spell-checker:ignore (abbrev/names) CodeCov gnulib GnuTests +# spell-checker:ignore (jargon) submodules +# spell-checker:ignore (libs/utils) autopoint chksum gperf lcov libexpect pyinotify shopt texinfo valgrind +# spell-checker:ignore (options) Ccodegen Coverflow Cpanic Zpanic +# spell-checker:ignore (people) Dawid Dziurla * dawidd +# spell-checker:ignore (vars) FILESET SUBDIRS XPASS # * note: to run a single test => `REPO/util/run-gnu-test.sh PATH/TO/TEST/SCRIPT` From f4086f237f6330077e7aacf9a42ec204418d94e7 Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Wed, 18 Jan 2023 11:41:39 -0600 Subject: [PATCH 5/6] maint/CICD ~ re-label bash script steps for easier review --- .github/workflows/CICD.yml | 30 +++++++++++++++++++++++++----- .github/workflows/FixPR.yml | 2 ++ .github/workflows/GnuTests.yml | 14 +++++++++++++- 3 files changed, 40 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 3ff7fdf31..b168cb332 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -116,6 +116,7 @@ jobs: outputs CARGO_FEATURES_OPTION - name: Install `rust` toolchain run: | + ## Install `rust` toolchain rm -f "${HOME}/.cargo/bin/"{rustfmt,cargo-fmt} rustup toolchain install stable -c rustfmt --profile minimal rustup default stable @@ -170,11 +171,13 @@ jobs: - name: Install/setup prerequisites shell: bash run: | + ## Install/setup prerequisites case '${{ matrix.job.os }}' in macos-latest) brew install coreutils ;; # needed for show-utils.sh esac - name: Install `rust` toolchain run: | + ## Install `rust` toolchain rustup toolchain install stable -c clippy --profile minimal rustup default stable - uses: Swatinem/rust-cache@v2 @@ -276,6 +279,7 @@ jobs: outputs CARGO_UTILITY_LIST_OPTIONS - name: Install `rust` toolchain run: | + ## Install `rust` toolchain rustup toolchain install stable -c clippy --profile minimal rustup default stable - uses: Swatinem/rust-cache@v2 @@ -307,6 +311,7 @@ jobs: outputs CARGO_FEATURES_OPTION - name: Install `rust` toolchain (v${{ env.RUST_MIN_SRV }}) run: | + ## Install `rust` toolchain (v${{ env.RUST_MIN_SRV }}) rustup toolchain install ${{ env.RUST_MIN_SRV }} --profile minimal rustup default ${{ env.RUST_MIN_SRV }} - uses: Swatinem/rust-cache@v2 @@ -361,6 +366,7 @@ jobs: - uses: actions/checkout@v3 - name: Install `rust` toolchain run: | + ## Install `rust` toolchain rustup toolchain install stable --profile minimal rustup default stable - uses: Swatinem/rust-cache@v2 @@ -384,6 +390,7 @@ jobs: - uses: actions/checkout@v3 - name: Install `rust` toolchain run: | + ## Install `rust` toolchain rustup toolchain install stable --profile minimal rustup default stable - uses: Swatinem/rust-cache@v2 @@ -415,6 +422,7 @@ jobs: - uses: actions/checkout@v3 - name: Install `rust` toolchain run: | + ## Install `rust` toolchain rustup toolchain install stable --profile minimal rustup default stable - uses: Swatinem/rust-cache@v2 @@ -439,6 +447,7 @@ jobs: - uses: actions/checkout@v3 - name: Install `rust` toolchain run: | + ## Install `rust` toolchain rustup toolchain install nightly --profile minimal rustup default nightly - uses: Swatinem/rust-cache@v2 @@ -466,19 +475,22 @@ jobs: sudo apt-get install jq - name: Install `rust` toolchain run: | + ## Install `rust` toolchain rustup toolchain install stable --profile minimal rustup default stable - uses: Swatinem/rust-cache@v2 - name: "`make install`" shell: bash run: | + ## `make install` make install DESTDIR=target/size-release/ make install MULTICALL=y DESTDIR=target/size-multi-release/ # strip the results strip target/size*/usr/local/bin/* - - name: "Compute sizes" + - name: Compute uutil release sizes shell: bash run: | + ## Compute uutil release sizes SIZE=$(du -s target/size-release/usr/local/bin/|awk '{print $1}') SIZEMULTI=$(du -s target/size-multi-release/usr/local/bin/|awk '{print $1}') jq -n \ @@ -652,6 +664,7 @@ jobs: esac - name: rust toolchain ~ install run: | + ## rust toolchain ~ install rustup toolchain install ${{ env.RUST_MIN_SRV }} -t ${{ matrix.job.target }} --profile minimal rustup default ${{ env.RUST_MIN_SRV }} - uses: Swatinem/rust-cache@v2 @@ -694,11 +707,13 @@ jobs: - name: Build shell: bash run: | + ## Build ${{ steps.vars.outputs.CARGO_CMD }} +${{ env.RUST_MIN_SRV }} build --release \ --target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} - name: Test shell: bash run: | + ## Test ${{ steps.vars.outputs.CARGO_CMD }} +${{ env.RUST_MIN_SRV }} test --target=${{ matrix.job.target }} \ ${{ steps.vars.outputs.CARGO_TEST_OPTIONS}} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} env: @@ -706,6 +721,7 @@ jobs: - name: Test individual utilities shell: bash run: | + ## Test individual utilities ${{ steps.vars.outputs.CARGO_CMD }} +${{ env.RUST_MIN_SRV }} test --target=${{ matrix.job.target }} \ ${{ steps.vars.outputs.CARGO_TEST_OPTIONS}} ${{ matrix.job.cargo-options }} ${{ steps.dep_vars.outputs.CARGO_UTILITY_LIST_OPTIONS }} env: @@ -782,10 +798,11 @@ jobs: run: | ## Install/setup prerequisites make prepare-busytest - - name: "Run BusyBox test suite" + - name: Run BusyBox test suite id: summary shell: bash run: | + ## Run BusyBox test suite set -v cp .busybox-config target/debug/.config ## Run BusyBox test suite @@ -853,11 +870,13 @@ jobs: - uses: Swatinem/rust-cache@v2 - name: rust toolchain ~ install run: | + ## rust toolchain ~ install rustup toolchain install ${{ env.RUST_MIN_SRV }} --profile minimal rustup default ${{ env.RUST_MIN_SRV }} - - name: "Build coreutils as multiple binaries" + - name: Build coreutils as multiple binaries shell: bash run: | + ## Build individual uutil binaries set -v make - name: Install/setup prerequisites @@ -865,12 +884,12 @@ jobs: run: | ## Install/setup prerequisites make toybox-src - - name: "Run Toybox test suite" + - name: Run Toybox test suite id: summary shell: bash run: | - set -v ## Run Toybox test suite + set -v cd tmp/toybox-*/ make defconfig make tests &> tmp.log || true @@ -1107,6 +1126,7 @@ jobs: esac - name: rust toolchain ~ install run: | + ## rust toolchain ~ install rustup toolchain install ${{ steps.vars.outputs.TOOLCHAIN }} --profile minimal rustup default ${{ steps.vars.outputs.TOOLCHAIN }} - uses: Swatinem/rust-cache@v2 diff --git a/.github/workflows/FixPR.yml b/.github/workflows/FixPR.yml index 0227a5fa9..52561fb36 100644 --- a/.github/workflows/FixPR.yml +++ b/.github/workflows/FixPR.yml @@ -38,6 +38,7 @@ jobs: outputs RUST_MIN_SRV - name: Install `rust` toolchain (v${{ steps.vars.outputs.RUST_MIN_SRV }}) run: | + ## Install `rust` toolchain (v${{ steps.vars.outputs.RUST_MIN_SRV }}) rustup toolchain install ${{ steps.vars.outputs.RUST_MIN_SRV }} --profile minimal rustup default ${{ steps.vars.outputs.RUST_MIN_SRV }} - uses: Swatinem/rust-cache@v2 @@ -102,6 +103,7 @@ jobs: outputs CARGO_FEATURES_OPTION - name: Install `rust` toolchain run: | + ## Install `rust` toolchain rm -f "${HOME}/.cargo/bin/"{rustfmt,cargo-fmt} rustup toolchain install stable -c rustfmt --profile minimal rustup default stable diff --git a/.github/workflows/GnuTests.yml b/.github/workflows/GnuTests.yml index fe6ba6e01..a462b946a 100644 --- a/.github/workflows/GnuTests.yml +++ b/.github/workflows/GnuTests.yml @@ -72,6 +72,7 @@ jobs: path: "${{ steps.vars.outputs.path_reference }}" - name: Install `rust` toolchain run: | + ## Install `rust` toolchain rm -f "${HOME}/.cargo/bin/"{rustfmt,cargo-fmt} rustup toolchain install stable -c rustfmt --profile minimal rustup default stable @@ -84,6 +85,7 @@ jobs: - name: Add various locales shell: bash run: | + ## Add various locales echo "Before:" locale -a ## Some tests fail with 'cannot change locale (en_US.ISO-8859-1): No such file or directory' @@ -108,28 +110,32 @@ jobs: - name: Run GNU tests shell: bash run: | + ## Run GNU tests path_GNU='${{ steps.vars.outputs.path_GNU }}' path_UUTILS='${{ steps.vars.outputs.path_UUTILS }}' bash "${path_UUTILS}/util/run-gnu-test.sh" - name: Run GNU root tests shell: bash run: | + ## Run GNU root tests path_GNU='${{ steps.vars.outputs.path_GNU }}' path_UUTILS='${{ steps.vars.outputs.path_UUTILS }}' bash "${path_UUTILS}/util/run-gnu-test.sh" run-root - name: Extract testing info into JSON shell: bash run : | + ## Extract testing info into JSON path_UUTILS='${{ steps.vars.outputs.path_UUTILS }}' python ${path_UUTILS}/util/gnu-json-result.py ${{ steps.vars.outputs.path_GNU_tests }} > ${{ steps.vars.outputs.TEST_FULL_SUMMARY_FILE }} - name: Extract/summarize testing info id: summary shell: bash run: | - path_UUTILS='${{ steps.vars.outputs.path_UUTILS }}' ## Extract/summarize testing info outputs() { step_id="${{ github.action }}"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } # + path_UUTILS='${{ steps.vars.outputs.path_UUTILS }}' + # SUITE_LOG_FILE='${{ steps.vars.outputs.SUITE_LOG_FILE }}' ROOT_SUITE_LOG_FILE='${{ steps.vars.outputs.ROOT_SUITE_LOG_FILE }}' ls -al ${SUITE_LOG_FILE} ${ROOT_SUITE_LOG_FILE} @@ -185,6 +191,7 @@ jobs: - name: Compare test failures VS reference shell: bash run: | + ## Compare test failures VS reference have_new_failures="" REF_LOG_FILE='${{ steps.vars.outputs.path_reference }}/test-logs/test-suite.log' REF_SUMMARY_FILE='${{ steps.vars.outputs.path_reference }}/test-summary/gnu-result.json' @@ -259,6 +266,7 @@ jobs: if: success() || failure() # run regardless of prior step success/failure shell: bash run: | + ## Compare test summary VS reference REF_SUMMARY_FILE='${{ steps.vars.outputs.path_reference }}/test-summary/gnu-result.json' if test -f "${REF_SUMMARY_FILE}"; then echo "Reference SHA1/ID: $(sha1sum -- "${REF_SUMMARY_FILE}")" @@ -285,15 +293,18 @@ jobs: submodules: recursive - name: Install `rust` toolchain run: | + ## Install `rust` toolchain rm -f "${HOME}/.cargo/bin/"{rustfmt,cargo-fmt} rustup toolchain install nightly -c rustfmt --profile minimal rustup default nightly - name: Install dependencies run: | + ## Install dependencies sudo apt update sudo apt install autoconf autopoint bison texinfo gperf gcc g++ gdb python3-pyinotify jq valgrind libexpect-perl -y - name: Add various locales run: | + ## Add various locales echo "Before:" locale -a ## Some tests fail with 'cannot change locale (en_US.ISO-8859-1): No such file or directory' @@ -310,6 +321,7 @@ jobs: RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort" RUSTDOCFLAGS: "-Cpanic=abort" run: | + ## Build binaries cd uutils UU_MAKE_PROFILE=debug bash util/build-gnu.sh - name: Run GNU tests From 9b440dfab6e139fb193a26351671b28a94d3ea45 Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Wed, 18 Jan 2023 11:42:06 -0600 Subject: [PATCH 6/6] maint/CICD ~ refactor var names --- .github/workflows/CICD.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index b168cb332..6f61cf6d1 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -492,12 +492,12 @@ jobs: run: | ## Compute uutil release sizes SIZE=$(du -s target/size-release/usr/local/bin/|awk '{print $1}') - SIZEMULTI=$(du -s target/size-multi-release/usr/local/bin/|awk '{print $1}') + SIZE_MULTI=$(du -s target/size-multi-release/usr/local/bin/|awk '{print $1}') jq -n \ --arg date "$(date --rfc-email)" \ --arg sha "$GITHUB_SHA" \ --arg size "$SIZE" \ - --arg multisize "$SIZEMULTI" \ + --arg multisize "$SIZE_MULTI" \ '{($date): { sha: $sha, size: $size, multisize: $multisize, }}' > size-result.json - uses: actions/upload-artifact@v3 with: