Skip to content
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.

swarm travis #775

Merged
merged 124 commits into from
Dec 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
5b1832e
add appveyor yml
thedavidmeister Dec 18, 2018
c81e1ad
install rust on appveyor?
thedavidmeister Dec 18, 2018
0be3a84
debug
thedavidmeister Dec 18, 2018
9360e3d
install rust on appveyor?
thedavidmeister Dec 18, 2018
3439713
build wasm appveyor?
thedavidmeister Dec 18, 2018
7ee7bb9
windowsify some build scripts
thedavidmeister Dec 18, 2018
315226d
windowsify build scripts
thedavidmeister Dec 18, 2018
6d29d4c
windowsify build script
thedavidmeister Dec 18, 2018
c80b6c5
lint
thedavidmeister Dec 18, 2018
ba00062
try setting --target-dir
thedavidmeister Dec 18, 2018
30138d9
debug av
thedavidmeister Dec 18, 2018
0197e35
more wasm on av
thedavidmeister Dec 18, 2018
8a30c27
tweak av tests
thedavidmeister Dec 18, 2018
d36d7a4
more av cache
thedavidmeister Dec 18, 2018
e466cf8
debug
thedavidmeister Dec 18, 2018
143fae2
debug
thedavidmeister Dec 18, 2018
41abc16
set libzmq az
thedavidmeister Dec 18, 2018
166d0f7
debug
thedavidmeister Dec 18, 2018
63c870f
debug
thedavidmeister Dec 18, 2018
ea8c0ef
debug
thedavidmeister Dec 18, 2018
7f602e2
cargo test not release debug
thedavidmeister Dec 18, 2018
41c1e07
debug exclude hc on av
thedavidmeister Dec 18, 2018
2a89625
debug
thedavidmeister Dec 18, 2018
ccee83f
debug different os for wabt
thedavidmeister Dec 18, 2018
6cfa7df
debug zmq
thedavidmeister Dec 18, 2018
47cb310
debug
thedavidmeister Dec 18, 2018
d3ad58b
debug
thedavidmeister Dec 18, 2018
d4b2451
debug
thedavidmeister Dec 18, 2018
42386de
debug
thedavidmeister Dec 18, 2018
663a0a1
debug
thedavidmeister Dec 18, 2018
207088f
debug
thedavidmeister Dec 18, 2018
5a6a006
debug
thedavidmeister Dec 18, 2018
23bd396
debug
thedavidmeister Dec 18, 2018
14b730f
debug
thedavidmeister Dec 18, 2018
66eda56
debug
thedavidmeister Dec 18, 2018
991b2a3
debug av
thedavidmeister Dec 18, 2018
2bcee33
debug
thedavidmeister Dec 18, 2018
d003a5d
try release cargo build for av
thedavidmeister Dec 18, 2018
942a89c
exclude hc on av
thedavidmeister Dec 18, 2018
166b149
lint
thedavidmeister Dec 18, 2018
682c9b7
use shallow git clone
thedavidmeister Dec 18, 2018
1246e49
try gce on av
thedavidmeister Dec 18, 2018
f7a0fc9
debug
thedavidmeister Dec 18, 2018
4f15d26
debug
thedavidmeister Dec 18, 2018
8402986
debug
thedavidmeister Dec 18, 2018
f46d91b
debug
thedavidmeister Dec 18, 2018
8d2575e
debug
thedavidmeister Dec 18, 2018
e0b080b
test cache
thedavidmeister Dec 18, 2018
fb1dab8
debug cache
thedavidmeister Dec 18, 2018
0d34a1f
debug
thedavidmeister Dec 18, 2018
02e46c9
tests cache
thedavidmeister Dec 18, 2018
470a761
test local cache for target
thedavidmeister Dec 18, 2018
6c36893
test cache
thedavidmeister Dec 18, 2018
87e5e72
cache more wasm
thedavidmeister Dec 18, 2018
6bda8a3
test more wasm cache
thedavidmeister Dec 18, 2018
c93321e
test cache
thedavidmeister Dec 18, 2018
09c86ed
test
thedavidmeister Dec 18, 2018
4af86d0
test full build
thedavidmeister Dec 18, 2018
33037df
test cache
thedavidmeister Dec 18, 2018
63a04f9
debug
thedavidmeister Dec 18, 2018
2500433
test hc only appveyor
thedavidmeister Dec 18, 2018
b4a1a5f
debug
thedavidmeister Dec 18, 2018
dc108fa
debug
thedavidmeister Dec 18, 2018
b4b1772
debug cache av
thedavidmeister Dec 18, 2018
39c65b9
debug
thedavidmeister Dec 18, 2018
b3d34d4
pro av?
thedavidmeister Dec 18, 2018
de8b13c
add back hc build
thedavidmeister Dec 18, 2018
327416a
fmt
thedavidmeister Dec 18, 2018
9b7cd35
av matrix
thedavidmeister Dec 18, 2018
21e4997
travis matrix
thedavidmeister Dec 18, 2018
4aab9d1
tweak travis matrix cache
thedavidmeister Dec 18, 2018
184ce69
tweak travis build matrix
thedavidmeister Dec 18, 2018
5087f04
debug travis
thedavidmeister Dec 19, 2018
0c2413b
use jobs instead of matrix travis
thedavidmeister Dec 19, 2018
85dbe69
lint
thedavidmeister Dec 19, 2018
4deebc2
test cache
thedavidmeister Dec 19, 2018
efb5e51
incremental cache for lite windows travis
thedavidmeister Dec 19, 2018
c67caf7
brute force travis
thedavidmeister Dec 19, 2018
9f03ef8
fix hc test path
thedavidmeister Dec 19, 2018
3a04e43
tweak travis cache dir
thedavidmeister Dec 19, 2018
57126cd
tweak libzmq paths for travis
thedavidmeister Dec 19, 2018
40691fe
rearrange travis jobs
thedavidmeister Dec 19, 2018
64a30ba
don't cache .rustup travis
thedavidmeister Dec 19, 2018
eeb99a0
don't cache root .cargo
thedavidmeister Dec 19, 2018
8eeb24d
debug
thedavidmeister Dec 19, 2018
e9d3669
debug
thedavidmeister Dec 19, 2018
ada83a4
debug
thedavidmeister Dec 19, 2018
230944a
debug
thedavidmeister Dec 19, 2018
61b7e03
debug
thedavidmeister Dec 19, 2018
6e28718
debug
thedavidmeister Dec 19, 2018
668ac90
debug language
thedavidmeister Dec 19, 2018
2625d88
bash for travis windows
thedavidmeister Dec 19, 2018
b603bc1
install rust windows travis
thedavidmeister Dec 19, 2018
5e845e3
debug travis
thedavidmeister Dec 19, 2018
8914c7f
debug
thedavidmeister Dec 19, 2018
f6cfaca
debug language
thedavidmeister Dec 19, 2018
c09ab9d
debug travis
thedavidmeister Dec 19, 2018
ef0faab
debug
thedavidmeister Dec 19, 2018
4b9a9f3
debug
thedavidmeister Dec 19, 2018
efc4c59
test cache
thedavidmeister Dec 19, 2018
f5cb0bf
add dna bindings travis windows
thedavidmeister Dec 19, 2018
45549e8
try thinlto windows
thedavidmeister Dec 19, 2018
386814a
don't --release on windows for tests
thedavidmeister Dec 19, 2018
9f10283
try hc windows travis
thedavidmeister Dec 19, 2018
21a62e9
debug swarm
thedavidmeister Dec 19, 2018
6ab822e
debug libzmq
thedavidmeister Dec 19, 2018
8ecadd5
debug zmq
thedavidmeister Dec 19, 2018
983eb7a
debug zmq
thedavidmeister Dec 19, 2018
55150ee
don't try to test test_utils
thedavidmeister Dec 19, 2018
7741976
fix -p for holochain_wasm_utils
thedavidmeister Dec 19, 2018
822f6b4
build hdk wasm before testing hdk
thedavidmeister Dec 19, 2018
7376fdc
build wasm for container api windows
thedavidmeister Dec 19, 2018
a2f89c1
debug hdk
thedavidmeister Dec 19, 2018
1e60261
try to normalise wasm building on travis
thedavidmeister Dec 19, 2018
b996fa5
drop builds with no tests
thedavidmeister Dec 19, 2018
72e9a12
remove slow tests
thedavidmeister Dec 19, 2018
913811a
don't cache .cargo
thedavidmeister Dec 19, 2018
b8292dd
Merge branch 'develop' into 2018-12-18-appveyor
thedavidmeister Dec 19, 2018
cdec8e7
lint
thedavidmeister Dec 19, 2018
3d1afcb
dont run hold_links
thedavidmeister Dec 19, 2018
186e2f0
Merge branch '2018-12-18-appveyor' of github.com:thedavidmeister/holo…
thedavidmeister Dec 19, 2018
e18e66d
remove appveyor
thedavidmeister Dec 19, 2018
5e86b98
lint
thedavidmeister Dec 19, 2018
b91f889
lint
thedavidmeister Dec 19, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
215 changes: 199 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,25 +150,208 @@ _cmd_deploy_template: &_cmd_deploy_template
tags: true
name: $TRAVIS_TAG

