Skip to content

Commit 2fe8e14

Browse files
committed
prettify uploaded artifacts
1 parent 43d12af commit 2fe8e14

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

.github/workflows/rust.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
- run: cargo +stable fmt --all -- --check
1919

2020
clippy-native:
21+
name: Clippy + Check native
22+
# clippy is a superset of cargo check.
2123
runs-on: ubuntu-latest
2224
steps:
2325
- uses: actions/checkout@v4
@@ -26,17 +28,18 @@ jobs:
2628
toolchain: stable
2729
components: clippy
2830
- 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
3032

3133
clippy-web:
34+
name: Clippy + Check wasm
3235
runs-on: ubuntu-latest
3336
steps:
3437
- uses: actions/checkout@v4
3538
- uses: dtolnay/rust-toolchain@master
3639
with:
3740
toolchain: ${{env.RUST_NIGHTLY_TOOLCHAIN_VERSION}}
3841
- 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
4043

4144
test:
4245
runs-on: ubuntu-latest
@@ -91,16 +94,19 @@ jobs:
9194
# macos-latest seems to already run on arm64(=aarch64):
9295
# https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job#standard-github-hosted-runners-for-public-repositories
9396
TARGET: aarch64-apple-darwin
97+
pretty_name: macos-arm64
9498

9599
- os: macos-latest
96100
TARGET: x86_64-apple-darwin
97101
# even though the runner uses arm64, MacOS on arm64 seems to support building for amd64.
98102
# which makes sense, would be bad for devs otherwise.
99103
cross: false
104+
pretty_name: macos-amd64
100105

101106
- os: ubuntu-latest
102107
TARGET: aarch64-unknown-linux-gnu
103108
cross: true
109+
pretty_name: linux-gnu-arm64
104110

105111
# who even uses these.
106112
# - os: ubuntu-latest
@@ -109,10 +115,12 @@ jobs:
109115

110116
- os: ubuntu-latest
111117
TARGET: x86_64-unknown-linux-gnu
118+
pretty_name: linux-gnu-amd64
112119

113120
- os: windows-latest
114121
TARGET: x86_64-pc-windows-msvc
115122
EXTENSION: .exe
123+
pretty_name: windows-amd64
116124

117125
steps:
118126
- name: Install cross
@@ -133,8 +141,7 @@ jobs:
133141
toolchain: stable
134142
targets: ${{ matrix.TARGET }}
135143

136-
- name: Rust Cache
137-
uses: Swatinem/rust-cache@v2
144+
- uses: Swatinem/rust-cache@v2
138145
with:
139146
# this is required to avoid failures due to caching of artifacts for different architectures
140147
# The reason is the potential usage of cross.
@@ -155,18 +162,18 @@ jobs:
155162
cross build --locked --verbose --release --target=${{ matrix.TARGET }}
156163
157164
- 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 }}
159166

160167
- name: Compress
161168
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 }}
164171
165172
- uses: actions/upload-artifact@v4
166173
with:
167174
name: ${{ matrix.TARGET }}-executable
168175
compression-level: 0
169-
path: ${{ github.event.repository.name }}-${{ matrix.TARGET }}${{ matrix.EXTENSION }}.*
176+
path: ${{ github.event.repository.name }}-${{ matrix.pretty_name }}${{ matrix.EXTENSION }}.*
170177

171178
fine-for-deployment:
172179
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)