-
Notifications
You must be signed in to change notification settings - Fork 15
112 lines (106 loc) · 2.83 KB
/
ci.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
name: CI
on: [pull_request]
jobs:
cargo-build:
name: cargo build
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: jpribyl/[email protected]
continue-on-error: true
- name: Build deps
run: >-
docker build
--target deps
.
- name: cargo build
run: >-
docker build
--target src
-t 1tgr/websocket-lite-src:latest
.
cargo:
name: cargo
runs-on: ubuntu-latest
needs: cargo-build
strategy:
matrix:
command:
- cargo check --all-targets
- cargo clippy --all-targets
- cargo test
features:
- ""
- --no-default-features
- --no-default-features --features ssl-rustls-native-roots
- --no-default-features --features ssl-rustls-webpki-roots
steps:
- uses: actions/[email protected]
- uses: jpribyl/[email protected]
continue-on-error: true
- name: cargo build
run: >-
docker build
--target src
-t 1tgr/websocket-lite-src:latest
.
- name: ${{ matrix.command }} ${{ matrix.features }}
run: >-
docker run
1tgr/websocket-lite-src:latest
${{ matrix.command }} ${{ matrix.features }}
cargo-fmt:
name: cargo fmt -- --check
runs-on: ubuntu-latest
needs: cargo-build
steps:
- uses: actions/[email protected]
- uses: jpribyl/[email protected]
continue-on-error: true
- name: cargo build
run: >-
docker build
--target src
-t 1tgr/websocket-lite-src:latest
.
- name: cargo fmt -- --check
run: >-
docker run
1tgr/websocket-lite-src:latest
cargo fmt -- --check
integration-test:
name: Integration test
runs-on: ubuntu-latest
needs: cargo-build
steps:
- uses: actions/[email protected]
- uses: jpribyl/[email protected]
continue-on-error: true
- name: Build integration test
run: >-
docker build
--target app
-t 1tgr/websocket-lite:latest
.
- name: Integration test
run: docker-compose up --exit-code-from test
fuzz-test:
name: Fuzz test
runs-on: ubuntu-latest
needs: cargo-build
steps:
- uses: actions/[email protected]
- uses: jpribyl/[email protected]
continue-on-error: true
- name: Build fuzz test
run: >-
docker build
--target fuzz
-t 1tgr/websocket-lite-fuzz:latest
.
- name: Fuzz test
run: >-
docker run
--cap-add SYS_PTRACE
1tgr/websocket-lite-fuzz:latest
cargo fuzz run fuzz_codec fuzz/corpus/custom -- -dict=fuzz/dict.txt -max_total_time=60