2
2
3
3
on :
4
4
push :
5
- branches : [ '*' ]
5
+ branches : ["dev", "master" ]
6
6
pull_request :
7
- branches : [ master ]
7
+ branches : [master]
8
8
9
9
env :
10
10
CARGO_TERM_COLOR : always
@@ -15,183 +15,122 @@ jobs:
15
15
fail-fast : false
16
16
matrix :
17
17
os : [ubuntu-latest, macos-latest, windows-latest]
18
- rust : [nightly, stable, ' 1.70' ]
18
+ rust : [stable, " 1.70" ]
19
19
runs-on : ${{ matrix.os }}
20
- continue-on-error : ${{ matrix.rust == 'nightly' }}
21
-
22
20
steps :
23
- - uses : actions/checkout@v2
24
-
25
- - name : Restore cargo cache
26
- uses : actions/cache@v2
27
- env :
28
- cache-name : ci
29
- with :
30
- path : |
31
- ~/.cargo/registry
32
- ~/.cargo/git
33
- ~/.cargo/bin
34
- target
35
- key : ${{ matrix.os }}-${{ env.cache-name }}-${{ matrix.rust }}-${{ hashFiles('Cargo.lock') }}
36
-
37
- - name : MacOS Workaround
38
- if : matrix.os == 'macos-latest'
39
- run : cargo clean -p serde_derive -p thiserror
40
-
41
- - name : Install Rust
42
- uses : actions-rs/toolchain@v1
43
- with :
44
- toolchain : ${{ matrix.rust }}
45
- default : true
46
- override : true
47
- profile : minimal
48
- components : clippy
49
-
50
- - name : Build Debug
51
- run : |
52
- cargo build
53
-
54
- - name : Run tests
55
- run : cargo test
56
-
57
- - name : Run clippy
58
- run : |
59
- cargo clippy --workspace --all-features
60
-
61
- - name : Build Release
62
- run : cargo build --release
63
-
64
- - name : Test Install
65
- run : cargo install --path "." --force
66
-
67
- - name : Binary Size (unix)
68
- if : matrix.os != 'windows-latest'
69
- run : |
70
- ls -l ./target/release/leetui
71
-
72
- - name : Binary Size (win)
73
- if : matrix.os == 'windows-latest'
74
- run : |
75
- ls -l ./target/release/leetui.exe
76
-
77
- - name : Binary dependencies (mac)
78
- if : matrix.os == 'macos-latest'
79
- run : |
80
- otool -L ./target/release/leetui
81
-
82
- - name : Build MSI (windows)
83
- if : matrix.os == 'windows-latest'
84
- run : |
85
- cargo install cargo-wix --version 0.3.3
86
- cargo wix --version
87
- cargo wix -p leetui --no-build --nocapture --output ./target/wix/leetui.msi
88
- ls -l ./target/wix/leetui.msi
89
-
90
- build-linux-musl :
91
- runs-on : ubuntu-latest
92
- strategy :
93
- fail-fast : false
94
- matrix :
95
- rust : [nightly, stable, '1.70']
96
- continue-on-error : ${{ matrix.rust == 'nightly' }}
97
- steps :
98
- - uses : actions/checkout@master
99
- - name : Install Rust
100
- uses : actions-rs/toolchain@v1
101
- with :
102
- toolchain : ${{ matrix.rust }}
103
- profile : minimal
104
- default : true
105
- override : true
106
- target : x86_64-unknown-linux-musl
107
-
108
- - name : Setup MUSL
109
- run : |
110
- sudo apt-get -qq install musl-tools && sudo apt-get -y install libssl-dev && sudo apt-get -y install pkg-config
111
- - name : Build Debug
112
- run : |
113
- cargo build --target=x86_64-unknown-linux-musl
114
- ./target/x86_64-unknown-linux-musl/debug/leetui --version
115
- - name : Build Release
116
- run : |
117
- cargo build --release --target=x86_64-unknown-linux-musl
118
- ./target/x86_64-unknown-linux-musl/release/leetui --version
119
- ls -l ./target/x86_64-unknown-linux-musl/release/leetui
120
- - name : Test
121
- run : |
122
- cargo test --workspace --target=x86_64-unknown-linux-musl
123
- - name : Test Install
124
- run : cargo install --path "." --force
21
+ - uses : actions/checkout@v3
22
+
23
+ - name : Restore cargo cache
24
+ uses : actions/cache@v3
25
+ env :
26
+ cache-name : ci
27
+ with :
28
+ path : |
29
+ ~/.cargo/registry
30
+ ~/.cargo/git
31
+ ~/.cargo/bin
32
+ target
33
+ key : ${{ matrix.os }}-${{ env.cache-name }}-${{ matrix.rust }}-${{ hashFiles('Cargo.lock') }}
34
+
35
+ - name : MacOS Workaround
36
+ if : matrix.os == 'macos-latest'
37
+ run : cargo clean -p serde_derive -p thiserror
38
+
39
+ - name : Install Rust
40
+ uses : dtolnay/rust-toolchain@stable
41
+ with :
42
+ toolchain : ${{ matrix.rust }}
43
+ default : true
44
+ override : true
45
+ profile : minimal
46
+ components : clippy
47
+
48
+ - name : Build Debug
49
+ run : |
50
+ cargo build
51
+
52
+ - name : Run tests
53
+ run : cargo test
54
+
55
+ - name : Run clippy
56
+ run : |
57
+ cargo clippy --workspace --all-features
58
+
59
+ - name : Build Release
60
+ run : cargo build --release
61
+
62
+ - name : Test Install
63
+ run : cargo install --path "." --force
64
+
65
+ - name : Binary Size (unix)
66
+ if : matrix.os != 'windows-latest'
67
+ run : |
68
+ ls -l ./target/release/leetui
69
+
70
+ - name : Binary Size (win)
71
+ if : matrix.os == 'windows-latest'
72
+ run : |
73
+ ls -l ./target/release/leetui.exe
74
+
75
+ - name : Binary dependencies (mac)
76
+ if : matrix.os == 'macos-latest'
77
+ run : |
78
+ otool -L ./target/release/leetui
125
79
126
80
linting :
127
81
name : Lints
128
82
runs-on : ubuntu-latest
129
83
steps :
130
- - uses : actions/checkout@master
131
- - name : Install Rust
132
- uses : actions-rs/ toolchain@v1
133
- with :
134
- toolchain : stable
135
- override : true
136
- components : rustfmt
84
+ - uses : actions/checkout@master
85
+ - name : Install Rust
86
+ uses : dtolnay/rust- toolchain@stable
87
+ with :
88
+ toolchain : stable
89
+ override : true
90
+ components : rustfmt
137
91
138
- - run : cargo fmt -- --check
92
+ - run : cargo fmt -- --check
139
93
140
- - name : cargo-sort
141
- run : |
142
- cargo install cargo-sort --force
143
- cargo sort -c -w
94
+ - name : cargo-sort
95
+ run : |
96
+ cargo install cargo-sort --force
97
+ cargo sort -c -w
144
98
145
- - name : cargo-deny install
146
- run : |
147
- cargo install --locked cargo-deny
99
+ - name : cargo-deny install
100
+ run : |
101
+ cargo install --locked cargo-deny
148
102
149
- # - name: cargo-deny licenses
150
- # run: |
151
- # cargo deny check licenses
152
-
153
- - name : cargo-deny bans
154
- run : |
155
- cargo deny check bans
103
+ - name : cargo-deny bans
104
+ run : |
105
+ cargo deny check bans
156
106
157
107
udeps :
158
108
name : udeps
159
109
runs-on : ubuntu-latest
110
+ steps :
111
+ - uses : actions/checkout@master
112
+ - name : Install Rust
113
+ uses : dtolnay/rust-toolchain@stable
114
+ with :
115
+ toolchain : nightly
116
+ override : true
117
+
118
+ - name : cargo-udeps
119
+ run : |
120
+ cargo install --git https://github.com/est31/cargo-udeps --locked
121
+ cargo +nightly udeps --all-targets
122
+
123
+ log-test :
124
+ name : Changelog Test
125
+ runs-on : ubuntu-latest
160
126
steps :
161
127
- uses : actions/checkout@master
162
- - name : Install Rust
163
- uses : actions-rs/toolchain@v1
128
+ - name : Extract release notes
129
+ id : extract_release_notes
130
+ uses : ffurrer2/extract-release-notes@v1
131
+ with :
132
+ release_notes_file : ./release-notes.txt
133
+ - uses : actions/upload-artifact@v1
164
134
with :
165
- toolchain : nightly
166
- override : true
167
-
168
- - name : cargo-udeps
169
- run : |
170
- # cargo install --locked cargo-udeps
171
- cargo install --git https://github.com/est31/cargo-udeps --locked
172
- cargo +nightly udeps --all-targets
173
-
174
-
175
- # sec:
176
- # name: Security audit
177
- # runs-on: ubuntu-latest
178
- # steps:
179
- # - uses: actions/checkout@v2
180
- # - uses: actions-rs/audit-check@v1
181
- # with:
182
- # token: ${{ secrets.GITHUB_TOKEN }}
183
-
184
- # log-test:
185
- # name: Changelog Test
186
- # runs-on: ubuntu-latest
187
- # steps:
188
- # - uses: actions/checkout@master
189
- # - name: Extract release notes
190
- # id: extract_release_notes
191
- # uses: ffurrer2/extract-release-notes@v1
192
- # with:
193
- # release_notes_file: ./release-notes.txt
194
- # - uses: actions/upload-artifact@v1
195
- # with:
196
- # name: release-notes.txt
197
- # path: ./release-notes.txt
135
+ name : release-notes.txt
136
+ path : ./release-notes.txt
0 commit comments