Skip to content

Commit

Permalink
Static linking considered harmful
Browse files Browse the repository at this point in the history
  • Loading branch information
n-rodriguez committed Nov 19, 2024
1 parent 84eed45 commit c26a59c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 52 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/release_binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,6 @@ jobs:
- name: Install cross-compiler for linux/arm64
run: sudo apt-get update -q && sudo apt-get -y install gcc-aarch64-linux-gnu

- name: Install UPX
env:
UPXVER: "4.2.4"
run: |
if [[ ! -f "upx/${UPXVER}/upx" ]]; then
echo "Installing upx .."
curl -OL "https://github.com/upx/upx/releases/download/v${UPXVER}/upx-${UPXVER}-amd64_linux.tar.xz"
tar xvf "upx-${UPXVER}-amd64_linux.tar.xz"
mkdir -p upx
mv "upx-${UPXVER}-amd64_linux" "upx/${UPXVER}"
rm -f "upx-${UPXVER}-amd64_linux.tar.xz"
fi
export PATH="./upx/${UPXVER}/:${PATH}"
upx --version | grep -E '^upx'
- name: Set up Go
uses: actions/setup-go@v5
with:
Expand Down
37 changes: 0 additions & 37 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,33 +32,6 @@ builds:
- "6"
- "7"

- id: static
binary: supervisord
env:
- CGO_ENABLED=1
ldflags:
- "-linkmode external -extldflags -static"
flags:
- -tags=release
goos:
- linux
goarch:
- amd64
- arm64
overrides:
- goos: linux
goarch: amd64
env:
- CC=gcc

- goos: linux
goarch: arm64
env:
- CC=aarch64-linux-gnu-gcc
hooks:
post:
- cmd: upx "{{ .Path }}"

archives:

- id: archive_multi
Expand All @@ -74,16 +47,6 @@ archives:
files:
- none*

- id: archive_static
builds: [static]
name_template: >-
{{ .ProjectName }}_static-{{ .Version }}.{{ .Os }}-{{ .Arch }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
format: tar.gz
wrap_in_directory: true
files:
- none*

release:
github:
owner: jbox-web
Expand Down

0 comments on commit c26a59c

Please sign in to comment.