fix ci for aws-lc-rs features

This commit is contained in:
Σrebe - Romain GERARD
2025-05-29 13:24:57 +02:00
parent 5d39d853d6
commit 2dc86098e4
8 changed files with 49 additions and 4097 deletions

View File

@@ -14,8 +14,9 @@ jobs:
build:
name: Build - ${{ matrix.platform.name }}
# By default, runs on Ubuntu, otherwise, override with the desired os
runs-on: ${{ matrix.platform.os || 'ubuntu-22.04' }}
runs-on: ${{ matrix.platform.os || 'ubuntu-24.04' }}
strategy:
fail-fast: false
matrix:
# Set platforms you want to build your binaries on
platform:
@@ -26,7 +27,7 @@ jobs:
- name: Linux x86
target: i686-unknown-linux-musl
build-args: "--release"
build-args: "--release --features aws-lc-rs-bindgen"
- name: Linux aarch64
target: aarch64-unknown-linux-musl
@@ -34,15 +35,15 @@ jobs:
- name: Linux armv7hf
target: armv7-unknown-linux-musleabihf
build-args: "--release"
build-args: "--release --no-default-features --features ring"
- name: Freebsd x86_64
target: x86_64-unknown-freebsd
build-args: "--release --features=jemalloc"
build-args: "--release --no-default-features --features ring --features=jemalloc"
- name: Freebsd x86
target: i686-unknown-freebsd
build-args: "--release"
build-args: "--release --no-default-features --features ring"
- name: Android aarch64
target: aarch64-linux-android
@@ -50,7 +51,7 @@ jobs:
- name: Android armv7
target: armv7-linux-androideabi
build-args: "--release"
build-args: "--release --no-default-features --features ring"
#- name: Linux mips
# target: mips-unknown-linux-musl
@@ -86,16 +87,17 @@ jobs:
- name: Windows x86
os: windows-latest
target: i686-pc-windows-msvc
build-args: "--profile release-with-symbols"
build-args: "--profile release-with-symbols --no-default-features --features ring"
steps:
- name: Install package for linux
if: contains(matrix.platform.target, 'linux')
run: sudo apt install musl-tools
- name: Install package for Android
if: contains(matrix.platform.target, 'android')
run: sudo apt install android-libunwind android-libunwind-dev libunwind-dev
run: sudo apt install android-libunwind android-libunwind-dev libunwind-dev
- name: Set up JDK 17
if: contains(matrix.platform.target, 'android')
@@ -126,6 +128,9 @@ jobs:
if: contains(matrix.platform.target, 'android')
run: cargo install cross --git https://github.com/cross-rs/cross
- name: Install bindgen-cli
run: cargo install bindgen-cli
- name: Show command used for Cargo
run: |
echo "cargo command is: ${{ env.CARGO }}"

27
Cargo.lock generated
View File

