Skip to content

Commit bb8d780

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

File tree

8 files changed

+32
-154
lines changed

8 files changed

+32
-154
lines changed

.circleci/config.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,33 @@
1-
version: 2.0
1+
version: 2.1
22

3-
jobs:
4-
build:
3+
executors:
4+
build-executor:
55
docker:
66
- image: circleci/rust:stretch
7+
resource_class: 2xlarge
8+
9+
jobs:
10+
build:
11+
executor: build-executor
712
steps:
813
- checkout
914
- run:
1015
name: Setup
1116
command: |
1217
sudo sh -c 'echo "deb http://deb.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list'
1318
sudo apt-get update
14-
sudo apt-get -t stretch-backports install cmake python3-dev python3-venv clang llvm
19+
sudo apt-get -t stretch-backports install cmake python3-dev python3-venv clang llvm libjemalloc-dev
1520
- run:
1621
name: Build everything
1722
command: |
1823
./build.sh
1924
- run:
20-
name: Build Python stuff
25+
name: Test Rust Client
26+
command: |
27+
cd rust
28+
./test.sh
29+
- run:
30+
name: Test Python stuff
2131
command: |
2232
cd python
2333
./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.

libra-dev/Cargo.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,10 @@ libra-crypto = { git = "https://github.com/libra/libra.git", branch = "testnet"
1414
lcs = { git = "https://github.com/libra/libra.git", branch = "testnet", package = "libra-canonical-serialization" }
1515

1616
[lib]
17-
crate-type = ["staticlib"]
17+
crate-type = ["cdylib"]
18+
19+
[profile.dev]
20+
lto = true
21+
22+
[profile.release]
23+
lto = true

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 = "./" }

0 commit comments

Comments
 (0)