Test the emscripten code on circle-ci (#119)

* Test the emscripten code on circle-ci

* Fix missing from workflow
This commit is contained in:
Pierre Krieger 2018-01-31 15:10:39 +01:00 committed by GitHub
parent 641f09d9ae
commit 3c9991cdc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 4 deletions

View File

@ -5,6 +5,7 @@ workflows:
build: build:
jobs: jobs:
- test - test
- test-emscripten
- integration_test - integration_test
jobs: jobs:
@ -33,10 +34,26 @@ jobs:
name: Run tests, inside a docker image name: Run tests, inside a docker image
command: docker run --rm -v "/cache/cargo/registry:/usr/local/cargo/registry" -v "/cache/target:/app/target" -it rust-libp2p cargo test command: docker run --rm -v "/cache/cargo/registry:/usr/local/cargo/registry" -v "/cache/target:/app/target" -it rust-libp2p cargo test
- save_cache: - save_cache:
key: docker-cache key: test-cache
paths: paths:
- "/cache" - "/cache"
test-emscripten:
docker:
- image: tomaka/rustc-emscripten
steps:
- checkout
- restore_cache:
key: test-emscripten-cache
- run:
name: Build for emscripten
command: cargo build --target asmjs-unknown-emscripten --package libp2p-websocket # TODO: build all?
- save_cache:
key: test-emscripten-cache
paths:
- "~/.cargo"
- "./target"
integration_test: integration_test:
docker: docker:
- image: rust - image: rust

View File

@ -21,8 +21,12 @@ members = [
"example", "example",
] ]
[replace] [patch.crates-io]
# TODO: Update ring and solve conflicts # TODO: Update ring and solve conflicts
"ring:0.12.1" = { git = "https://github.com/briansmith/ring", rev = "3a14ef619559f7d4b69e2286d49c833409eef34a" } "ring" = { git = "https://github.com/briansmith/ring", rev = "3a14ef619559f7d4b69e2286d49c833409eef34a" }
# Using a local improved version of multiaddr for now # Using a local improved version of multiaddr for now
"multiaddr:0.2.0" = { path = "./rust-multiaddr" } # TODO: remove once merged upstream
"multiaddr" = { path = "./rust-multiaddr" }
# Using a version of rust-multihash that compiles on emscripten
# TODO: remove once merged upstream
"multihash" = { git = "https://github.com/tomaka/rust-multihash", branch = "emscripten-hack" }