Skip to content

Commit

Permalink
use cargo when rules_rust is broken
Browse files Browse the repository at this point in the history
  • Loading branch information
ibigbug committed Sep 20, 2023
1 parent 295b84e commit 4489471
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 139 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- run: CARGO_BAZEL_ISOLATED=0 CARGO_BAZEL_REPIN=true bazelisk test --test_output=all //clash_lib/... //clash/...
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
# - run: CARGO_BAZEL_ISOLATED=0 CARGO_BAZEL_REPIN=true bazelisk test --test_output=all //clash_lib/... //clash/...
- run: cargo test --all --all-features

release:
name: Create Github Release
Expand Down
127 changes: 5 additions & 122 deletions Cargo.Bazel.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"checksum": "ef69c6848e3c30e2670f43dbd9c39bf86e96ee77b45b4b966e8578ca8c3e2156",
"checksum": "31e365323113a8befba2ad5b1941cda97d7405c83226ce08b0caa93c5450de05",
"crates": {
"addr2line 0.21.0": {
"name": "addr2line",
Expand Down Expand Up @@ -1874,16 +1874,7 @@
"build_script_attrs": {
"data_glob": [
"**"
],
"link_deps": {
"common": [
{
"id": "clang-sys 1.6.1",
"target": "clang_sys"
}
],
"selects": {}
}
]
},
"license": "BSD-3-Clause"
},
Expand Down Expand Up @@ -1990,16 +1981,7 @@
"build_script_attrs": {
"data_glob": [
"**"
],
"link_deps": {
"common": [
{
"id": "clang-sys 1.6.1",
"target": "clang_sys"
}
],
"selects": {}
}
]
},
"license": "BSD-3-Clause"
},
Expand Down Expand Up @@ -13959,16 +13941,7 @@
"build_script_attrs": {
"data_glob": [
"**"
],
"link_deps": {
"common": [
{
"id": "ring 0.16.20",
"target": "ring"
}
],
"selects": {}
}
]
},
"license": "Apache-2.0 OR ISC OR MIT"
},
Expand Down Expand Up @@ -21485,37 +21458,10 @@
"clash_lib 0.1.0": "clash_lib"
},
"conditions": {
"aarch64-apple-darwin": [
"aarch64-apple-darwin"
],
"aarch64-apple-ios": [
"aarch64-apple-ios"
],
"aarch64-apple-ios-sim": [
"aarch64-apple-ios-sim"
],
"aarch64-fuchsia": [
"aarch64-fuchsia"
],
"aarch64-linux-android": [
"aarch64-linux-android"
],
"aarch64-pc-windows-gnullvm": [],
"aarch64-pc-windows-msvc": [
"aarch64-pc-windows-msvc"
],
"aarch64-unknown-linux-gnu": [
"aarch64-unknown-linux-gnu"
],
"arm-unknown-linux-gnueabi": [
"arm-unknown-linux-gnueabi"
],
"armv7-linux-androideabi": [
"armv7-linux-androideabi"
],
"armv7-unknown-linux-gnueabi": [
"armv7-unknown-linux-gnueabi"
],
"cfg(all(any(target_os = \"android\", target_os = \"linux\"), any(rustix_use_libc, miri, not(all(target_os = \"linux\", target_endian = \"little\", any(target_arch = \"arm\", all(target_arch = \"aarch64\", target_pointer_width = \"64\"), target_arch = \"riscv64\", all(rustix_use_experimental_asm, target_arch = \"powerpc64\"), all(rustix_use_experimental_asm, target_arch = \"mips\"), all(rustix_use_experimental_asm, target_arch = \"mips32r6\"), all(rustix_use_experimental_asm, target_arch = \"mips64\"), all(rustix_use_experimental_asm, target_arch = \"mips64r6\"), target_arch = \"x86\", all(target_arch = \"x86_64\", target_pointer_width = \"64\")))))))": [
"aarch64-linux-android",
"armv7-linux-androideabi",
Expand Down Expand Up @@ -22027,71 +21973,8 @@
"i686-pc-windows-msvc",
"x86_64-pc-windows-msvc"
],
"i686-apple-darwin": [
"i686-apple-darwin"
],
"i686-linux-android": [
"i686-linux-android"
],
"i686-pc-windows-gnu": [],
"i686-pc-windows-msvc": [
"i686-pc-windows-msvc"
],
"i686-unknown-freebsd": [
"i686-unknown-freebsd"
],
"i686-unknown-linux-gnu": [
"i686-unknown-linux-gnu"
],
"powerpc-unknown-linux-gnu": [
"powerpc-unknown-linux-gnu"
],
"riscv32imc-unknown-none-elf": [
"riscv32imc-unknown-none-elf"
],
"riscv64gc-unknown-none-elf": [
"riscv64gc-unknown-none-elf"
],
"s390x-unknown-linux-gnu": [
"s390x-unknown-linux-gnu"
],
"thumbv7em-none-eabi": [
"thumbv7em-none-eabi"
],
"thumbv8m.main-none-eabi": [
"thumbv8m.main-none-eabi"
],
"wasm32-unknown-unknown": [
"wasm32-unknown-unknown"
],
"wasm32-wasi": [
"wasm32-wasi"
],
"x86_64-apple-darwin": [
"x86_64-apple-darwin"
],
"x86_64-apple-ios": [
"x86_64-apple-ios"
],
"x86_64-fuchsia": [
"x86_64-fuchsia"
],
"x86_64-linux-android": [
"x86_64-linux-android"
],
"x86_64-pc-windows-gnu": [],
"x86_64-pc-windows-gnullvm": [],
"x86_64-pc-windows-msvc": [
"x86_64-pc-windows-msvc"
],
"x86_64-unknown-freebsd": [
"x86_64-unknown-freebsd"
],
"x86_64-unknown-linux-gnu": [
"x86_64-unknown-linux-gnu"
],
"x86_64-unknown-none": [
"x86_64-unknown-none"
]
"x86_64-pc-windows-gnullvm": []
}
}
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ zig_toolchains()