env:
global:
- LIBZMQ_PREFIX=C:\\Users\\travis\\build\\holochain\\holochain-rust\\vendor\\zmq

_windows_template_lite: &_windows_template_lite
os: windows
language: rust
rust: nightly-2018-11-28-x86_64-pc-windows-msvc
before_install:
- PATH=$PATH:$TRAVIS_BUILD_DIR/vendor/zmq/bin
- CARGO_INCREMENTAL=1
- RUSTFLAGS="-Z thinlto -C codegen-units=16"
cache:
timeout: 1000
directories:
# only keep target directories
# as we don't keep .cargo everything will be redownloaded every time
# as travis downloads the cache every time, this doesn't make much
# difference, actually it can be a bit faster or slightly slower to pull
# the crates down vs. loading the cache - seems to be an overall benefit
# as we do CARGO_INCREMENTAL and keep the targets, the newly downloaded
# crates don't recompile, so we save *a lot* of time there
- target
- $CARGO_TARGET_DIR
- $WASM_TARGET_DIR
install:
# "none" is a hack here to avoid "" ending up in the cache, potentially
# caching everything in the repo (we never want to accidentally do that)
- if [ $WASM_PATH != "none" ]; then rustup target add wasm32-unknown-unknown; fi;
- if [ $WASM_PATH != "none" ]; then cargo build --manifest-path $WASM_PATH/Cargo.toml --release --target wasm32-unknown-unknown --target-dir $WASM_TARGET_DIR; fi;
script:
- cargo test -p $TEST_P --target-dir $CARGO_TARGET_DIR

