@@ -2,19 +2,16 @@ name: CI
22
33# limit ci building to pushes to master not to get twice the notification email
44# from github.
5- #
6- # if you want to test your branch on your fork, just replace the 'branches'
7- # filter below for 'push' with the one for 'pull_request' temporarily and drop
8- # the commit when creating the PR.
95on :
6+ workflow_dispatch :
107 push :
118 branches :
129 - ' master'
1310 pull_request :
1411 branches : ' *'
1512
1613jobs :
17- build :
14+ interledger :
1815 env :
1916 RUST_LOG : " interledger=trace"
2017 RUST_BACKTRACE : " full"
3532 rust-version : stable
3633 components : clippy, rustfmt
3734
35+ - name : Cache
36+ uses : Swatinem/rust-cache@v1
37+
3838 - name : Build
3939 run : cargo build --all-features --all-targets
4040
@@ -54,45 +54,164 @@ jobs:
5454 - name : Test
5555 run : timeout 15m cargo test --all --all-features
5656
57- - name : Test with subset of features (interledger-packet)
58- run : |
59- timeout 15m cargo test -p interledger-packet
60- timeout 15m cargo test -p interledger-packet --features strict
61- timeout 15m cargo test -p interledger-packet --features roundtrip-only
57+ interledger-packet :
58+ env :
59+ RUST_LOG : " interledger=trace"
60+ RUST_BACKTRACE : " full"
6261
63- - name : Test with subset of features (interledger-btp)
64- run : |
65- timeout 15m cargo test -p interledger-btp
66- timeout 15m cargo test -p interledger-btp --features strict
62+ runs-on : ubuntu-latest
6763
68- - name : Test with subset of features (interledger-stream)
69- run : |
70- timeout 15m cargo test -p interledger-stream
71- timeout 15m cargo test -p interledger-stream --features strict
72- timeout 15m cargo test -p interledger-stream --features roundtrip-only
64+ steps :
65+ - name : Checkout sources
66+ uses : actions/checkout@v2
67+
68+ - name : Install rust toolchain
69+ uses : hecrj/setup-rust-action@v1.3.4
70+ with :
71+ rust-version : stable
72+
73+ - name : Cache
74+ uses : Swatinem/rust-cache@v1
75+
76+ - name : Test
77+ run : timeout 15m cargo test -p interledger-packet
78+ - name : Test --features strict
79+ run : timeout 15m cargo test -p interledger-packet --features strict
80+ - name : Test --features roundtrip-only
81+ run : timeout 15m cargo test -p interledger-packet --features roundtrip-only
82+
83+ interledger-stream :
84+ env :
85+ RUST_LOG : " interledger=trace"
86+ RUST_BACKTRACE : " full"
87+
88+ runs-on : ubuntu-latest
89+
90+ steps :
91+ - name : Checkout sources
92+ uses : actions/checkout@v2
93+
94+ - name : Install rust toolchain
95+ uses : hecrj/setup-rust-action@v1.3.4
96+ with :
97+ rust-version : stable
98+
99+ - name : Cache
100+ uses : Swatinem/rust-cache@v1
101+
102+ - name : Test
103+ run : timeout 15m cargo test -p interledger-stream
104+ - name : Test --features strict
105+ run : timeout 15m cargo test -p interledger-stream --features strict
106+ - name : Test --features roundtrip-only
107+ run : timeout 15m cargo test -p interledger-stream --features roundtrip-only
108+
109+ interledger-btp :
110+ env :
111+ RUST_LOG : " interledger=trace"
112+ RUST_BACKTRACE : " full"
113+
114+ runs-on : ubuntu-latest
115+
116+ steps :
117+ - name : Checkout sources
118+ uses : actions/checkout@v2
119+
120+ - name : Install rust toolchain
121+ uses : hecrj/setup-rust-action@v1.3.4
122+ with :
123+ rust-version : stable
124+
125+ - name : Cache
126+ uses : Swatinem/rust-cache@v1
127+
128+ - name : Test
129+ run : timeout 15m cargo test -p interledger-btp
130+ - name : Test --features strict
131+ run : timeout 15m cargo test -p interledger-btp --features strict
132+
133+ build :
134+ # Repo requires a `build` job to succeed in order to merge into master.
135+ # A step and runs-on is required for a job to be valid.
136+ needs : [interledger, interledger-packet, interledger-stream, interledger-btp]
137+ runs-on : ubuntu-latest
138+ steps :
139+ - name : Success
140+ run : echo "Success"
141+
142+ settlement-engines :
143+ # This job builds the ethereum-settlement-engine required by `test-md`.
144+ # A separate job to enable dependency caching.
145+ runs-on : ubuntu-latest
146+
147+ steps :
148+ - name : Checkout sources
149+ uses : actions/checkout@v2
150+ with :
151+ repository : interledger-rs/settlement-engines
152+ ref : master
153+
154+ - name : Install rust toolchain
155+ uses : hecrj/setup-rust-action@v1.3.4
156+ with :
157+ rust-version : stable
158+
159+ - name : Cache
160+ uses : Swatinem/rust-cache@v1
161+
162+ - name : Build
163+ run : cargo build --bin ilp-settlement-ethereum
164+
165+ - name : Upload settlement-engine artifact
166+ uses : actions/upload-artifact@v2
167+ with :
168+ name : settlement-engine
169+ path : target/debug/ilp-settlement-ethereum
73170
74171 test-md :
172+ env :
173+ RUST_LOG : " interledger=trace"
174+ RUST_BACKTRACE : " full"
175+
176+ needs : settlement-engines
177+
75178 runs-on : ubuntu-latest
179+
76180 steps :
77181 - name : Checkout sources
78182 uses : actions/checkout@v2
79183
80- - name : Install node
81- uses : actions /setup-node@v2
184+ - name : Install rust toolchain
185+ uses : hecrj /setup-rust-action@v1.3.4
82186 with :
83- node-version : ' v12.18.4'
187+ rust-version : stable
188+
189+ - name : Cache
190+ uses : Swatinem/rust-cache@v1
191+
192+ - name : Build binaries
193+ run : |
194+ mkdir -p ~/.interledger/bin
195+ cargo build --bin ilp-node --bin ilp-cli
196+ mv target/debug/ilp-node ~/.interledger/bin
197+ mv target/debug/ilp-cli ~/.interledger/bin
198+
199+ - name : Download settlement engine artifact
200+ uses : actions/download-artifact@v2
201+ with :
202+ name : settlement-engine
203+ path : ~/.interledger/bin
84204
85205 - name : Install dependencies
86206 run : |
87207 sudo apt-get update
88208 sudo apt-get install -y redis-server redis-tools libssl-dev
89209
90- # install components (ganache-cli ilp-settlement-xrp conventional-changelog-cli )
91- npm install -g ganache-cli ilp-settlement-xrp conventional-changelog-cli
210+ # install components (ganache-cli ilp-settlement-xrp)
211+ npm install -g ganache-cli ilp-settlement-xrp
92212
93213 - name : Test
94- run : |
95- scripts/run-md-test.sh '^.*$' 1
214+ run : scripts/run-md-test.sh '^.*$' 2
96215
97216 - name : ' Store artifacts'
98217 if : ${{ failure() }}
0 commit comments