Skip to content

Commit d5fdc14

Browse files
committed
Do not compress MacOS binaries with upx
Apprently this is no longer supported by the tool itself.
1 parent 7d8b1c9 commit d5fdc14

File tree

3 files changed

+21
-11
lines changed

3 files changed

+21
-11
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ jobs:
5454
- name: Install OS dependencies
5555
run: |
5656
brew update
57-
brew install libtag upx
57+
brew install libtag
5858
5959
- name: Build Release Bundle
6060
id: macos_bundle
6161
run: |
62-
./tools/build
62+
./tools/build release-no-upx
6363
6464
- name: Upload macOS (amd64) Artifact
6565
uses: actions/upload-artifact@v4

Makefile

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,27 @@
1+
.PHONY : build compress release release-no-upx install dist-archive run
2+
13
# Build a normal binary for development.
2-
all:
3-
go build \
4-
--tags "sqlite_icu" \
5-
-ldflags "-X github.com/ironsmile/euterpe/src/version.Version=`git describe --tags --always`"
4+
all: build
65

76
# Build a release binary which could be used in the distribution archive.
8-
release:
7+
build:
98
go build \
109
--tags "sqlite_icu" \
1110
-ldflags "-X github.com/ironsmile/euterpe/src/version.Version=`git describe --tags --always`" \
1211
-o euterpe
1312

14-
# Compress it somewhat. It seems that the Euterpe binary gets more than 3 times smaller
15-
# using upx.
13+
# Compress it somewhat. It seems that the Euterpe binary gets significantly smaller
14+
# using upx.
15+
compress:
1616
upx euterpe
1717

18+
# Build a release binary which could be used in the distribution archive.
19+
release: build compress
20+
21+
# Build a release binary which could be used in the distribution archive but don't
22+
# compress it with upx.
23+
release-no-upx: build
24+
1825
# Install in $GOPATH/bin.
1926
install:
2027
go install \
@@ -25,6 +32,6 @@ install:
2532
dist-archive:
2633
./tools/build
2734

28-
# Start euterpe after building it from source.
35+
# Start Euterpe after building it from source.
2936
run:
3037
go run --tags "sqlite_icu" main.go -D -local-fs

tools/build

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,12 @@ fi
3030

3131
echo "Making dist directory..."
3232
mkdir -p dist/euterpe
33+
#!/usr/bin/env bash
34+
35+
make_action=${1:-release}
3336

3437
echo "Building binaries..."
35-
make release
38+
make "${make_action}"
3639
mv euterpe dist/euterpe/euterpe
3740

3841
for file in README.md API.md CHANGELOG.md

0 commit comments

Comments
 (0)