mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-05-14 01:15:01 +08:00
77 lines
2.9 KiB
YAML
77 lines
2.9 KiB
YAML
version: 2
|
|
jobs:
|
|
deploy:
|
|
working_directory: /build
|
|
docker:
|
|
- image: rust:1.40-stretch
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
command: |
|
|
bash build-scripts/start-builds.sh
|
|
- store_artifacts:
|
|
path: /build/dist/
|
|
destination: dist/
|
|
test_demo:
|
|
working_directory: /test
|
|
docker:
|
|
- image: rust:1.40-stretch
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
command: |
|
|
cargo build --release && cargo install --path .
|
|
- run:
|
|
command: |
|
|
blockstack-core local initialize db &&
|
|
blockstack-core local check sample-programs/tokens.clar db &&
|
|
blockstack-core local launch S1G2081040G2081040G2081040G208105NK8PE5.tokens sample-programs/tokens.clar db &&
|
|
blockstack-core local check sample-programs/names.clar db &&
|
|
blockstack-core local launch S1G2081040G2081040G2081040G208105NK8PE5.names sample-programs/names.clar db &&
|
|
blockstack-core local execute db S1G2081040G2081040G2081040G208105NK8PE5.tokens mint! SZ2J6ZY48GV1EZ5V2V5RB9MP66SW86PYKKQ9H6DPR u100000
|
|
- run:
|
|
command: |
|
|
echo "(get-balance 'SZ2J6ZY48GV1EZ5V2V5RB9MP66SW86PYKKQ9H6DPR)" | blockstack-core local eval S1G2081040G2081040G2081040G208105NK8PE5.tokens db
|
|
cargo_tests:
|
|
machine: true
|
|
working_directory: ~/blockstack
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
name: Install perftools
|
|
command: |
|
|
sudo apt-get update -y && sudo apt-get install libgoogle-perftools4 -y
|
|
- run:
|
|
name: Fetch latest grcov
|
|
command: |
|
|
curl -L https://github.com/mozilla/grcov/releases/latest/download/grcov-linux-x86_64.tar.bz2 | tar jxf -
|
|
- run:
|
|
name: Pull Rust Nightly
|
|
command: |
|
|
docker pull rustlang/rust:nightly-stretch
|
|
- run:
|
|
name: Build and Test
|
|
command: |
|
|
docker run -it --security-opt seccomp=unconfined -e CIRCLE_TESTING=1 -e RUST_BACKTRACE=1 -e CARGO_INCREMENTAL=0 \
|
|
-e RUSTFLAGS="$RUSTFLAGS" -v "$PWD:/blockstack" rustlang/rust:nightly-stretch \
|
|
bash -c "cd /blockstack && rustup override set nightly && cargo build --verbose && cargo test -- --test-threads 1"
|
|
environment:
|
|
RUSTFLAGS: -Zprofile -Copt-level=2 -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zno-landing-pads
|
|
no_output_timeout: 30m
|
|
- run:
|
|
name: Collect debug outputs
|
|
command: |
|
|
zip -0 ccov.zip `find . \( -name "blockstack_*.gc*" \) -print` &&
|
|
./grcov ccov.zip -s . -t lcov --llvm --ignore-not-existing --ignore "/*" -o lcov.info;
|
|
- run:
|
|
name: Upload to codecov.io
|
|
command: |
|
|
bash <(curl -s https://codecov.io/bash) -f lcov.info;
|
|
workflows:
|
|
version: 2
|
|
build-deploy:
|
|
jobs:
|
|
- cargo_tests
|
|
- test_demo
|
|
- deploy
|