Skip to content

Commit ac01637

Browse files
author
Yucong Sun
committed
Fix depenedncy to force libra-swarm use local client implementation.
1 parent 2df09f1 commit ac01637

File tree

8 files changed

+18
-151
lines changed

8 files changed

+18
-151
lines changed

.circleci/config.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,18 @@ jobs:
1111
command: |
1212
sudo sh -c 'echo "deb http://deb.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list'
1313
sudo apt-get update
14-
sudo apt-get -t stretch-backports install cmake python3-dev python3-venv clang llvm
14+
sudo apt-get -t stretch-backports install cmake python3-dev python3-venv clang llvm libjemalloc-dev
1515
- run:
1616
name: Build everything
1717
command: |
1818
./build.sh
1919
- run:
20-
name: Build Python stuff
20+
name: Test Rust Client
21+
command: |
22+
cd rust
23+
./test.sh
24+
- run:
25+
name: Test Python stuff
2126
command: |
2227
cd python
2328
./test.sh

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ cmake_minimum_required(VERSION 3.7)
22

33
project(libra-client-dev)
44

5-
add_subdirectory(c)
65
add_subdirectory(cpp)

build.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ mkdir build
1818
cd build
1919
cmake ..
2020
make VERBOSE=1
21-
2221
# Test!
23-
cd rust && ./test.sh && cd ..
24-
./c/c-client
25-
./cpp/cpp-client
22+
./cpp/cpp-client
23+
cd ..

c/CMakeLists.txt

Lines changed: 0 additions & 17 deletions
This file was deleted.

c/main.c

Lines changed: 0 additions & 81 deletions
This file was deleted.

rust/Cargo.lock

Lines changed: 1 addition & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/Cargo.toml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ serde = { version = "1.0.96", features = ["derive"] }
2525
serde_json = "1.0.40"
2626
structopt = "0.3.2"
2727

28-
# Libra C API, that is all we should need!
29-
libra-dev = { path="../libra-dev" }
28+
# TODO: this actually doesn't work, havn't figure out an way to link against an staticlib dependency yet.
29+
# libra-dev = { path="../libra-dev" }
3030

3131
# All Libra dependencies, The goal is to remove this section down to zero!
3232
# S0: Core types
@@ -58,4 +58,8 @@ compiler = { git = "https://github.com/libra/libra.git", branch = "testnet" }
5858

5959
[features]
6060
default = []
61-
fuzzing = ["proptest", "libra-crypto/fuzzing", "fixme-libra-types/fuzzing"]
61+
fuzzing = ["proptest", "libra-crypto/fuzzing", "fixme-libra-types/fuzzing"]
62+
63+
# Override depenedency to use local client implementation.
64+
[patch."https://github.com/libra/libra.git"]
65+
client = { path = "./" }

rust/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::env;
22
use std::path::PathBuf;
33

44
fn main() {
5-
println!("cargo:rustc-link-lib=libra_dev");
5+
println!("cargo:rustc-link-lib=static=libra_dev");
66
println!("cargo:rustc-link-search=native=../libra-dev/target/debug/");
77

88
// Tell cargo to invalidate the built crate whenever the wrapper changes

0 commit comments

Comments
 (0)