-
Notifications
You must be signed in to change notification settings - Fork 664
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds configuration files for tooling
- Loading branch information
Showing
6 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
coverage: | ||
status: | ||
project: | ||
default: | ||
threshold: 2% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# https://github.com/rust-lang/rustfmt/blob/master/Configurations.md | ||
|
||
# Stable configurations | ||
edition = "2018" | ||
max_width = 120 | ||
merge_derives = true | ||
use_field_init_shorthand = true | ||
use_try_shorthand = true | ||
|
||
# Nightly configurations | ||
imports_layout = "HorizontalVertical" | ||
merge_imports = true | ||
overflow_delimited_expr = true | ||
reorder_impl_items = true | ||
version = "Two" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[hooks] | ||
pre-commit = "cargo +nightly fmt --all -- --check" | ||
|
||
[logging] | ||
verbose = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
language: rust | ||
|
||
before_install: | ||
- set -e | ||
- export SCCACHE_CACHE_SIZE=200M | ||
- export SCCACHE_DIR="$TRAVIS_HOME/.cache/sccache" | ||
- mkdir "$TRAVIS_HOME/.bin" | ||
- wget https://github.com/mozilla/sccache/releases/download/0.2.13/sccache-0.2.13-x86_64-unknown-linux-musl.tar.gz | ||
- tar -C "$TRAVIS_HOME/.bin" -xvf sccache-0.2.13-x86_64-unknown-linux-musl.tar.gz | ||
- mv $TRAVIS_HOME/.bin/sccache-0.2.13-x86_64-unknown-linux-musl/sccache $TRAVIS_HOME/.bin/sccache | ||
- export PATH="$PATH:$TRAVIS_HOME/.bin" | ||
- export RUSTC_WRAPPER="sccache" | ||
- | | ||
declare -r SSH_FILE="$(mktemp -u $HOME/.ssh/XXXXX)" | ||
openssl aes-256-cbc -K $encrypted_beefc4a47cdc_key -iv $encrypted_beefc4a47cdc_iv -in .travis/travis-snarkos.enc -out $SSH_FILE -d | ||
chmod 600 "$SSH_FILE" \ | ||
&& printf "%s\n" \ | ||
"Host github.com" \ | ||
" IdentityFile $SSH_FILE" \ | ||
" LogLevel ERROR" >> ~/.ssh/config | ||
- git clone --progress --verbose [email protected]:AleoHQ/snarkOS.git | ||
- mv snarkOS .. | ||
|
||
cache: | ||
directories: | ||
- $TRAVIS_HOME/.cache/sccache | ||
- $TRAVIS_HOME/.cargo | ||
|
||
# See https://levans.fr/rust_travis_cache.html | ||
before_cache: | ||
- rm -rf "$TRAVIS_HOME/.cargo/registry" | ||
|
||
after_script: | ||
- (sccache -s||true) | ||
- set +e | ||
|
||
matrix: | ||
fast_finish: true | ||
include: | ||
- rust: stable | ||
env: TEST_COVERAGE=1 | ||
addons: | ||
apt: | ||
packages: | ||
- libcurl4-openssl-dev | ||
- libelf-dev | ||
- libdw-dev | ||
- cmake | ||
- gcc | ||
- binutils-dev | ||
- libiberty-dev | ||
script: | ||
- cargo test --all | ||
after_success: | | ||
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz && | ||
tar xzf master.tar.gz && cd kcov-master && | ||
mkdir build && cd build && cmake .. && make && sudo make install && | ||
cd ../.. && rm -rf kcov-master && | ||
for file in target/debug/*-*[^\.d]; do mkdir -p "target/cov/$(basename $file)"; kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file"; done && | ||
bash <(curl -s https://codecov.io/bash) && | ||
echo "Uploaded code coverage" | ||
- rust: nightly-2020-03-18 | ||
install: | ||
- rustup component add rustfmt | ||
script: | ||
- cargo fmt -- --check | ||
- cargo test --all | ||
|
||
script: | ||
- echo "leo" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters