mirror of
https://github.com/shadowsocks/shadowsocks-rust.git
synced 2026-02-09 01:59:16 +08:00
Travis installs libsodium with apt, test appveyor by preinstalled openssl
This commit is contained in:
15
.travis.yml
15
.travis.yml
@@ -12,13 +12,14 @@ addons:
|
||||
apt:
|
||||
packages:
|
||||
- libssl-dev
|
||||
- libsodium-dev
|
||||
|
||||
install:
|
||||
- wget https://github.com/jedisct1/libsodium/releases/download/1.0.12/libsodium-1.0.12.tar.gz
|
||||
- tar xvfz libsodium-1.0.12.tar.gz
|
||||
- cd libsodium-1.0.12 && ./configure --prefix=$HOME/installed_libsodium && make && make install &&
|
||||
cd ..
|
||||
- export PKG_CONFIG_PATH=$HOME/installed_libsodium/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||
- export LD_LIBRARY_PATH=$HOME/installed_libsodium/lib:$LD_LIBRARY_PATH
|
||||
#- wget https://github.com/jedisct1/libsodium/releases/download/1.0.16/libsodium-1.0.16.tar.gz
|
||||
#- tar xvfz libsodium-1.0.16.tar.gz
|
||||
#- cd libsodium-1.0.16 && ./configure --prefix=$HOME/installed_libsodium && make && make install &&
|
||||
# cd ..
|
||||
#- export PKG_CONFIG_PATH=$HOME/installed_libsodium/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||
#- export LD_LIBRARY_PATH=$HOME/installed_libsodium/lib:$LD_LIBRARY_PATH
|
||||
script:
|
||||
- cargo test -v --no-fail-fast
|
||||
- cargo test --no-fail-fast
|
||||
|
||||
8
Cargo.lock
generated
8
Cargo.lock
generated
@@ -976,7 +976,7 @@ dependencies = [
|
||||
"ring 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_urlencoded 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"subprocess 0.1.14 (git+https://github.com/hniksic/rust-subprocess)",
|
||||
"subprocess 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-io 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -1013,8 +1013,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "subprocess"
|
||||
version = "0.1.14"
|
||||
source = "git+https://github.com/hniksic/rust-subprocess#fb2da68a73751b4d8556b6e34548789fe09f8467"
|
||||
version = "0.1.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"crossbeam 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -1604,7 +1604,7 @@ dependencies = [
|
||||
"checksum smallvec 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "03dab98ab5ded3a8b43b2c80751194608d0b2aa0f1d46cf95d1c35e192844aa7"
|
||||
"checksum socket2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ff606e0486e88f5fc6cfeb3966e434fb409abbc7a3ab495238f70a1ca97f789d"
|
||||
"checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550"
|
||||
"checksum subprocess 0.1.14 (git+https://github.com/hniksic/rust-subprocess)" = "<none>"
|
||||
"checksum subprocess 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4568d3ac4df6df0cbf2001e1f3f37276b925e9b07f0588cd6ee0b2174dd3cd"
|
||||
"checksum subtle 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c7a6bab57c3efd01ebd3d750f4244ae0af4cdd1fc505a7904a41603192b803c5"
|
||||
"checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad"
|
||||
"checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6"
|
||||
|
||||
@@ -55,8 +55,7 @@ md-5 = "0.7"
|
||||
digest = "0.7"
|
||||
typenum = "1.10"
|
||||
qrcode = { version = "0.7", default-features = false }
|
||||
#subprocess = "0.1"
|
||||
subprocess = { git = "https://github.com/hniksic/rust-subprocess" }
|
||||
subprocess = "0.1"
|
||||
serde_urlencoded = "0.5"
|
||||
url = "1"
|
||||
byte_string = "1.0"
|
||||
|
||||
18
appveyor.yml
18
appveyor.yml
@@ -4,20 +4,17 @@ environment:
|
||||
matrix:
|
||||
- TARGET: x86_64-pc-windows-msvc
|
||||
BITS: 64
|
||||
OPENSSL_VERSION: 1_1_0h
|
||||
MSYS2: 1
|
||||
OPENSSL_DIR: C:\OpenSSL
|
||||
OPENSSL_DIR: C:\OpenSSL-Win64
|
||||
SODIUM_BUILD_STATIC: yes
|
||||
RUST_BACKTRACE: 1
|
||||
- TARGET: i686-pc-windows-gnu
|
||||
BITS: 32
|
||||
OPENSSL_DIR: C:\OpenSSL-Win32
|
||||
MSYS2: 1
|
||||
SODIUM_BUILD_STATIC: yes
|
||||
RUST_BACKTRACE: 1
|
||||
# - TARGET: i686-pc-windows-gnu
|
||||
# BITS: 32
|
||||
# OPENSSL_VERSION: 1_1_0g
|
||||
# MSYS2: 1
|
||||
install:
|
||||
- ps: Start-FileDownload "http://slproweb.com/download/Win${env:BITS}OpenSSL-${env:OPENSSL_VERSION}.exe"
|
||||
- Win%BITS%OpenSSL-%OPENSSL_VERSION%.exe /SILENT /VERYSILENT /SP- /DIR="C:\OpenSSL"
|
||||
- ps: Start-FileDownload "https://curl.haxx.se/ca/cacert.pem" -FileName "C:\OpenSSL\cacert.pem"
|
||||
|
||||
# Install Rust
|
||||
- appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
|
||||
- rustup-init.exe -y --default-host %TARGET%
|
||||
@@ -31,7 +28,6 @@ install:
|
||||
build: false
|
||||
|
||||
test_script:
|
||||
- set RUST_LOG=shadowsocks
|
||||
- cargo test --no-fail-fast
|
||||
|
||||
cache:
|
||||
|
||||
@@ -44,6 +44,10 @@ pub struct Plugin {
|
||||
process: Popen,
|
||||
}
|
||||
|
||||
/// Plugin can always be sent between threads
|
||||
/// It contains only a handle to subprocess.
|
||||
unsafe impl Send for Plugin {}
|
||||
|
||||
impl Plugin {
|
||||
/// Get address of the plugin
|
||||
pub fn addr(&self) -> &ServerAddr {
|
||||
|
||||
Reference in New Issue
Block a user