Skip to content

Commit ca54a04

Browse files
authored
Gh action (#246)
* adjust rust * adjust order * use rust 1.64 * test fix * disable rust * fix * disable i386, cross compile arm * improve arm strip
1 parent 0681a71 commit ca54a04

File tree

1 file changed

+29
-11
lines changed

1 file changed

+29
-11
lines changed

.github/workflows/build_release.yml

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ jobs:
1919
ubuntu-version: "20.04"
2020
container: ubuntu:20.04
2121
- arch: arm64
22-
runs-on: runonflux-arm64
23-
ubuntu-version: "20.04"
24-
container: ubuntu:20.04
25-
- arch: i386
2622
runs-on: ubuntu-24.04
2723
ubuntu-version: "20.04"
2824
container: ubuntu:20.04
25+
# - arch: i386
26+
# runs-on: ubuntu-24.04
27+
# ubuntu-version: "20.04"
28+
# container: ubuntu:20.04
2929
- arch: windows
3030
runs-on: ubuntu-24.04
3131
ubuntu-version: "20.04"
@@ -101,10 +101,19 @@ jobs:
101101
cp src/flux-cli $DEB_DIR/usr/local/bin/
102102
cp src/flux-tx $DEB_DIR/usr/local/bin/
103103
104-
# Strip binaries to reduce size
105-
strip $DEB_DIR/usr/local/bin/fluxd
106-
strip $DEB_DIR/usr/local/bin/flux-cli
107-
strip $DEB_DIR/usr/local/bin/flux-tx
104+
# Set the correct strip command based on architecture
105+
if [[ "${{ matrix.arch }}" == "arm64" ]]; then
106+
STRIP_CMD="aarch64-linux-gnu-strip"
107+
elif [[ "${{ matrix.arch }}" == "i386" ]]; then
108+
STRIP_CMD="strip"
109+
else
110+
STRIP_CMD="strip" # amd64 uses native strip
111+
fi
112+
113+
# Strip binaries to reduce size using the correct strip command
114+
$STRIP_CMD $DEB_DIR/usr/local/bin/fluxd
115+
$STRIP_CMD $DEB_DIR/usr/local/bin/flux-cli
116+
$STRIP_CMD $DEB_DIR/usr/local/bin/flux-tx
108117
109118
# Copy fetch-params script if it exists (renamed to flux-fetch-params in deb)
110119
if [ -f zcutil/fetch-params.sh ]; then
@@ -149,10 +158,19 @@ jobs:
149158
# Create zip archive for Windows
150159
zip Flux-Windows-${{ env.VERSION }}-${{ env.BRANCH }}-${{ github.run_id }}.zip fluxd.exe flux-cli.exe flux-tx.exe $([ -f fetch-params.bat ] && echo fetch-params.bat)
151160
else
152-
# Strip binaries to reduce size
153-
strip ./src/fluxd ./src/flux-cli ./src/flux-tx
161+
# Set the correct strip command based on architecture
162+
if [[ "${{ matrix.arch }}" == "arm64" ]]; then
163+
STRIP_CMD="aarch64-linux-gnu-strip"
164+
elif [[ "${{ matrix.arch }}" == "i386" ]]; then
165+
STRIP_CMD="strip"
166+
else
167+
STRIP_CMD="strip" # amd64 uses native strip
168+
fi
169+
170+
# Strip binaries to reduce size using the correct strip command
171+
$STRIP_CMD ./src/fluxd ./src/flux-cli ./src/flux-tx
154172
if [ -f ./src/flux-gtest ]; then
155-
strip ./src/flux-gtest
173+
$STRIP_CMD ./src/flux-gtest
156174
fi
157175
158176
# Copy binaries to root directory to avoid nested paths in tar

0 commit comments

Comments
 (0)