jobs:
# test builds are ordered from slowest to quickest
# this allows us to keep walltimes down
include:
- name: "windows build & test all"
<<: *_windows_template
- name: "windows hdk"
<<: *_windows_template_lite
env:
- NODIST_PREFIX="/c/Program Files (x86)\Nodist"
- NODIST_X64=1
- TRAVIS_NODE_VERSION=8
- LIBZMQ_PREFIX=C:\\Users\\travis\\build\\holochain\\holochain-rust\\vendor\\zmq
install:
- rustup target add wasm32-unknown-unknown
script:
# Build WASMs
- cargo build --manifest-path core/src/nucleus/actions/wasm-test/Cargo.toml --release --target wasm32-unknown-unknown
- cargo build --manifest-path container_api/wasm-test/Cargo.toml --release --target wasm32-unknown-unknown
- cargo build --manifest-path hdk-rust/wasm-test/Cargo.toml --release --target wasm32-unknown-unknown
- cargo build --manifest-path wasm_utils/wasm-test/integration-test/Cargo.toml --release --target wasm32-unknown-unknown
# Build & test All
- cargo test --all
- TEST_P=hdk
- TEST_PATH=hdk-rust
- WASM_PATH=hdk-rust/wasm-test
# boilerplate
- CARGO_TARGET_DIR=$TEST_PATH/target
- WASM_TARGET_DIR=$WASM_PATH/target

- name: "windows wasm_utils"
<<: *_windows_template_lite
env:
- TEST_P=holochain_wasm_utils
- TEST_PATH=wasm_utils
- WASM_PATH=wasm_utils/wasm-test/integration-test
# boilerplate
- CARGO_TARGET_DIR=$TEST_PATH/target
- WASM_TARGET_DIR=$WASM_PATH/target

- name: "windows container_api"
<<: *_windows_template_lite
env:
- TEST_P=holochain_container_api
- TEST_PATH=container_api
- WASM_PATH=container_api/wasm-test
# boilerplate
- CARGO_TARGET_DIR=$TEST_PATH/target
- WASM_TARGET_DIR=$WASM_PATH/target

- name: "windows core"
<<: *_windows_template_lite
env:
- TEST_P=holochain_core
- TEST_PATH=core
- WASM_PATH=core/src/nucleus/actions/wasm-test
# boilerplate
- CARGO_TARGET_DIR=$TEST_PATH/target
- WASM_TARGET_DIR=$WASM_PATH/target

# contains no tests
# quick to build, good for basic debugging
# @see https://travis-ci.com/holochain/holochain-rust/jobs/166081895
# - name: "windows core_types_derive"
# <<: *_windows_template_lite
# env:
# - TEST_P=holochain_core_types_derive
# - TEST_PATH=core_types_derive
# - CARGO_TARGET_DIR=$TEST_PATH/target

