Skip to content

Commit 717140a

Browse files
committed
ci: group openbsd log sections for easier failure triage
1 parent 79f5e03 commit 717140a

2 files changed

Lines changed: 25 additions & 12 deletions

File tree

.github/workflows/openbsd.yml

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ jobs:
8585
# * determine sub-crate utility list
8686
UTILITY_LIST="\$(./util/show-utils.sh --features ${{ matrix.job.features }})"
8787
## Info
88-
# environment
89-
echo "## environment"
88+
echo "::group::environment"
9089
echo "CI='${CI}'"
9190
echo "REPO_NAME='${REPO_NAME}'"
9291
echo "TEST_USER='${TEST_USER}'"
@@ -95,24 +94,27 @@ jobs:
9594
echo "FAULT_PREFIX='\${FAULT_PREFIX}'"
9695
echo "UTILITY_LIST='\${UTILITY_LIST}'"
9796
env | sort
98-
# tooling info
99-
echo "## tooling info"
97+
echo "::endgroup::"
98+
echo "::group::tooling info"
10099
cargo -V
101100
rustc -V
101+
echo "::endgroup::"
102102
#
103103
# To ensure that files are cleaned up, we don't want to exit on error
104104
set +e
105105
unset FAULT
106106
## cargo fmt testing
107-
echo "## cargo fmt testing"
107+
echo "::group::cargo fmt"
108108
# * 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>
109109
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 ; }
110+
echo "::endgroup::"
110111
## cargo clippy lint testing
111112
if [ -z "\${FAULT}" ]; then
112-
echo "## cargo clippy lint testing"
113+
echo "::group::cargo clippy"
113114
CLIPPY_ARGS="--features ${{ matrix.job.features }} --fault-type \${FAULT_TYPE}"
114115
if [ -n "\${FAIL_ON_FAULT}" ]; then CLIPPY_ARGS="\${CLIPPY_ARGS} --fail-on-fault"; fi
115116
python3 util/run-clippy.py \${CLIPPY_ARGS} || FAULT=true
117+
echo "::endgroup::"
116118
fi
117119
# Clean to avoid to rsync back the files and free up disk space
118120
cargo clean
@@ -179,18 +181,18 @@ jobs:
179181
mkdir -p ~/.cargo/bin
180182
# Note: nextest might not have OpenBSD builds, so we'll use regular cargo test
181183
## Info
182-
# environment
183-
echo "## environment"
184+
echo "::group::environment"
184185
echo "CI='${CI}'"
185186
echo "REPO_NAME='${REPO_NAME}'"
186187
echo "TEST_USER='${TEST_USER}'"
187188
echo "WORKSPACE_PARENT='${WORKSPACE_PARENT}'"
188189
echo "WORKSPACE='${WORKSPACE}'"
189190
env | sort
190-
# tooling info
191-
echo "## tooling info"
191+
echo "::endgroup::"
192+
echo "::group::tooling info"
192193
cargo -V
193194
rustc -V
195+
echo "::endgroup::"
194196
#
195197
# To ensure that files are cleaned up, we don't want to exit on error
196198
set +e
@@ -203,14 +205,24 @@ jobs:
203205
# Avoid filling disk space
204206
export RUSTFLAGS="-C strip=symbols"
205207
# Use cargo test since nextest might not support OpenBSD
206-
if (test -z "\$FAULT"); then cargo test --features '${{ matrix.job.features }}' || FAULT=1 ; fi
208+
if (test -z "\$FAULT"); then
209+
echo "::group::cargo test (workspace)"
210+
cargo test --features '${{ matrix.job.features }}' || FAULT=1
211+
echo "::endgroup::"
212+
fi
207213
# There is no systemd-logind on OpenBSD, so test all features except feat_systemd_logind
208214
if (test -z "\$FAULT"); then
215+
echo "::group::cargo test (uucore)"
209216
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 "," -)
210217
cargo test --features "\$UUCORE_FEATURES" -p uucore || FAULT=1
218+
echo "::endgroup::"
211219
fi
212220
# Test building with make
213-
if (test -z "\$FAULT"); then make MULTICALL=Y || FAULT=1 ; fi
221+
if (test -z "\$FAULT"); then
222+
echo "::group::make MULTICALL=Y"
223+
make MULTICALL=Y || FAULT=1
224+
echo "::endgroup::"
225+
fi
214226
# Clean to avoid to rsync back the files and free up disk space
215227
cargo clean
216228
# Additional cleanup to free disk space

.vscode/cspell.dictionaries/jargon.wordlist.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ discoverability
4242
duplicative
4343
dsync
4444
endianness
45+
endgroup
4546
enqueue
4647
ERANGE
4748
errored

0 commit comments

Comments
 (0)