From 717140a13c5d0effce644d4c42e6cd48b8f151a5 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 15 Apr 2026 08:08:37 +0200 Subject: [PATCH] ci: group openbsd log sections for easier failure triage --- .github/workflows/openbsd.yml | 36 ++++++++++++------- .../cspell.dictionaries/jargon.wordlist.txt | 1 + 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/.github/workflows/openbsd.yml b/.github/workflows/openbsd.yml index 797185e04..38a5a729b 100644 --- a/.github/workflows/openbsd.yml +++ b/.github/workflows/openbsd.yml @@ -85,8 +85,7 @@ jobs: # * determine sub-crate utility list UTILITY_LIST="\$(./util/show-utils.sh --features ${{ matrix.job.features }})" ## Info - # environment - echo "## environment" + echo "::group::environment" echo "CI='${CI}'" echo "REPO_NAME='${REPO_NAME}'" echo "TEST_USER='${TEST_USER}'" @@ -95,24 +94,27 @@ jobs: echo "FAULT_PREFIX='\${FAULT_PREFIX}'" echo "UTILITY_LIST='\${UTILITY_LIST}'" env | sort - # tooling info - echo "## tooling info" + echo "::endgroup::" + echo "::group::tooling info" cargo -V rustc -V + echo "::endgroup::" # # To ensure that files are cleaned up, we don't want to exit on error set +e unset FAULT ## cargo fmt testing - echo "## cargo fmt testing" + echo "::group::cargo fmt" # * convert any errors/warnings to GHA UI annotations; ref: S=\$(cargo fmt -- --check) && printf "%s\n" "\$S" || { printf "%s\n" "\$S" ; printf "%s\n" "\$S" | sed -E -n -e "s/^Diff[[:space:]]+in[[:space:]]+\${PWD//\//\\\\/}\/(.*)[[:space:]]+at[[:space:]]+[^0-9]+([0-9]+).*\$/::\${FAULT_TYPE} file=\1,line=\2::\${FAULT_PREFIX}: \\\`cargo fmt\\\`: style violation (file:'\1', line:\2; use \\\`cargo fmt -- \"\1\"\\\`)/p" ; FAULT=true ; } + echo "::endgroup::" ## cargo clippy lint testing if [ -z "\${FAULT}" ]; then - echo "## cargo clippy lint testing" + echo "::group::cargo clippy" CLIPPY_ARGS="--features ${{ matrix.job.features }} --fault-type \${FAULT_TYPE}" if [ -n "\${FAIL_ON_FAULT}" ]; then CLIPPY_ARGS="\${CLIPPY_ARGS} --fail-on-fault"; fi python3 util/run-clippy.py \${CLIPPY_ARGS} || FAULT=true + echo "::endgroup::" fi # Clean to avoid to rsync back the files and free up disk space cargo clean @@ -179,18 +181,18 @@ jobs: mkdir -p ~/.cargo/bin # Note: nextest might not have OpenBSD builds, so we'll use regular cargo test ## Info - # environment - echo "## environment" + echo "::group::environment" echo "CI='${CI}'" echo "REPO_NAME='${REPO_NAME}'" echo "TEST_USER='${TEST_USER}'" echo "WORKSPACE_PARENT='${WORKSPACE_PARENT}'" echo "WORKSPACE='${WORKSPACE}'" env | sort - # tooling info - echo "## tooling info" + echo "::endgroup::" + echo "::group::tooling info" cargo -V rustc -V + echo "::endgroup::" # # To ensure that files are cleaned up, we don't want to exit on error set +e @@ -203,14 +205,24 @@ jobs: # Avoid filling disk space export RUSTFLAGS="-C strip=symbols" # Use cargo test since nextest might not support OpenBSD - if (test -z "\$FAULT"); then cargo test --features '${{ matrix.job.features }}' || FAULT=1 ; fi + if (test -z "\$FAULT"); then + echo "::group::cargo test (workspace)" + cargo test --features '${{ matrix.job.features }}' || FAULT=1 + echo "::endgroup::" + fi # There is no systemd-logind on OpenBSD, so test all features except feat_systemd_logind if (test -z "\$FAULT"); then + echo "::group::cargo test (uucore)" UUCORE_FEATURES=\$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | select(.name == "uucore") | .features | keys | .[]' | grep -v "feat_systemd_logind" | paste -s -d "," -) cargo test --features "\$UUCORE_FEATURES" -p uucore || FAULT=1 + echo "::endgroup::" fi # Test building with make - if (test -z "\$FAULT"); then make MULTICALL=Y || FAULT=1 ; fi + if (test -z "\$FAULT"); then + echo "::group::make MULTICALL=Y" + make MULTICALL=Y || FAULT=1 + echo "::endgroup::" + fi # Clean to avoid to rsync back the files and free up disk space cargo clean # Additional cleanup to free disk space diff --git a/.vscode/cspell.dictionaries/jargon.wordlist.txt b/.vscode/cspell.dictionaries/jargon.wordlist.txt index 1c3e6525c..289875c17 100644 --- a/.vscode/cspell.dictionaries/jargon.wordlist.txt +++ b/.vscode/cspell.dictionaries/jargon.wordlist.txt @@ -42,6 +42,7 @@ discoverability duplicative dsync endianness +endgroup enqueue ERANGE errored