- name: "windows holochain_cas_implementations"
<<: *_windows_template_lite
env:
- TEST_P=holochain_cas_implementations
- TEST_PATH=cas_implementations
- WASM_PATH=none
# boilerplate
- CARGO_TARGET_DIR=$TEST_PATH/target
- WASM_TARGET_DIR=$WASM_PATH/target

- name: "windows dna_c_binding"
<<: *_windows_template_lite
env:
- TEST_P=holochain_dna_c_binding
- TEST_PATH=dna_c_binding
- WASM_PATH=none
# boilerplate
- CARGO_TARGET_DIR=$TEST_PATH/target
- WASM_TARGET_DIR=$WASM_PATH/target

- name: "windows holochain_net_connection"
<<: *_windows_template_lite
env:
- TEST_P=holochain_net_connection
- TEST_PATH=net_connection
- WASM_PATH=none
# boilerplate
- CARGO_TARGET_DIR=$TEST_PATH/target
- WASM_TARGET_DIR=$WASM_PATH/target

- name: "windows holochain_sodium"
<<: *_windows_template_lite
env:
- TEST_P=holochain_sodium
- TEST_PATH=sodium
- WASM_PATH=none
# boilerplate
- CARGO_TARGET_DIR=$TEST_PATH/target
- WASM_TARGET_DIR=$WASM_PATH/target

- name: "windows hc"
<<: *_windows_template_lite
env:
- TEST_P=hc
- TEST_PATH=cmd
- WASM_PATH=none
# boilerplate
- CARGO_TARGET_DIR=$TEST_PATH/target
- WASM_TARGET_DIR=$WASM_PATH/target

# no tests
# https://travis-ci.com/holochain/holochain-rust/jobs/166086955
# - name: "windows holochain_container"
# <<: *_windows_template_lite
# env:
# - TEST_P=holochain_container
# - TEST_PATH=container
# - WASM_PATH=none
# # boilerplate
# - CARGO_TARGET_DIR=$TEST_PATH/target
# - WASM_TARGET_DIR=$WASM_PATH/target

# no tests
# https://travis-ci.com/holochain/holochain-rust/jobs/166086957
# - name: "windows core_api_c_binding"
# <<: *_windows_template_lite
# env:
# - TEST_P=holochain_core_api_c_binding
# - TEST_PATH=core_api_c_binding
# - WASM_PATH=none
# # boilerplate
# - CARGO_TARGET_DIR=$TEST_PATH/target
# - WASM_TARGET_DIR=$WASM_PATH/target

- name: "windows core_types"
<<: *_windows_template_lite
env:
- TEST_P=holochain_core_types
- TEST_PATH=core_types
- WASM_PATH=none
# boilerplate
- CARGO_TARGET_DIR=$TEST_PATH/target
- WASM_TARGET_DIR=$WASM_PATH/target

- name: "windows holochain_net"
<<: *_windows_template_lite
env:
- TEST_P=holochain_net
- TEST_PATH=net
- WASM_PATH=none
# boilerplate
- CARGO_TARGET_DIR=$TEST_PATH/target
- WASM_TARGET_DIR=$WASM_PATH/target

- name: "windows holochain_net_ipc"
<<: *_windows_template_lite
env:
- TEST_P=holochain_net_ipc
- TEST_PATH=net_ipc
- WASM_PATH=none
# boilerplate
- CARGO_TARGET_DIR=$TEST_PATH/target
- WASM_TARGET_DIR=$WASM_PATH/target

# no tests
# https://travis-ci.com/holochain/holochain-rust/jobs/166086961
# - name: "windows holochain_test_bin"
# <<: *_windows_template_lite
# env:
# - TEST_P=holochain_test_bin
# - TEST_PATH=test_bin
# - WASM_PATH=none
# # boilerplate
# - CARGO_TARGET_DIR=$TEST_PATH/target
# - WASM_TARGET_DIR=$WASM_PATH/target

