-
Notifications
You must be signed in to change notification settings - Fork 12
159 lines (151 loc) · 4.08 KB
/
main.yml
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
on: [push, pull_request]
name: Continuous integration
jobs:
fmt:
name: Rustfmt
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
steps:
- name: Checkout Crate
uses: actions/checkout@v2
- name: Checkout Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt
- name: Running cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
simpcli_test:
name: SimpCLI Tests
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
steps:
- name: Checkout Crate
uses: actions/checkout@v2
- name: Checkout Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Running cargo test
run: |
cd simpcli
cargo test
bench_test:
name: Jets-Bench Tests
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
steps:
- name: Checkout Crate
uses: actions/checkout@v2
- name: Checkout Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Running cargo test
run: |
cargo install cargo-criterion
cd jets-bench
cargo test
cargo criterion --no-run
test:
name: Tests
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- 1.58.0
- beta
- nightly
steps:
- name: Checkout Crate
uses: actions/checkout@v2
- name: Checkout Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Running cargo test
env:
FEATURES: bitcoin elements test-utils
run: |
if cargo --version | grep "1\.58"; then
# 1.0.100 uses syn 2.0 which requires edition 2021
cargo update -p serde_json --precise 1.0.99
# 1.0.157 uses syn 2.0
cargo update -p serde --precise 1.0.156
# 1.0.31 uses proc-macro 1.0.66
cargo update -p quote --precise 1.0.30
# 1.0.66 uses edition 2021
cargo update -p proc-macro2 --precise 1.0.65
# 1.8.0 requires cargo 1.60+
cargo update -p regex --precise 1.7.0
# 1.5.0 uses edition 2021
cargo update -p byteorder --precise 1.4.3
fi
for f in $FEATURES; do echo "Features: $f" && cargo test --no-default-features --features="$f"; done
cd simplicity-sys
cargo test --no-default-features
cargo test --features="test-utils"
echo "No default features" && cargo test --no-default-features
echo "All features" && cargo test --all-features
ignored:
name: Ignored Tests
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
steps:
- name: Checkout Crate
uses: actions/checkout@v2
- name: Checkout Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Running cargo test
run: |
cargo test -- --ignored
clippy:
name: Clippy
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
steps:
- name: Checkout Crate
uses: actions/checkout@v2
- name: Checkout Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: clippy
- name: Running cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets -- --deny warnings