12
12
workflow_dispatch :
13
13
14
14
jobs :
15
+ lint :
16
+ runs-on : ubuntu-latest
17
+ env :
18
+ RUST_LOG : info
19
+ steps :
20
+
21
+ name : Cancel Outdated Builds
22
+ with :
23
+ all_but_latest : true
24
+ access_token : ${{ github.token }}
25
+
26
+ - uses : actions/checkout@v4
27
+ name : Checkout Repository
28
+
29
+ - uses : dtolnay/rust-toolchain@stable
30
+
31
+ - uses : Swatinem/rust-cache@v2
32
+ name : Enable Rust Caching
33
+
34
+ - name : Format Check
35
+ run : cargo fmt -- --check
36
+
37
+ - uses : actions-rs/clippy-check@v1
38
+ name : Clippy
39
+ with :
40
+ token : ${{ github.token }}
41
+ args : --workspace --all-features --all-targets -- -D warnings
42
+
15
43
build :
16
44
runs-on : ubuntu-latest
17
45
env :
46
74
github_token : ${{ secrets.GITHUB_TOKEN }}
47
75
publish_dir : ./target/doc
48
76
cname : tide-disco.docs.espressosys.com
77
+
78
+ test :
79
+ runs-on : ubuntu-latest
80
+ env :
81
+ RUST_LOG : info
82
+ steps :
83
+
84
+ name : Cancel Outdated Builds
85
+ with :
86
+ all_but_latest : true
87
+ access_token : ${{ github.token }}
88
+
89
+ - uses : actions/checkout@v4
90
+ name : Checkout Repository
91
+
92
+ - uses : dtolnay/rust-toolchain@stable
93
+
94
+ - uses : Swatinem/rust-cache@v2
95
+ name : Enable Rust Caching
96
+
97
+ - name : Build tests
98
+ run : cargo test --workspace --release --all-features --no-run
99
+
100
+ - name : Test
101
+ run : cargo test --workspace --release --all-features --verbose -- --test-threads 2
102
+ timeout-minutes : 60
103
+
104
+ docs :
105
+ runs-on : ubuntu-latest
106
+ env :
107
+ RUST_LOG : info
108
+ steps :
109
+
110
+ name : Cancel Outdated Builds
111
+ with :
112
+ all_but_latest : true
113
+ access_token : ${{ github.token }}
114
+
115
+ - uses : actions/checkout@v4
116
+ name : Checkout Repository
117
+
118
+ - uses : dtolnay/rust-toolchain@stable
119
+
120
+ - uses : Swatinem/rust-cache@v2
121
+ name : Enable Rust Caching
122
+
123
+ - name : Generate Documentation
124
+ run : |
125
+ cargo doc --no-deps --lib --release --all-features
126
+ echo '<meta http-equiv="refresh" content="0; url=base64_bytes">' > target/doc/index.html
127
+
128
+ - name : Deploy Documentation
129
+ uses : peaceiris/actions-gh-pages@v3
130
+ if : ${{ github.ref == 'refs/heads/main' }}
131
+ with :
132
+ github_token : ${{ secrets.GITHUB_TOKEN }}
133
+ publish_dir : ./target/doc
134
+ cname : base64-bytes.docs.espressosys.com
135
+
136
+ publish :
137
+ needs :
138
+ - build
139
+ - test
140
+ - lint
141
+ - docs
142
+ runs-on : ubuntu-latest
143
+ steps :
144
+ - uses : actions/checkout@v3
145
+ - uses : actions-rs/toolchain@v1
146
+ with :
147
+ toolchain : stable
148
+ override : true
149
+ - uses : katyo/publish-crates@v2
150
+ with :
151
+ dry-run : ${{ github.event_name != 'push' }}
152
+ ignore-unpublished-changes : true
0 commit comments