- name: "C binding tests"
<<: *_trusty_bash
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ or
make fmt
```


#### Compiler warnings

Compilation warnings are NOT OK in shared/production level code.
Expand Down
3 changes: 2 additions & 1 deletion cmd/src/cli/generate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ fn scaffold<S: Scaffold>(tooling: &S, base_path: PathBuf) -> DefaultResult<()> {
}

#[cfg(test)]
// too slow!
#[cfg(feature = "broken-tests")]
mod tests {
use assert_cmd::prelude::*;
use std::process::Command;
Expand All @@ -81,7 +83,6 @@ mod tests {
}

#[test]
#[cfg(not(windows))]
fn can_generate_scaffolds() {
let tmp = gen_dir();

Expand Down
2 changes: 1 addition & 1 deletion cmd/src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mod init;
pub mod package;
mod run;
mod scaffold;
mod test;
pub mod test;
mod test_context;

pub use self::{
Expand Down
6 changes: 2 additions & 4 deletions cmd/src/cli/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,9 @@ fn unpack_recurse(mut obj: Object, to: &PathBuf) -> DefaultResult<()> {
}

#[cfg(test)]
// too slow!
#[cfg(feature = "broken-tests")]
mod tests {
use super::*;
use assert_cmd::prelude::*;
use std::process::Command;
use tempfile::{Builder, TempDir};
Expand All @@ -305,7 +306,6 @@ mod tests {
}

#[test]
#[cfg(not(windows))]
fn package_and_unpack_isolated() {
const DEFAULT_BUNDLE_FILE_NAME: &str = "bundle.json";

Expand Down Expand Up @@ -355,7 +355,6 @@ mod tests {
}

#[test]
#[cfg(not(windows))]
/// A test ensuring that packaging and unpacking a project results in the very same project
fn package_reverse() {
const DEFAULT_BUNDLE_FILE_NAME: &str = "bundle.json";
Expand Down Expand Up @@ -407,7 +406,6 @@ mod tests {
}

#[test]
#[cfg(not(windows))]
fn auto_compilation() {
let tmp = gen_dir();

Expand Down
9 changes: 8 additions & 1 deletion cmd/src/cli/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,23 +62,28 @@ pub fn test(
}

#[cfg(test)]
#[cfg(feature = "broken-tests")]
pub mod tests {
use super::*;
use crate::cli::package;
use assert_cmd::prelude::*;
use std::process::Command;
use tempfile::{Builder, TempDir};

#[cfg(feature = "broken-tests")]
const HOLOCHAIN_TEST_PREFIX: &str = "org.holochain.test";

fn gen_dir() -> TempDir {
#[cfg(feature = "broken-tests")]
pub fn gen_dir() -> TempDir {
Builder::new()
.prefix(HOLOCHAIN_TEST_PREFIX)
.tempdir()
.unwrap()
}

#[test]
// flagged as broken for taking 60+ seconds
#[cfg(feature = "broken-tests")]
fn test_command_basic_test() {
let temp_space = gen_dir();
let temp_dir_path = temp_space.path();
Expand Down Expand Up @@ -107,6 +112,8 @@ pub mod tests {
}

#[test]
// flagged broken for taking 60+ seconds to run
#[cfg(feature = "broken-tests")]
fn test_command_no_test_folder() {
let temp_space = gen_dir();
let temp_dir_path = temp_space.path();
Expand Down
2 changes: 2 additions & 0 deletions core/src/workflows/hold_entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ pub async fn hold_entry_workflow<'a>(
}

#[cfg(test)]
// too slow!
#[cfg(feature = "broken-tests")]
pub mod tests {
use super::*;
use crate::{
Expand Down
2 changes: 2 additions & 0 deletions core/src/workflows/hold_link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ pub async fn hold_link_workflow<'a>(
}

#[cfg(test)]
// too slow!
#[cfg(feature = "broken-tests")]
pub mod tests {
use super::*;
use crate::{
Expand Down
4 changes: 2 additions & 2 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ let
hc-test = nixpkgs.writeShellScriptBin "hc-test"
''
hc-build
cargo test --all --exclude hc;
cargo test --release --all --exclude hc;
'';

hc-install-node-container = nixpkgs.writeShellScriptBin "hc-install-node-container"
Expand Down Expand Up @@ -129,7 +129,7 @@ stdenv.mkDerivation rec {
# https://github.com/rust-unofficial/patterns/blob/master/anti_patterns/deny-warnings.md
# https://llogiq.github.io/2017/06/01/perf-pitfalls.html
# RUSTFLAGS = "-D warnings -Z external-macro-backtrace --cfg procmacro2_semver_exempt -C lto=no -Z incremental-info";
RUSTFLAGS = "-D warnings -Z external-macro-backtrace --cfg procmacro2_semver_exempt";
RUSTFLAGS = "-D warnings -Z external-macro-backtrace --cfg procmacro2_semver_exempt -Z thinlto -C codegen-units=16";
# CARGO_INCREMENTAL = "1";
# https://github.com/rust-lang/cargo/issues/4961#issuecomment-359189913
# RUST_LOG = "info";
Expand Down