Check more targets
This commit is contained in:
parent
e3c3bc797b
commit
614cf34284
|
@ -308,6 +308,16 @@ coverage-aggregated:
|
||||||
tags:
|
tags:
|
||||||
- amd64
|
- amd64
|
||||||
|
|
||||||
|
check-targets:
|
||||||
|
rules:
|
||||||
|
- if: $CI_PIPELINE_SOURCE == "schedule"
|
||||||
|
stage: test
|
||||||
|
image: rust:latest
|
||||||
|
script:
|
||||||
|
- ./maint/cargo_check_target -il
|
||||||
|
after_script:
|
||||||
|
- cargo clean
|
||||||
|
|
||||||
pages:
|
pages:
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_PIPELINE_SOURCE == "schedule" && $CI_COMMIT_REF_NAME == "main"
|
- if: $CI_PIPELINE_SOURCE == "schedule" && $CI_COMMIT_REF_NAME == "main"
|
||||||
|
|
|
@ -12,14 +12,14 @@ categories = ["network-programming", "cryptography"]
|
||||||
repository = "https://gitlab.torproject.org/tpo/core/arti.git/"
|
repository = "https://gitlab.torproject.org/tpo/core/arti.git/"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["tokio", "native-tls"]
|
default = ["tokio", "native-tls", "compression"]
|
||||||
# "full" is a top-level selector that turns on every feature, _EXCEPT FOR_:
|
# "full" is a top-level selector that turns on every feature, _EXCEPT FOR_:
|
||||||
# * Features that are experimental or unstable
|
# * Features that are experimental or unstable
|
||||||
# * Features that are testing-only
|
# * Features that are testing-only
|
||||||
# * Features which are select a particular implementation or build flag and
|
# * Features which are select a particular implementation or build flag and
|
||||||
# which therefore are not strictly additive.
|
# which therefore are not strictly additive.
|
||||||
# * Features which may introduce unnecessary licensing restrictions.
|
# * Features which may introduce unnecessary licensing restrictions.
|
||||||
full = ["tokio", "async-std", "native-tls", "tor-rtcompat/full", "tor-proto/full", "tor-netdoc/full", "tor-dirmgr/full"]
|
full = ["tokio", "async-std", "native-tls", "compression", "tor-rtcompat/full", "tor-proto/full", "tor-netdoc/full", "tor-dirmgr/full"]
|
||||||
|
|
||||||
async-std = ["tor-rtcompat/async-std"]
|
async-std = ["tor-rtcompat/async-std"]
|
||||||
bridge-client = ["tor-guardmgr/bridge-client"]
|
bridge-client = ["tor-guardmgr/bridge-client"]
|
||||||
|
@ -35,6 +35,8 @@ static-native-tls = ["tor-rtcompat/static", "native-tls"]
|
||||||
accel-sha1-asm = ["tor-llcrypto/with-sha1-asm"]
|
accel-sha1-asm = ["tor-llcrypto/with-sha1-asm"]
|
||||||
accel-openssl = ["tor-llcrypto/with-openssl"]
|
accel-openssl = ["tor-llcrypto/with-openssl"]
|
||||||
|
|
||||||
|
compression = ["tor-dirmgr/compression"]
|
||||||
|
|
||||||
# Enable experimental APIs that are not yet officially supported.
|
# Enable experimental APIs that are not yet officially supported.
|
||||||
#
|
#
|
||||||
# These APIs are not covered by semantic versioning. Using this
|
# These APIs are not covered by semantic versioning. Using this
|
||||||
|
@ -78,7 +80,7 @@ tor-chanmgr = { path = "../tor-chanmgr", version = "0.7.0" }
|
||||||
tor-checkable = { path = "../tor-checkable", version = "0.3.0" }
|
tor-checkable = { path = "../tor-checkable", version = "0.3.0" }
|
||||||
tor-circmgr = { path = "../tor-circmgr", version = "0.6.0" }
|
tor-circmgr = { path = "../tor-circmgr", version = "0.6.0" }
|
||||||
tor-config = { path = "../tor-config", version = "0.6.0" }
|
tor-config = { path = "../tor-config", version = "0.6.0" }
|
||||||
tor-dirmgr = { path = "../tor-dirmgr", version = "0.8.0" }
|
tor-dirmgr = { path = "../tor-dirmgr", version = "0.8.0", default-features = false, features = ["mmap"] }
|
||||||
tor-error = { path = "../tor-error", version = "0.3.2" }
|
tor-error = { path = "../tor-error", version = "0.3.2" }
|
||||||
tor-guardmgr = { path = "../tor-guardmgr", version = "0.7.0" }
|
tor-guardmgr = { path = "../tor-guardmgr", version = "0.7.0" }
|
||||||
tor-llcrypto = { path = "../tor-llcrypto", version = "0.3.5" }
|
tor-llcrypto = { path = "../tor-llcrypto", version = "0.3.5" }
|
||||||
|
|
|
@ -159,6 +159,8 @@ about these features.
|
||||||
[native-tls](https://github.com/sfackler/rust-native-tls) crate for TLS
|
[native-tls](https://github.com/sfackler/rust-native-tls) crate for TLS
|
||||||
support
|
support
|
||||||
* `async-std` -- build with [async-std](https://async.rs/) support
|
* `async-std` -- build with [async-std](https://async.rs/) support
|
||||||
|
* `compression` (default) -- Build support for downloading compressed
|
||||||
|
documents. Requires a C compiler.
|
||||||
|
|
||||||
* `full` -- Build with all features above, along with all stable additive
|
* `full` -- Build with all features above, along with all stable additive
|
||||||
features from other arti crates. (This does not include experimental
|
features from other arti crates. (This does not include experimental
|
||||||
|
|
|
@ -12,9 +12,9 @@ categories = ["command-line-utilities", "cryptography"]
|
||||||
repository = "https://gitlab.torproject.org/tpo/core/arti.git/"
|
repository = "https://gitlab.torproject.org/tpo/core/arti.git/"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["tokio", "native-tls", "dns-proxy", "harden"]
|
default = ["tokio", "native-tls", "dns-proxy", "harden", "compression"]
|
||||||
|
|
||||||
full = ["async-std", "tokio", "native-tls", "journald", "arti-client/full", "dns-proxy", "harden"]
|
full = ["async-std", "tokio", "native-tls", "journald", "arti-client/full", "dns-proxy", "harden", "compression"]
|
||||||
|
|
||||||
async-std = [
|
async-std = [
|
||||||
"arti-client/async-std",
|
"arti-client/async-std",
|
||||||
|
@ -40,6 +40,8 @@ journald = ["tracing-journald"]
|
||||||
accel-sha1-asm = ["arti-client/accel-sha1-asm"]
|
accel-sha1-asm = ["arti-client/accel-sha1-asm"]
|
||||||
accel-openssl = ["arti-client/accel-openssl"]
|
accel-openssl = ["arti-client/accel-openssl"]
|
||||||
|
|
||||||
|
compression = ["arti-client/compression"]
|
||||||
|
|
||||||
# This feature flag enables experimental features that are not supported. Turning it on may
|
# This feature flag enables experimental features that are not supported. Turning it on may
|
||||||
# void your API.
|
# void your API.
|
||||||
experimental = ["arti-client/experimental", "experimental-api"]
|
experimental = ["arti-client/experimental", "experimental-api"]
|
||||||
|
|
|
@ -121,6 +121,8 @@ work.
|
||||||
DNS queries over the Tor network.
|
DNS queries over the Tor network.
|
||||||
* `harden` (default) -- Build with support for hardening the Arti process by
|
* `harden` (default) -- Build with support for hardening the Arti process by
|
||||||
disabling debugger attachment and other local memory-inspection vectors.
|
disabling debugger attachment and other local memory-inspection vectors.
|
||||||
|
* `compression` (default) -- Build support for downloading compressed
|
||||||
|
documents. Requires a C compiler.
|
||||||
|
|
||||||
* `full` -- Build with all features above, along with all stable additive
|
* `full` -- Build with all features above, along with all stable additive
|
||||||
features from other arti crates. (This does not include experimental
|
features from other arti crates. (This does not include experimental
|
||||||
|
|
|
@ -12,13 +12,14 @@ categories = ["network-programming", "cryptography"]
|
||||||
repository = "https://gitlab.torproject.org/tpo/core/arti.git/"
|
repository = "https://gitlab.torproject.org/tpo/core/arti.git/"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["mmap"]
|
default = ["mmap", "compression"]
|
||||||
full = ["routerdesc"]
|
full = ["routerdesc"]
|
||||||
experimental = ["experimental-api", "dirfilter", "bridge-client"]
|
experimental = ["experimental-api", "dirfilter", "bridge-client"]
|
||||||
bridge-client = ["tor-circmgr/specific-relay", "tor-guardmgr/bridge-client", "routerdesc"]
|
bridge-client = ["tor-circmgr/specific-relay", "tor-guardmgr/bridge-client", "routerdesc"]
|
||||||
|
|
||||||
mmap = ["memmap2"]
|
mmap = ["memmap2"]
|
||||||
static = ["rusqlite/bundled"]
|
static = ["rusqlite/bundled"]
|
||||||
|
compression = ["tor-dirclient/xz", "tor-dirclient/zstd"]
|
||||||
# (Incomplete) support for downloading and storing router descriptors
|
# (Incomplete) support for downloading and storing router descriptors
|
||||||
routerdesc = ["tor-dirclient/routerdesc"]
|
routerdesc = ["tor-dirclient/routerdesc"]
|
||||||
dirfilter = []
|
dirfilter = []
|
||||||
|
@ -63,7 +64,7 @@ tor-checkable = { path = "../tor-checkable", version = "0.3.0" }
|
||||||
tor-circmgr = { path = "../tor-circmgr", version = "0.6.0" }
|
tor-circmgr = { path = "../tor-circmgr", version = "0.6.0" }
|
||||||
tor-config = { path = "../tor-config", version = "0.6.0" }
|
tor-config = { path = "../tor-config", version = "0.6.0" }
|
||||||
tor-consdiff = { path = "../tor-consdiff", version = "0.3.0" }
|
tor-consdiff = { path = "../tor-consdiff", version = "0.3.0" }
|
||||||
tor-dirclient = { path = "../tor-dirclient", version = "0.5.0" }
|
tor-dirclient = { path = "../tor-dirclient", version = "0.5.0", default-features = false }
|
||||||
tor-error = { path = "../tor-error", version = "0.3.2" }
|
tor-error = { path = "../tor-error", version = "0.3.2" }
|
||||||
tor-guardmgr = { path = "../tor-guardmgr", version = "0.7.0" }
|
tor-guardmgr = { path = "../tor-guardmgr", version = "0.7.0" }
|
||||||
tor-llcrypto = { path = "../tor-llcrypto", version = "0.3.5" }
|
tor-llcrypto = { path = "../tor-llcrypto", version = "0.3.5" }
|
||||||
|
|
|
@ -26,6 +26,9 @@ reading large directory objects from disk.
|
||||||
`routerdesc` -- (Incomplete) support for downloading and storing
|
`routerdesc` -- (Incomplete) support for downloading and storing
|
||||||
router descriptors.
|
router descriptors.
|
||||||
|
|
||||||
|
`compression` (default) -- Build support for downloading compressed
|
||||||
|
documents. Requires a C compiler.
|
||||||
|
|
||||||
### Experimental and unstable features
|
### Experimental and unstable features
|
||||||
|
|
||||||
Note that the APIs enabled by these features are NOT covered by
|
Note that the APIs enabled by these features are NOT covered by
|
||||||
|
|
|
@ -77,7 +77,7 @@ age and the difficulty of working with them.
|
||||||
|
|
||||||
We currently have automated tests on Linux only. On OSX and Windows, we
|
We currently have automated tests on Linux only. On OSX and Windows, we
|
||||||
have automated builds, but the tests are not (yet) run. In the long
|
have automated builds, but the tests are not (yet) run. In the long
|
||||||
run, we aim to have automated builds and testing for all of our these
|
run, we aim to have automated builds and testing for all of these
|
||||||
platforms.
|
platforms.
|
||||||
|
|
||||||
All other modern Free operating systems are **community-supported**:
|
All other modern Free operating systems are **community-supported**:
|
||||||
|
|
|
@ -0,0 +1,109 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
SCRIPT_NAME=$(basename "$0")
|
||||||
|
|
||||||
|
# all targets with status "maintained" or higher"
|
||||||
|
# this should match `rustup target list | grep -E '(linux|windows|ios|darwin)' | grep -E '(arm|i.86|x86|aarch|thumb)'`
|
||||||
|
MAINTAINED_PLATFORMS=(
|
||||||
|
"aarch64-apple-darwin"
|
||||||
|
"aarch64-apple-ios"
|
||||||
|
"aarch64-apple-ios-sim"
|
||||||
|
"aarch64-linux-android"
|
||||||
|
"aarch64-pc-windows-msvc"
|
||||||
|
"aarch64-unknown-linux-gnu"
|
||||||
|
"aarch64-unknown-linux-musl"
|
||||||
|
#"arm-linux-androideabi" AtomicU64 not supported; breaks coarsetime
|
||||||
|
"arm-unknown-linux-gnueabi"
|
||||||
|
"arm-unknown-linux-gnueabihf"
|
||||||
|
"arm-unknown-linux-musleabi"
|
||||||
|
"arm-unknown-linux-musleabihf"
|
||||||
|
#"armv5te-unknown-linux-gnueabi" AtomicU64 not supported; breaks coarsetime
|
||||||
|
#"armv5te-unknown-linux-musleabi" AtomicU64 not supported; breaks coarsetime
|
||||||
|
"armv7-linux-androideabi"
|
||||||
|
"armv7-unknown-linux-gnueabi"
|
||||||
|
"armv7-unknown-linux-gnueabihf"
|
||||||
|
"armv7-unknown-linux-musleabi"
|
||||||
|
"armv7-unknown-linux-musleabihf"
|
||||||
|
#"i586-pc-windows-msvc" trait `Zeroize` is not implemented for `__m128i`; breaks aes
|
||||||
|
#"i586-unknown-linux-gnu" trait `Zeroize` is not implemented for `__m128i`; breaks aes
|
||||||
|
#"i586-unknown-linux-musl" trait `Zeroize` is not implemented for `__m128i`; breaks aes
|
||||||
|
"i686-linux-android"
|
||||||
|
"i686-pc-windows-gnu"
|
||||||
|
"i686-pc-windows-msvc"
|
||||||
|
"i686-unknown-linux-gnu"
|
||||||
|
"i686-unknown-linux-musl"
|
||||||
|
"thumbv7neon-linux-androideabi"
|
||||||
|
"thumbv7neon-unknown-linux-gnueabihf"
|
||||||
|
"x86_64-apple-darwin"
|
||||||
|
"x86_64-apple-ios"
|
||||||
|
"x86_64-linux-android"
|
||||||
|
"x86_64-pc-windows-gnu"
|
||||||
|
"x86_64-pc-windows-msvc"
|
||||||
|
"x86_64-unknown-linux-gnu"
|
||||||
|
"x86_64-unknown-linux-gnux32"
|
||||||
|
"x86_64-unknown-linux-musl"
|
||||||
|
)
|
||||||
|
|
||||||
|
# SUPPORTTARGET, excluding emulators (x86 android...), and unusual combo (Windows on ARM...)
|
||||||
|
SUPPORTTARGETED_PLATFORMS=(
|
||||||
|
"aarch64-apple-darwin"
|
||||||
|
"aarch64-apple-ios"
|
||||||
|
"aarch64-linux-android"
|
||||||
|
"aarch64-unknown-linux-gnu"
|
||||||
|
"armv7-linux-androideabi"
|
||||||
|
"i686-pc-windows-gnu"
|
||||||
|
"i686-unknown-linux-gnu"
|
||||||
|
"x86_64-apple-darwin"
|
||||||
|
"x86_64-pc-windows-gnu"
|
||||||
|
"x86_64-pc-windows-msvc"
|
||||||
|
"x86_64-unknown-linux-gnu"
|
||||||
|
"x86_64-unknown-linux-musl"
|
||||||
|
)
|
||||||
|
|
||||||
|
function usage()
|
||||||
|
{
|
||||||
|
cat <<EOF
|
||||||
|
${SCRIPT_NAME}: Check arti for many targets, with parameters minimising dependancies
|
||||||
|
on platform dependant tooling.
|
||||||
|
Usage:
|
||||||
|
cargo_check_target [opts] : Run cargo check for many targets.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-h: Print this message.
|
||||||
|
-i: Install the target if they are missing
|
||||||
|
-l: Longer test, test ${#MAINTAINED_PLATFORMS[@]} targets instead of ${#SUPPORTTARGETED_PLATFORMS[@]}.
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
install=no
|
||||||
|
to_build=("${SUPPORTTARGETED_PLATFORMS[@]}")
|
||||||
|
|
||||||
|
while getopts "hil" opt ; do
|
||||||
|
case "$opt" in
|
||||||
|
h) usage
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
i) install=yes
|
||||||
|
;;
|
||||||
|
l) to_build=("${MAINTAINED_PLATFORMS[@]}")
|
||||||
|
;;
|
||||||
|
*) echo "Unknown option."
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$install" = "yes" ]; then
|
||||||
|
rustup target add "${to_build[@]}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
CC=$(realpath "$(dirname "$0")")/stunt/fake-cc
|
||||||
|
export CC
|
||||||
|
for target in "${to_build[@]}" ; do
|
||||||
|
echo "Testing $target"
|
||||||
|
# don't include "compression" as it requires a C compiler for the given target
|
||||||
|
PKG_CONFIG_ALLOW_CROSS=1 cargo check -p arti --no-default-features --features tokio,native-tls,dns-proxy,harden --target "$target"
|
||||||
|
done
|
||||||
|
rm "$CC"
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# this is made to convince openssl-sys we have a working compiler for the target it wants
|
||||||
|
echo RUST_VERSION_OPENSSL_0x101010efL
|
|
@ -20,7 +20,7 @@ Options:
|
||||||
-s: Skip generating a final report.
|
-s: Skip generating a final report.
|
||||||
-f <format>: format to use when generating coverage report. one of html (default), ade,
|
-f <format>: format to use when generating coverage report. one of html (default), ade,
|
||||||
lcov, coveralls, coveralls+, files, covdir, or cobertura
|
lcov, coveralls, coveralls+, files, covdir, or cobertura
|
||||||
-o <path>: set the output path for the coverage report (defaiult "coverage")
|
-o <path>: set the output path for the coverage report (default "coverage")
|
||||||
|
|
||||||
Notes:
|
Notes:
|
||||||
You need to have grcov and llvm-tools-preview installed.
|
You need to have grcov and llvm-tools-preview installed.
|
||||||
|
|
Loading…
Reference in New Issue