Skip to content

Commit b9749fc

Browse files
committed
Add mips build target (compressed with upx).
The binary for MIPS will be compressed using UPX since most MIPS devices have limited memory available. Closes #65.
1 parent 741eaf9 commit b9749fc

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

.goreleaser.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
project_name: chirpstack-gateway-bridge
22

3+
env:
4+
- GOMIPS=softfloat
5+
36
builds:
47
- main: cmd/chirpstack-gateway-bridge/main.go
58
binary: chirpstack-gateway-bridge
@@ -12,13 +15,16 @@ builds:
1215
- 386
1316
- arm
1417
- arm64
18+
- mips
1519
goarm:
1620
- 5
1721
- 6
1822
- 7
1923
ignore:
2024
- goos: darwin
2125
goarch: 386
26+
hooks:
27+
post: ./packaging/scripts/compress-mips.sh
2228

2329
release:
2430
disable: true

Dockerfile-devel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ENV PATH=$PATH:$PROJECT_PATH/build
55
ENV CGO_ENABLED=0
66
ENV GO_EXTRA_BUILD_ARGS="-a -installsuffix cgo"
77

8-
RUN apk add --no-cache ca-certificates make git bash
8+
RUN apk add --no-cache ca-certificates make git bash upx
99

1010
RUN mkdir -p $PROJECT_PATH
1111
COPY . $PROJECT_PATH

packaging/scripts/compress-mips.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
3+
echo "Compressing MIPS binary"
4+
upx dist/linux_mips/chirpstack-gateway-bridge

0 commit comments

Comments
 (0)