@@ -190,13 +190,29 @@ version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
[[package]]
name = "aws-lc-fips-sys"
version = "0.13.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e99d74bb793a19f542ae870a6edafbc5ecf0bc0ba01d4636b7f7e0aba9ee9bd3"
dependencies = [
"bindgen",
"cc",
"cmake",
"dunce",
"fs_extra",
"regex",
]
[[package]]
name = "aws-lc-rs"
version = "1.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93fcc8f365936c834db5514fc45aee5b1202d677e6b40e48468aaaa8183ca8c7"
dependencies = [
"aws-lc-fips-sys",
"aws-lc-sys",
"untrusted 0.7.1",
"zeroize",
]
@@ -2251,7 +2267,7 @@ dependencies = [
"cfg-if",
"getrandom 0.2.16",
"libc",
"untrusted",
"untrusted 0.9.0",
"windows-sys 0.52.0",
]
@@ -2423,7 +2439,7 @@ dependencies = [
"aws-lc-rs",
"ring",
"rustls-pki-types",
"untrusted",
"untrusted 0.9.0",
]
[[package]]
@@ -3201,6 +3217,12 @@ version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861"
[[package]]
name = "untrusted"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"
[[package]]
name = "untrusted"
version = "0.9.0"
@@ -3863,6 +3885,7 @@ dependencies = [
"anyhow",
"arc-swap",
"async-channel",
"aws-lc-rs",
"base64 0.22.1",
"bb8",
"bytes",

View File

@@ -1,5 +1,5 @@
[workspace]
resolver = "2"
resolver = "3"
members = [
"wstunnel",

View File

@@ -32,7 +32,7 @@ ARG BIN_TARGET=--bins
ARG PROFILE=release
#ENV RUSTFLAGS="-C link-arg=-Wl,--compress-debug-sections=zlib -C force-frame-pointers=yes"
RUN cargo build --package=wstunnel-cli --features=jemalloc --profile=${PROFILE} ${BIN_TARGET}
RUN cargo build --features=jemalloc --profile=${PROFILE} ${BIN_TARGET}
############################################################

View File

@@ -4,10 +4,10 @@ _default:
@just --list
make_release $VERSION $FORCE="":
sed -i 's/^version = .*/version = "'$VERSION'"/g' wstunnel-cli/Cargo.toml Cargo.toml
sed -i 's/^version = .*/version = "'$VERSION'"/g' wstunnel-cli/Cargo.toml wstunnel/Cargo.toml
cargo fmt --all -- --check --color=always || (echo "Use cargo fmt to format your code"; exit 1)
cargo clippy --all --all-features -- -D warnings || (echo "Solve your clippy warnings to succeed"; exit 1)
git add Cargo.* wstunnel-cli/Cargo.toml
git add wstunnel/Cargo.* wstunnel-cli/Cargo.* Cargo.*
git commit -m 'Bump version v'$VERSION
git tag $FORCE v$VERSION -m 'version v'$VERSION
git push $FORCE

View File

@@ -19,6 +19,7 @@ default = ["aws-lc-rs"]
jemalloc = ["dep:tikv-jemallocator"]
aws-lc-rs = ["wstunnel/aws-lc-rs"]
ring = ["wstunnel/ring"]
aws-lc-rs-bindgen = ["wstunnel/aws-lc-rs-bindgen"]
[[bin]]
name = "wstunnel"

4069
wstunnel/Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -51,6 +51,11 @@ urlencoding = "2.1.3"
uuid = { version = "1.16.0", features = ["v7", "serde"] }
derive_more = { version = "2.0.1", features = ["display", "error"] }
tokio-rustls = { version = "0.26.2", default-features = false, features = ["logging", "tls12"] }
rcgen = { version = "0.13.2", default-features = false, features = [] }
hickory-resolver = { version = "0.25.2", default-features = false, features = ["system-config", "tokio", "rustls-platform-verifier"] }
aws-lc-rs = { version = "*", optional = true }
[target.'cfg(not(target_family = "unix"))'.dependencies]
crossterm = { version = "0.29.0" }
tokio-util = { version = "0.7.15", features = ["io"] }
@@ -58,20 +63,6 @@ tokio-util = { version = "0.7.15", features = ["io"] }
[target.'cfg(target_family = "unix")'.dependencies]
tokio-fd = "0.3.0"
#[target.'cfg(all(any(target_os = "linux", target_os = "macos"), any(target_arch = "x86_64", target_arch = "aarch64")))'.dependencies]
#tokio-rustls = { version = "0.26.2", features = [] }
#rcgen = { version = "0.13.2", default-features = false, features = ["aws_lc_rs"] }
#hickory-resolver = { version = "0.25.2", features = ["tls-aws-lc-rs", "https-aws-lc-rs", "tokio", "rustls-platform-verifier"] }
#
#[target.'cfg(not(all(any(target_os = "linux", target_os = "macos"), any(target_arch = "x86_64", target_arch = "aarch64"))))'.dependencies]
#tokio-rustls = { version = "0.26.2", default-features = false, features = ["logging", "tls12", "ring"] }
#rcgen = { version = "0.13.2", default-features = false, features = ["ring"] }
#hickory-resolver = { version = "0.25.2", features = ["tls-ring", "https-ring", "tokio", "rustls-platform-verifier"] }
tokio-rustls = { version = "0.26.2", default-features = false, features = ["logging", "tls12"] }
rcgen = { version = "0.13.2", default-features = false, features = [] }
hickory-resolver = { version = "0.25.2", default-features = false, features = ["system-config", "tokio", "rustls-platform-verifier"] }
[dev-dependencies]
testcontainers = "0.24.0"
test-case = "3.3.1"
@@ -85,5 +76,6 @@ get_if_addrs = "0.5.3"
default = ["aws-lc-rs"]
clap = ["dep:clap"]
aws-lc-rs = ["tokio-rustls/aws-lc-rs", "rcgen/aws_lc_rs", "hickory-resolver/tls-aws-lc-rs", "hickory-resolver/https-aws-lc-rs"]
aws-lc-rs-bindgen = ["dep:aws-lc-rs", "aws-lc-rs/bindgen"]
ring = ["tokio-rustls/ring", "rcgen/ring", "hickory-resolver/tls-ring", "hickory-resolver/https-ring"]