18
18
- run : cargo +stable fmt --all -- --check
19
19
20
20
clippy-native :
21
+ name : Clippy + Check native
22
+ # clippy is a superset of cargo check.
21
23
runs-on : ubuntu-latest
22
24
steps :
23
25
- uses : actions/checkout@v4
@@ -26,17 +28,18 @@ jobs:
26
28
toolchain : stable
27
29
components : clippy
28
30
- uses : Swatinem/rust-cache@v2
29
- - run : cargo +stable clippy --workspace --target x86_64-unknown-linux-gnu --all-features -- -D warnings
31
+ - run : cargo +stable clippy --workspace --target x86_64-unknown-linux-gnu --all-features --all-targets -- -D warnings
30
32
31
33
clippy-web :
34
+ name : Clippy + Check wasm
32
35
runs-on : ubuntu-latest
33
36
steps :
34
37
- uses : actions/checkout@v4
35
38
- uses : dtolnay/rust-toolchain@master
36
39
with :
37
40
toolchain : ${{env.RUST_NIGHTLY_TOOLCHAIN_VERSION}}
38
41
- uses : Swatinem/rust-cache@v2
39
- - run : cargo clippy --workspace --target wasm32-unknown-unknown --all-features -- -D warnings
42
+ - run : cargo clippy --workspace --target wasm32-unknown-unknown --all-features --all-targets -- -D warnings
40
43
41
44
test :
42
45
runs-on : ubuntu-latest
@@ -91,16 +94,19 @@ jobs:
91
94
# macos-latest seems to already run on arm64(=aarch64):
92
95
# https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job#standard-github-hosted-runners-for-public-repositories
93
96
TARGET : aarch64-apple-darwin
97
+ pretty_name : macos-arm64
94
98
95
99
- os : macos-latest
96
100
TARGET : x86_64-apple-darwin
97
101
# even though the runner uses arm64, MacOS on arm64 seems to support building for amd64.
98
102
# which makes sense, would be bad for devs otherwise.
99
103
cross : false
104
+ pretty_name : macos-amd64
100
105
101
106
- os : ubuntu-latest
102
107
TARGET : aarch64-unknown-linux-gnu
103
108
cross : true
109
+ pretty_name : linux-gnu-arm64
104
110
105
111
# who even uses these.
106
112
# - os: ubuntu-latest
@@ -109,10 +115,12 @@ jobs:
109
115
110
116
- os : ubuntu-latest
111
117
TARGET : x86_64-unknown-linux-gnu
118
+ pretty_name : linux-gnu-amd64
112
119
113
120
- os : windows-latest
114
121
TARGET : x86_64-pc-windows-msvc
115
122
EXTENSION : .exe
123
+ pretty_name : windows-amd64
116
124
117
125
steps :
118
126
- name : Install cross
@@ -133,8 +141,7 @@ jobs:
133
141
toolchain : stable
134
142
targets : ${{ matrix.TARGET }}
135
143
136
- - name : Rust Cache
137
- uses : Swatinem/rust-cache@v2
144
+ - uses : Swatinem/rust-cache@v2
138
145
with :
139
146
# this is required to avoid failures due to caching of artifacts for different architectures
140
147
# The reason is the potential usage of cross.
@@ -155,18 +162,18 @@ jobs:
155
162
cross build --locked --verbose --release --target=${{ matrix.TARGET }}
156
163
157
164
- name : Rename
158
- run : cp target/${{ matrix.TARGET }}/release/${{ github.event.repository.name }}${{ matrix.EXTENSION }} ${{ github.event.repository.name }}-${{ matrix.TARGET }}${{ matrix.EXTENSION }}
165
+ run : cp target/${{ matrix.TARGET }}/release/${{ github.event.repository.name }}${{ matrix.EXTENSION }} ${{ github.event.repository.name }}-${{ matrix.pretty_name }}${{ matrix.EXTENSION }}
159
166
160
167
- name : Compress
161
168
run : |
162
- zstd ${{ github.event.repository.name }}-${{ matrix.TARGET }}${{ matrix.EXTENSION }}
163
- tar caf ${{ github.event.repository.name }}-${{ matrix.TARGET }}${{ matrix.EXTENSION }}.tar.gz ${{ github.event.repository.name }}-${{ matrix.TARGET }}${{ matrix.EXTENSION }}
169
+ # zstd ${{ github.event.repository.name }}-${{ matrix.pretty_name }}${{ matrix.EXTENSION }}
170
+ tar caf ${{ github.event.repository.name }}-${{ matrix.pretty_name }}${{ matrix.EXTENSION }}.tar.gz ${{ github.event.repository.name }}-${{ matrix.pretty_name }}${{ matrix.EXTENSION }}
164
171
165
172
- uses : actions/upload-artifact@v4
166
173
with :
167
174
name : ${{ matrix.TARGET }}-executable
168
175
compression-level : 0
169
- path : ${{ github.event.repository.name }}-${{ matrix.TARGET }}${{ matrix.EXTENSION }}.*
176
+ path : ${{ github.event.repository.name }}-${{ matrix.pretty_name }}${{ matrix.EXTENSION }}.*
170
177
171
178
fine-for-deployment :
172
179
runs-on : ubuntu-latest
0 commit comments