Skip to content

Commit a224ca3

Browse files
yvtShekhinah Memmel
authored and
Shekhinah Memmel
committed
Strip release binary by setting profile.release.strip in a pre-build step (helix-editor#3780)
* chore(ci): remove the strip step from the release CI workflow * chore(ci): set `profile.release.strip = true` in the release CI workflow
1 parent 1e62835 commit a224ca3

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

.github/workflows/release.yml

+8-13
Original file line numberDiff line numberDiff line change
@@ -133,26 +133,21 @@ jobs:
133133
command: test
134134
args: --release --locked --target ${{ matrix.target }} --workspace
135135

136+
- name: Set profile.release.strip = true
137+
shell: bash
138+
run: |
139+
cat >> .cargo/config.toml <<EOF
140+
[profile.release]
141+
strip = true
142+
EOF
143+
136144
- name: Build release binary
137145
uses: actions-rs/cargo@v1
138146
with:
139147
use-cross: ${{ matrix.cross }}
140148
command: build
141149
args: --release --locked --target ${{ matrix.target }}
142150

143-
- name: Strip release binary (linux and macos)
144-
if: matrix.build == 'x86_64-linux' || endsWith(matrix.build, 'macos')
145-
run: strip "target/${{ matrix.target }}/release/hx"
146-
147-
- name: Strip release binary (arm)
148-
if: matrix.build == 'aarch64-linux'
149-
run: |
150-
docker run --rm -v \
151-
"$PWD/target:/target:Z" \
152-
rustembedded/cross:${{ matrix.target }} \
153-
aarch64-linux-gnu-strip \
154-
/target/${{ matrix.target }}/release/hx
155-
156151
- name: Build AppImage
157152
shell: bash
158153
if: matrix.build == 'aarch64-linux' || matrix.build == 'x86_64-linux'

0 commit comments

Comments
 (0)