Skip to content

Commit 349626e

Browse files
committed
Merge #195: Migrate CI to github actions
8806879 Migrate CI to github actions (Tibo-lg) Pull request description: Closes #185 I'm not a github action expert so there might be more concise ways of expressing things, but at least it works. ACKs for top commit: notmandatory: ACK 8806879 Tree-SHA512: 0c347867a66d1a19fad182ebb3961819a34190573dfec4c1425c1f295bc1a32a7f0adb8da31a9e0b004144b8f17efea36c0d81244e09b743af36df6705039f3a
2 parents 87763f7 + 8806879 commit 349626e

File tree

3 files changed

+68
-32
lines changed

3 files changed

+68
-32
lines changed

.github/workflows/rust.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
on: [push, pull_request]
2+
3+
name: Continuous integration
4+
5+
jobs:
6+
tests:
7+
name: Tests
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
include:
12+
- rust: stable
13+
env:
14+
RUSTFMTCHK: true
15+
- rust: nightly
16+
env:
17+
RUSTFMTCHK: false
18+
- rust: 1.29.0
19+
env:
20+
PIN_VERSIONS: true
21+
steps:
22+
- name: Checkout Crate
23+
uses: actions/checkout@v2
24+
- name: Checkout Toolchain
25+
uses: actions-rs/toolchain@v1
26+
with:
27+
profile: minimal
28+
toolchain: ${{ matrix.rust }}
29+
override: true
30+
- name: Running test script
31+
env: ${{ matrix.env }}
32+
run: ./contrib/test.sh
33+
34+
integrations-tests:
35+
name: Integration Tests
36+
runs-on: ubuntu-latest
37+
strategy:
38+
matrix:
39+
rust: [stable]
40+
bitcoinversion:
41+
[
42+
"0.18.0",
43+
"0.18.1",
44+
"0.19.0.1",
45+
"0.19.1",
46+
"0.20.0",
47+
"0.20.1",
48+
"0.21.0",
49+
]
50+
steps:
51+
- name: Checkout Crate
52+
uses: actions/checkout@v2
53+
- name: Checkout Toolchain
54+
uses: actions-rs/toolchain@v1
55+
with:
56+
profile: minimal
57+
toolchain: ${{ matrix.rust }}
58+
override: true
59+
- name: Running test script
60+
env:
61+
BITCOINVERSION: ${{ matrix.bitcoinversion }}
62+
run: ./contrib/test.sh

.travis.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

contrib/test.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
set -xe
33

44
# Just echo all the relevant env vars to help debug Travis.
5-
echo "TRAVIS_RUST_VERSION: \"$TRAVIS_RUST_VERSION\""
65
echo "RUSTFMTCHECK: \"$RUSTFMTCHECK\""
76
echo "BITCOINVERSION: \"$BITCOINVERSION\""
87
echo "PATH: \"$PATH\""
98

109

1110
# Pin dependencies for Rust v1.29
12-
if [ "$TRAVIS_RUST_VERSION" = "1.29.0" ]; then
11+
if [ -n $"$PIN_VERSIONS" ]; then
1312
cargo generate-lockfile --verbose
1413

1514
cargo update --verbose --package "log" --precise "0.4.13"
@@ -34,9 +33,10 @@ if [ -n "$BITCOINVERSION" ]; then
3433
cd integration_test
3534
./run.sh
3635
exit 0
36+
else
37+
# Regular build/unit test.
38+
cargo build --verbose
39+
cargo test --verbose
40+
cargo build --verbose --examples
3741
fi
3842

39-
# Regular build/unit test.
40-
cargo build --verbose
41-
cargo test --verbose
42-
cargo build --verbose --examples

0 commit comments

Comments
 (0)