Skip to content

Commit 61285c7

Browse files
committed
add CI
1 parent 8ee5c56 commit 61285c7

File tree

1 file changed

+84
-0
lines changed

1 file changed

+84
-0
lines changed

.github/workflows/main.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
10+
env:
11+
CARGO_TERM_COLOR: always
12+
13+
jobs:
14+
linter:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v1
18+
- uses: actions-rs/toolchain@v1
19+
with:
20+
toolchain: 1.85.0
21+
components: rustfmt, clippy
22+
override: true
23+
- name: rustfmt
24+
run: cargo fmt -- --check
25+
- name: clippy
26+
run: cargo clippy --all-targets -- -D warnings
27+
28+
tests:
29+
needs: linter
30+
strategy:
31+
matrix:
32+
toolchain:
33+
- 1.76
34+
- nightly
35+
os:
36+
- ubuntu-latest
37+
runs-on: ${{ matrix.os }}
38+
steps:
39+
- uses: actions/checkout@v1
40+
- uses: actions-rs/toolchain@v1
41+
with:
42+
toolchain: ${{ matrix.toolchain }}
43+
override: true
44+
profile: minimal
45+
- name: tests
46+
run: cargo test --verbose --color always -- --nocapture
47+
build:
48+
needs: tests
49+
strategy:
50+
matrix:
51+
toolchain:
52+
- 1.76
53+
os:
54+
- ubuntu-latest
55+
runs-on: ${{ matrix.os }}
56+
steps:
57+
- uses: actions/checkout@v1
58+
- uses: actions-rs/toolchain@v1
59+
with:
60+
toolchain: ${{ matrix.toolchain }}
61+
override: true
62+
profile: minimal
63+
- name: build
64+
run: cargo build --release --features "cli miniscript_latest"
65+
- name: build
66+
run: cargo build --release --no-default-features --features "miniscript_12_0"
67+
build_wasm:
68+
needs: tests
69+
strategy:
70+
matrix:
71+
toolchain:
72+
- 1.82
73+
os:
74+
- ubuntu-latest
75+
runs-on: ${{ matrix.os }}
76+
steps:
77+
- uses: actions/checkout@v1
78+
- uses: actions-rs/toolchain@v1
79+
with:
80+
toolchain: ${{ matrix.toolchain }}
81+
override: true
82+
profile: minimal
83+
- name: tests
84+
run: rustup target add wasm32-unknown-unknown && rustup target add wasm32-wasip1 && cargo build --target wasm32-unknown-unknown --no-default-features --features "miniscript_latest"

0 commit comments

Comments
 (0)