-
Notifications
You must be signed in to change notification settings - Fork 15
90 lines (72 loc) · 2.42 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Tests
on: [push, pull_request]
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust nightly
uses: actions-rs/toolchain@v1
with:
override: true
- name: Cargo cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('rust-toolchain') }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-${{ hashFiles('rust-toolchain') }}-
- name: Compile
run: cargo rustc -- -D warnings
- name: Unit tests
run: RUST_LOG=asmr=debug cargo test
coin-tests:
runs-on: ubuntu-latest
needs: unit-tests
steps:
- uses: actions/checkout@v2
- name: Install Rust nightly
uses: actions-rs/toolchain@v1
with:
override: true
- name: Install coin dependencies
run: |
sudo apt-get update
# Electrum dependencies
sudo apt-get install libsecp256k1-0 python3-setuptools python3-cryptography
# Nano dependencies
curl -L 'https://s3.us-east-2.amazonaws.com/repo.nano.org/artifacts/boost-Linux-gcc-1.70-full.tgz' | tar -C / -xzf -
- name: Cargo cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('rust-toolchain') }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-${{ hashFiles('rust-toolchain') }}-
- name: Nano-node cache
uses: actions/cache@v2
with:
path: ~/coins/nano/nano_node
key: ${{ runner.os }}-nano-node-develop
- name: Pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-electrum-4.0.2
restore-keys: |
${{ runner.os }}-pip-electrum-
${{ runner.os }}-pip-
- name: Setup Litecoin
run: ./ci/setup-coins/litecoin.sh
- name: Setup Monero
run: ./ci/setup-coins/monero.sh
- name: Setup Nano
run: ./ci/setup-coins/nano.sh
- name: Run Litecoin-Monero swap tests
run: RUST_LOG=asmr=debug cargo test --features test_litecoin_node,test_monero_node -- ltc_and_xmr --nocapture