Skip to content

Commit

Permalink
Merge branch 'development' into core-remove-double-db-lock
Browse files Browse the repository at this point in the history
* development: (46 commits)
  refactor: remove tari_common dependency from tari_comms (tari-project#3580)
  feat: language detection for mnemonic seed words (tari-project#3590)
  chore: minor clippy fixes (tari-project#3576)
  fix: be more permissive of responses for the incorrect request_id (tari-project#3588)
  feat: track ping failures and disconnect (tari-project#3597)
  chore: upgrade tokio deps tari-project#3581 (tari-project#3595)
  feat: standardize output hash for unblinded output, transaction output and transaction input (tari-project#3592)
  fix: allow bullet proof value only rewinding off one-sided transaction (tari-project#3587)
  refactor: update miningcore repository links (tari-project#3593)
  refactor: clean up unwraps in wallet_ffi (tari-project#3585)
  fix: update daily test start times and seed phrase (tari-project#3584)
  fix: allow bullet proof value only rewinding in atomic swaps (tari-project#3586)
  v0.21.2
  feat: add atomic swap refund transaction handling (tari-project#3573)
  feat: improve wallet connectivity status for console wallet (tari-project#3577)
  v0.21.1
  feat: add error codes to LibWallet for CipherSeed errors (tari-project#3578)
  ci: split cucumber job into two (tari-project#3583)
  feat(wallet): import utxo’s as EncumberedToBeReceived rather than Unspent (tari-project#3575)
  docs: rfc 0250_Covenants (tari-project#3574)
  ...
  • Loading branch information
sdbondi committed Nov 23, 2021
2 parents 5dca162 + b5a88e3 commit 828cccf
Show file tree
Hide file tree
Showing 353 changed files with 14,306 additions and 6,606 deletions.
232 changes: 43 additions & 189 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,107 +4,59 @@ defaults:
rust_image: &rust_image quay.io/tarilabs/rust_tari-build-with-deps:nightly-2021-09-18

commands:
test:
description: Run the tests
parameters:
release:
description: Set this to true to compile in release mode.
type: boolean
default: false
cucumber-js:
description: Run cucumber scenarios
steps:
- run:
name: Calculate dependencies
command: |
rustc --version >rust-version
test -e Cargo.lock || cargo generate-lockfile
name: node -v
command: node -v
- run:
name: Install cargo2junit
command: cargo install cargo2junit
- restore_cache:
keys:
- v6-cargo-cache-{{arch}}-{{checksum "rust-version"}}-<<parameters.release>>-{{checksum "Cargo.lock"}}
name: npm ci
command: cd integration_tests && npm ci
- run:
name: Run tests
command: mkdir -p testresults && cargo test --workspace --all-features -v --jobs=3 <<#parameters.release>>--release<</parameters.release>> -- -Z unstable-options --format json --report-time | cargo2junit > testresults/results.xml
- save_cache:
paths:
- /usr/local/cargo/registry
- target
key: v6-cargo-cache-{{arch}}-{{checksum "rust-version"}}-<<parameters.release>>-{{checksum "Cargo.lock"}}
- store_test_results:
path: testresults
- store_artifacts:
path: testresults
build:
description: Build
parameters:
release:
description: Set this to true to compile in release mode.
type: boolean
default: false
steps:
name: Check formatting
command: cd integration_tests && npm run check-fmt
- run:
name: Calculate dependencies
command: |
rustc --version >rust-version
test -e Cargo.lock || cargo generate-lockfile
- restore_cache:
keys:
- v6-cargo-cache-{{arch}}-{{checksum "rust-version"}}-<<parameters.release>>-{{checksum "Cargo.lock"}}
name: Check eslint
command: cd integration_tests && npm run lint
- run:
name: Build
command: cargo build -v --all --all-features --jobs=3 <<#parameters.release>>--release<</parameters.release>>
name: Build base node
command: cargo build --release --bin tari_base_node
- run:
name: Build Wallet
command: cargo build -p tari_wallet <<#parameters.release>>--release<</parameters.release>>
- save_cache:
paths:
- /usr/local/cargo/registry
- target
key: v6-cargo-cache-{{arch}}-{{checksum "rust-version"}}-<<parameters.release>>-{{checksum "Cargo.lock"}}
clippy:
description: cargo clippy
steps:
name: Build wallet
command: cargo build --release --bin tari_console_wallet
- run:
name: Build mmproxy
command: cargo build --release --bin tari_merge_mining_proxy
- run:
name: Calculate dependencies
command: |
rustc --version >rust-version
test -e Cargo.lock || cargo generate-lockfile
- restore_cache:
keys:
- v6-cargo-cache-{{arch}}-{{checksum "rust-version"}}-{{checksum "Cargo.lock"}}
name: Build mining_node
command: cargo build --release --bin tari_mining_node
- run:
name: Cargo fmt
command: |
TOOLCHAIN=$(awk '/channel = /{print $NF}' rust-toolchain.toml)
rustup component add --toolchain $TOOLCHAIN rustfmt
cargo fmt --all -- --check
name: Build stratum_transcoder
command: cargo build --release --bin tari_stratum_transcoder
- run:
name: Run clippy (main source)
command: |
TOOLCHAIN=$(awk '/channel = /{print $NF}' rust-toolchain.toml)
rustup component add --toolchain $TOOLCHAIN clippy
cargo clippy -- -D warnings -W clippy::cognitive_complexity
name: Run cucumber scenarios
no_output_timeout: 20m
command: cd integration_tests && mkdir -p cucumber_output && node_modules/.bin/cucumber-js --profile "ci" --tags "@critical and not @long-running and not @broken and not @wallet-ffi" --format json:cucumber_output/tests.cucumber --exit --retry 3 --retry-tag-filter "@flaky and not @broken"
- run:
name: Run clippy (all targets)
command: cargo clippy --all-targets -- -D warnings
- save_cache:
paths:
- /usr/local/cargo/registry
- target
key: v6-cargo-cache-{{arch}}-{{checksum "rust-version"}}-{{checksum "Cargo.lock"}}
cucumber-js:
description: Run cucumber scenarios
name: Generate report
command: cd integration_tests && node ./generate_report.js
when: always
- store_test_results:
path: integration_tests/cucumber_output
- store_artifacts:
path: integration_tests/cucumber_output
- store_artifacts:
path: integration_tests/temp/reports
cucumber-js-ffi:
description: Run cucumber scenarios (FFI)
steps:
- run:
name: node -v
command: node -v
- run:
name: npm ci
command: cd integration_tests && npm ci
- run:
name: Check formatting
command: cd integration_tests && npm run check-fmt
- run:
name: Check eslint
command: cd integration_tests && npm run lint
Expand All @@ -126,14 +78,6 @@ commands:
- run:
name: Build stratum_transcoder
command: cargo build --release --bin tari_stratum_transcoder
- run:
name: Run cucumber scenarios
no_output_timeout: 20m
command: cd integration_tests && mkdir -p cucumber_output && node_modules/.bin/cucumber-js --profile "ci" --tags "not @long-running and not @broken and not @wallet-ffi" --format json:cucumber_output/tests.cucumber --exit --retry 3 --retry-tag-filter "@flaky and not @broken"
- run:
name: Generate report
command: cd integration_tests && node ./generate_report.js
when: always
# Below step requires NodeJS v12 to run correctly, see explanation in WalletFFI.feature
- run:
name: Run FFI wallet library cucumber scenarios
Expand All @@ -154,30 +98,6 @@ commands:
path: integration_tests/temp/reports

jobs:
test-docs:
docker:
- image: *rust_image
steps:
- checkout
- run:
name: RFC documentation
command: |
cargo install mdbook --version ^0.4
cd RFC && mdbook test && mdbook build
- persist_to_workspace:
root: .
paths: book

test-tari-release:
docker:
- image: *rust_image
resource_class: medium
steps:
- checkout
- test:
release: true

run-integration-tests:
docker:
- image: *rust_image
Expand All @@ -188,64 +108,16 @@ jobs:
- checkout
- cucumber-js

build-tari-release:
run-ffi-integration-tests:
docker:
- image: *rust_image
resource_class: medium
environment:
CARGO_HTTP_MULTIPLEXING: false
steps:
- checkout
- build:
release: true

clippy:
docker:
- image: *rust_image
resource_class: medium
steps:
- checkout
- clippy

deploy-docs:
docker:
- image: quay.io/tarilabs/git-ssh-client:0.2-alpine
steps:
- checkout
- attach_workspace:
at: .
- add_ssh_keys:
fingerprints:
- "a6:a6:e2:be:a3:94:3e:4c:9d:51:25:f6:98:f9:0c:a4"
- run:
name: Deploy docs to gh-pages branch
command: |
DEST_BRANCH=gh-pages
DEST_PATH=book/
if [[ ! -d $DEST_PATH ]]; then
echo "$DEST_PATH directory not found!"
exit 1
fi
TMP_DIR=$(mktemp -d /tmp/ghpages_XXXXXX)
echo "Copying book files to temporary location $TMP_DIR"
cp -R $DEST_PATH/* $DEST_PATH/.nojekyll $TMP_DIR
REMOTE=$(git remote get-url origin)
- cucumber-js-ffi

cd $TMP_DIR
git config --global user.email "[email protected]"
git config --global user.name "ci-build"
git init
git checkout -b $DEST_BRANCH
git remote add origin $REMOTE
git add --all .
git commit -m "[skip ci] Update RFC docs"
git push origin $DEST_BRANCH --force
echo "Published."

workflows:
version: 2
Expand All @@ -255,25 +127,7 @@ workflows:
filters:
branches:
ignore: gh-pages
# - test-docs:
# filters:
# branches:
# ignore: gh-pages
# - deploy-docs:
# requires:
# - test-docs
# filters:
# branches:
# only: development
# - build-tari-release:
# filters:
# branches:
# ignore: gh-pages
# - test-tari-release:
# filters:
# branches:
# ignore: gh-pages
# - clippy:
# filters:
# branches:
# ignore: gh-pages
- run-ffi-integration-tests:
filters:
branches:
ignore: gh-pages
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@ base_layer/wallet_ffi/build.config
base_layer/wallet_ffi/.cargo/config

keys.json

# Ignore docker files
applications/launchpad/docker_rig/*.Dockerfile
applications/launchpad/docker_rig/docker-compose.yml
1 change: 1 addition & 0 deletions .github/workflows/base_node_binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
run: |
echo "VBRANCH=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
echo "VSHA_SHORT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "CARGO_HTTP_MULTIPLEXING=false" >> $GITHUB_ENV
- name: Default Destination Folder
run: |
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/libwallet.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# Build a new set of libraries when a new tag containing 'libwallet' is pushed
name: Build libwallet

on:
push:
branches:
- "libwallet-*"
# - development
tags:
- "libwallet-*"
schedule:
- cron: "05 00 * * *"
schedule:
- cron: "05 00 * * *"
workflow_dispatch:

jobs:
android:
runs-on: ubuntu-latest
Expand All @@ -18,7 +20,7 @@ jobs:
# Build and package the libraries
- name: Build libwallet
id: build-libwallet
uses: tari-project/[email protected].2
uses: tari-project/[email protected].3
with:
platforms: "x86_64-linux-android;aarch64-linux-android;armv7-linux-androideabi"
level: "24"
Expand All @@ -31,7 +33,7 @@ jobs:
# Copy tarballs to S3
- name: Sync to S3
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
continue-on-error: true # Don't break if s3 upload fails
continue-on-error: true # Don't break if s3 upload fails
uses: jakejarvis/[email protected]
with:
args: --acl public-read --follow-symlinks
Expand Down
Loading

0 comments on commit 828cccf

Please sign in to comment.