-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add GHA CICD #1449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GHA CICD #1449
Changes from all commits
c969bec
1f137c2
1f5749e
6043ac1
181c9d6
662db61
a9b1a03
b276f47
768ed71
493f5f1
ba5a243
291d2f5
413c64f
c6817ae
c6e9808
3c2e609
88db11a
1642933
90a64a8
2d95cfd
4ddc65f
d192ebe
8142ecf
e676447
3bff709
25b1f98
bc558f3
1216378
bf63682
3da2a69
11d68d3
ec5ca19
a72422f
ea8ed8d
fa8540c
2e90c78
564168c
88a45a1
94c088f
ab87a1a
8c97f0e
2db6fb2
b8eb763
b003d55
2931c80
bb15dcf
8b18b7c
739c2d5
600c404
3bddf84
98039f1
fd8e5ac
82dc40f
55b3e4e
6612445
d343d53
33e5d8c
de9d702
f933c60
aa2ed76
3344060
8ec50b7
7cc3571
2ef9c9a
248dfba
bffea95
37a3db1
8f2cdcf
6131f6f
1deac8d
58779be
37c9b0e
5094d6f
784887c
5241eca
a90e1ab
44a60f7
99ce03f
df68c39
cc49983
e80970c
b8c0711
522d3ae
6230ab3
6c7c478
372ddf9
d82a170
082f952
a6bdad3
b4866af
daecc56
15722e3
5af8503
b7a3c4d
a529d4c
ca7d565
0083aa9
83a2c9d
ebc29e8
1d26e90
3ae3d11
bcc1cc0
6adddcf
3ec47ff
e894214
b5d541a
c4a69f2
75f05df
9b145bb
84e26b3
0fdf27c
080cbb5
c484fb8
0635c5f
ce0bb21
ecc895e
5224c3c
0cf704a
9675add
7e15375
641017f
b57ee7e
69408fc
05c8294
4cf8487
ab9da0a
97de0df
57ef582
ab9eb31
1c97a29
78d55f0
156502a
ecb8f28
84f05f2
3e3dff3
d704fb2
b8da0d7
7eeb58a
6a18d7f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,92 +6,122 @@ build = "build.rs" | |
autotests = false | ||
|
||
[features] | ||
unix = [ | ||
default = [ "feat_common_core" ] | ||
## OS feature shortcodes | ||
macos = [ "feat_os_unix" ] | ||
unix = [ "feat_os_unix" ] | ||
windows = [ "feat_os_windows" ] | ||
## project-specific feature shortcodes | ||
nightly = [] | ||
test_unimplemented = [] | ||
## feature sets | ||
# "feat_os_unix" == set of utilities which can be built/run on modern/usual *nix platforms | ||
feat_os_unix = [ | ||
"feat_common", | ||
"feat_os_unix_musl", | ||
"feat_os_unix_utmpx_required", | ||
# | ||
"stdbuf", | ||
] | ||
# "feat_os_unix_fuchsia" == set of utilities which can be built/run on the "Fuschia" OS (refs: <https://fuchsia.dev>; <https://en.wikipedia.org/wiki/Google_Fuchsia>) | ||
feat_os_unix_fuchsia = [ | ||
"feat_common_core", | ||
# | ||
"chgrp", | ||
"chmod", | ||
"chown", | ||
"chroot", | ||
"du", | ||
"groups", | ||
"hostid", | ||
"id", | ||
"install", | ||
"kill", | ||
"logname", | ||
"mkfifo", | ||
"mknod", | ||
"nice", | ||
"numfmt", | ||
"nohup", | ||
"pathchk", | ||
"pinky", | ||
"stat", | ||
"stdbuf", | ||
"timeout", | ||
"touch", | ||
"tty", | ||
"uname", | ||
"unlink", | ||
"uptime", | ||
"users", | ||
"who", | ||
|
||
"generic" | ||
] | ||
windows = ["generic"] | ||
windows_legacy = [ | ||
"arch", | ||
"nproc", | ||
"sync", | ||
"touch", | ||
"whoami", | ||
|
||
"redox_generic" | ||
] | ||
# Feature "fuchsia" contains the exclusive list of utilities | ||
# that can be compiled and run on Fuchsia. Should be built | ||
# with --no-default-features when selecting this feature. | ||
# TODO: merge with "unix" to avoid duplication once we support | ||
# all utilities in that feature. | ||
fuchsia = [ | ||
# unix utilities | ||
# "feat_os_unix_gnueabihf" == set of utilities which can be built/run on the "arm-unknown-linux-gnueabihf" target (ARMv6 Linux [hardfloat]) | ||
feat_os_unix_gnueabihf = [ | ||
"feat_common", | ||
"feat_os_unix_musl", | ||
"feat_os_unix_utmpx_required", | ||
] | ||
# "feat_os_unix_musl" == set of utilities which can be built/run on targets binding to the "musl" library (ref: <https://musl.libc.org/about.html>) | ||
feat_os_unix_musl = [ | ||
"feat_common", | ||
# | ||
"chgrp", | ||
"chmod", | ||
"chown", | ||
"chroot", | ||
"du", | ||
"groups", | ||
"hostid", | ||
"id", | ||
"install", | ||
"kill", | ||
"logname", | ||
"mkfifo", | ||
"mknod", | ||
"nice", | ||
"numfmt", | ||
"nohup", | ||
"pathchk", | ||
"stdbuf", | ||
"stat", | ||
"timeout", | ||
"touch", | ||
"tty", | ||
"uname", | ||
"unlink", | ||
|
||
# All generic utilities | ||
"generic" | ||
] | ||
generic = [ | ||
# "feat_os_unix_redox" == set of utilities which can be built/run on "Redox OS" (refs: <https://www.redox-os.org>; <https://en.wikipedia.org/wiki/Redox_(operating_system)>) | ||
feat_os_unix_redox = [ | ||
"feat_common_core", | ||
# | ||
"uname", | ||
"chmod", | ||
"install", | ||
] | ||
# "feat_os_unix_utmpx_required" == set of utilites requiring utmp/utmpx support | ||
# * ref: <https://wiki.musl-libc.org/faq.html#Q:-Why-is-the-utmp/wtmp-functionality-only-implemented-as-stubs?> | ||
feat_os_unix_utmpx_required = [ | ||
"pinky", | ||
"uptime", | ||
"users", | ||
"who", | ||
] | ||
# "feat_os_windows" == set of utilities which can be built/run on modern/usual windows platforms | ||
feat_os_windows = [ | ||
"feat_common", ## == "feat_os_windows_legacy" + "hostname" | ||
] | ||
# "feat_os_windows_legacy" == slightly restricted set of utilities which can be built/run on early windows platforms (eg, "WinXP") | ||
feat_os_windows_legacy = [ | ||
"feat_common_core", | ||
# | ||
"arch", | ||
"nproc", | ||
"sync", | ||
"touch", | ||
"whoami", | ||
] | ||
## (common/core) feature sets | ||
# "feat_common" == expanded set of utilities which can be built/run on the usual rust "tier 1" target platforms (ref: <https://forge.rust-lang.org/release/platform-support.html>) | ||
feat_common = [ | ||
"feat_common_core", | ||
# | ||
"arch", | ||
"hostname", | ||
"nproc", | ||
"sync", | ||
"touch", | ||
"whoami", | ||
"redox_generic" | ||
] | ||
# Feature "redox"/"redox_generic" contains the exclusive list of utilities | ||
# that can be compiled and run on redox. Should be built | ||
# with --no-default-features when selecting this feature. | ||
# TODO: merge with "generic" to avoid duplication once we support | ||
# all utilities in that feature. | ||
redox_generic = [ | ||
|
||
# And maybe all generic utilities | ||
# "feat_common_core" == baseline core set of utilities which can be built/run on most targets | ||
feat_common_core = [ | ||
"base32", | ||
"base64", | ||
"basename", | ||
|
@@ -153,20 +183,11 @@ redox_generic = [ | |
"wc", | ||
"yes", | ||
] | ||
redox = [ | ||
"uname", | ||
"chmod", | ||
"install", | ||
"redox_generic" | ||
] | ||
test_unimplemented = [] | ||
nightly = [] | ||
default = ["unix"] | ||
|
||
[workspace] | ||
|
||
[dependencies] | ||
uucore = "0.0.1" | ||
uucore = "0.0.2" | ||
arch = { optional=true, path="src/arch" } | ||
base32 = { optional=true, path="src/base32" } | ||
base64 = { optional=true, path="src/base64" } | ||
|
@@ -260,16 +281,19 @@ wc = { optional=true, path="src/wc" } | |
who = { optional=true, path="src/who" } | ||
whoami = { optional=true, path="src/whoami" } | ||
yes = { optional=true, path="src/yes" } | ||
# | ||
# * transitive dependency via 'failure'; pin to <= v0.3.30 to avoid increasing MinSRV to v1.33.0 | ||
backtrace = ">= 0.3.3, <= 0.3.30" | ||
|
||
[dev-dependencies] | ||
time = "0.1.42" | ||
filetime = "0.2.5" | ||
lazy_static = "1.3.0" | ||
libc = "0.2.62" | ||
regex = "1.0.3" | ||
rand = "0.6.5" | ||
regex = "1.0.3" | ||
tempdir = "0.3.7" | ||
time = "0.1.42" | ||
unindent = "0.1.3" | ||
lazy_static = "1.3.0" | ||
|
||
[target.'cfg(unix)'.dev-dependencies] | ||
# FIXME: this should use the normal users crate, but it conflicts with the users utility | ||
|
@@ -282,3 +306,6 @@ path = "src/uutils/uutils.rs" | |
|
||
[[test]] | ||
name = "tests" | ||
|
||
[patch.crates-io] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pretty sure this has been merged, so get rid of this. I (or you, once you accept the invite) will bump the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It didn't work (maybe b/c of caching?) when I tried use the crate directly after the PR correcting the problem was merged. I'll remove this in a future PR once |
||
uucore = { git = "https://github.com/rivy/rust.uucore", tag = "0.0.2" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally, I would prefer if the features didn't start with
feat_
. If you want them to be hidden, I think simply starting or ending them with an underscore looks nicer.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything starting with
feat_
is named that way so that thebuild.rs
script can differentiate between crates included as dependencies and true feature sets modifying the build (excepting commonly used features such as "default" and "nightly" and the OS feature names ["macos", "windows", "unix"]). After some thought and experimentation, I selected the "feat_" as the differentiating prefix. It's a moderate length prefix that will likely never collide with a dependency name and simultaneously hints to the dev what it is and how it's being used. Although, "_" could likely also be used, I avoided it for those reasons and as more confusing to a newcomer to the code about its use and more difficult to see when looking at the code.Additionally, can "test_unimplemented" be removed? I don't see it being actually used anywhere.