2
2
3
3
on :
4
4
push :
5
- branches : [ "dev", "master" ]
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,126 +15,115 @@ 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
21
+ - uses : actions/checkout@v2
22
+
23
+ - name : Restore cargo cache
24
+ uses : actions/cache@v2
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 : actions-rs/toolchain@v1
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
89
79
90
80
linting :
91
81
name : Lints
92
82
runs-on : ubuntu-latest
93
83
steps :
94
- - uses : actions/checkout@master
95
- - name : Install Rust
96
- uses : actions-rs/toolchain@v1
97
- with :
98
- toolchain : stable
99
- override : true
100
- components : rustfmt
84
+ - uses : actions/checkout@master
85
+ - name : Install Rust
86
+ uses : actions-rs/toolchain@v1
87
+ with :
88
+ toolchain : stable
89
+ override : true
90
+ components : rustfmt
101
91
102
- - run : cargo fmt -- --check
92
+ - run : cargo fmt -- --check
103
93
104
- - name : cargo-sort
105
- run : |
106
- cargo install cargo-sort --force
107
- cargo sort -c -w
94
+ - name : cargo-sort
95
+ run : |
96
+ cargo install cargo-sort --force
97
+ cargo sort -c -w
108
98
109
- - name : cargo-deny install
110
- run : |
111
- cargo install --locked cargo-deny
99
+ - name : cargo-deny install
100
+ run : |
101
+ cargo install --locked cargo-deny
112
102
113
- # - name: cargo-deny licenses
114
- # run: |
115
- # cargo deny check licenses
103
+ # - name: cargo-deny licenses
104
+ # run: |
105
+ # cargo deny check licenses
116
106
117
- - name : cargo-deny bans
118
- run : |
119
- cargo deny check bans
107
+ - name : cargo-deny bans
108
+ run : |
109
+ cargo deny check bans
120
110
121
111
udeps :
122
112
name : udeps
123
113
runs-on : ubuntu-latest
124
114
steps :
125
- - uses : actions/checkout@master
126
- - name : Install Rust
127
- uses : actions-rs/toolchain@v1
128
- with :
129
- toolchain : nightly
130
- override : true
131
-
132
- - name : cargo-udeps
133
- run : |
134
- # cargo install --locked cargo-udeps
135
- cargo install --git https://github.com/est31/cargo-udeps --locked
136
- cargo +nightly udeps --all-targets
137
-
115
+ - uses : actions/checkout@master
116
+ - name : Install Rust
117
+ uses : actions-rs/toolchain@v1
118
+ with :
119
+ toolchain : nightly
120
+ override : true
121
+
122
+ - name : cargo-udeps
123
+ run : |
124
+ # cargo install --locked cargo-udeps
125
+ cargo install --git https://github.com/est31/cargo-udeps --locked
126
+ cargo +nightly udeps --all-targets
138
127
139
128
# sec:
140
129
# name: Security audit
0 commit comments