http_archive(
name = "rules_rust",
sha256 = "db89135f4d1eaa047b9f5518ba4037284b43fc87386d08c1d1fe91708e3730ae",
urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.27.0/rules_rust-v0.27.0.tar.gz"],
sha256 = "4a9cb4fda6ccd5b5ec393b2e944822a62e050c7c06f1ea41607f14c4fdec57a2",
urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.25.1/rules_rust-v0.25.1.tar.gz"],
)

load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains")
Expand All @@ -36,7 +36,7 @@ rules_rust_dependencies()
rust_register_toolchains(
edition = "2021",
versions = [
"1.72.0",
"1.70.0",
],
)

Expand Down
12 changes: 7 additions & 5 deletions clash_lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,14 @@ erased-serde = "0.3.30"

trust-dns-client = { git = "https://github.com/Watfaq/trust-dns.git", rev = "a6a7b2c" }
trust-dns-resolver = { git = "https://github.com/Watfaq/trust-dns.git", rev = "a6a7b2c" }
trust-dns-server = { git = "https://github.com/Watfaq/trust-dns.git", rev = "a6a7b2c", features = ["dns-over-rustls", "dns-over-https"] }
trust-dns-proto = { git = "https://github.com/Watfaq/trust-dns.git", rev = "a6a7b2c", features = ["dns-over-rustls", "dns-over-https"] }
trust-dns-server = { git = "https://github.com/Watfaq/trust-dns.git", rev = "a6a7b2c", features = ["dns-over-rustls", "dns-over-https-rustls"] }
trust-dns-proto = { git = "https://github.com/Watfaq/trust-dns.git", rev = "a6a7b2c", features = ["dns-over-rustls", "dns-over-https-rustls"] }

#trust-dns-client = "0.23"
#trust-dns-resolver = "0.23"
#trust-dns-server = { version = "0.23", features = ["dns-over-rustls", "dns-over-https-rustls"] }
#trust-dns-proto = { version = "0.23", features = ["dns-over-rustls", "dns-over-https-rustls"]}

# trust-dns-resolver = "0.23"
# trust-dns-server = { version = "0.23", features = ["dns-over-rustls", "dns-over-https-rustls"] }
# trust-dns-proto = { version = "0.23", features = ["dns-over-rustls", "dns-over-https-rustls"]}
# DoH
rustls = { version = "0.21", features=["dangerous_configuration"] }
rustls-pemfile = "1.0.3"
Expand Down
1 change: 1 addition & 0 deletions clash_lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ mod tests {
use std::time::Duration;

#[test]
#[ignore]
fn start_and_stop() {
let conf = r#"
socks-port: 7891
Expand Down

0 comments on commit 4489471

Please sign in to comment.