Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/workflows/openbsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ jobs:
name: Style and Lint
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
job:
- { features: "feat_Tier1,feat_require_unix" }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might hardcoded feat_os_unix at previous PR.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you removed feat_os_unix in #15547. I don't think that is right though as we now don't check feat_Tier1.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oech3 matrix build is unnecessary though, how about:

    env:
      FEATURES: "feat_Tier1,feat_require_unix"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It FEATURES something officially supported by cargo? If not, I'd avoid environment variables to avoid sideffects.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It FEATURES something officially supported by cargo?

No it is not. However, using a build matrix makes the job name more complex, for example:

Style and Lint (feat_Tier1,feat_require_unix)

instead of

Style and Lint

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep this thread and wait maintainer's review.

steps:
- uses: actions/checkout@v7.0.1
with:
Expand Down Expand Up @@ -99,7 +104,7 @@ jobs:
## cargo clippy lint testing
if [ -z "\${FAULT}" ]; then
echo "::group::cargo clippy"
CLIPPY_ARGS="--features feat_os_unix --fault-type \${FAULT_TYPE}"
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::"
Expand All @@ -113,6 +118,11 @@ jobs:
name: Tests
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
job:
- { features: "feat_Tier1,feat_require_unix" }
steps:
- uses: actions/checkout@v7.0.1
with:
Expand Down Expand Up @@ -198,7 +208,7 @@ jobs:
# Use cargo test since nextest might not support OpenBSD
if (test -z "\$FAULT"); then
echo "::group::cargo test (workspace)"
cargo test --features feat_os_unix || FAULT=1
cargo test --features ${{ matrix.job.features }} || FAULT=1
echo "::endgroup::"
fi
if (test -z "\$FAULT"); then
Expand Down
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -643,10 +643,11 @@ feat_require_unix_core = [
"mknod",
"stat",
"stty",
"uptime",
]
# "feat_require_unix_utmpx" == set of utilities requiring unix utmp/utmpx support
# * ref: <https://wiki.musl-libc.org/faq.html#Q:-Why-is-the-utmp/wtmp-functionality-only-implemented-as-stubs?>
feat_require_unix_utmpx = ["pinky", "uptime", "users", "who"]
feat_require_unix_utmpx = ["pinky", "users", "who"]
# "feat_require_selinux" == set of utilities depending on SELinux.
feat_require_selinux = ["chcon", "runcon"]
## (alternate/newer/smaller platforms) feature sets
Expand Down
Loading