Skip to content

Commit

Permalink
Fix manylinux build not finding .so files (#44)
Browse files Browse the repository at this point in the history
* manylinux: update and path rpath to find .so files

* manylinux: update actions

now that we don't use a newer image
  • Loading branch information
black-sliver authored Nov 26, 2024
1 parent 266cf98 commit 6fb9d18
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -398,28 +398,33 @@ jobs:
- name: Build SNI
run: >
CGO_ENABLED=1
CGO_LDFLAGS="$CGO_LDFLAGS -Wl,-rpath=. -Wl,--gc-sections"
CGO_LDFLAGS="$CGO_LDFLAGS -Wl,-rpath=\$ORIGIN -Wl,--gc-sections"
GOARCH=amd64
go build -tags=legacy_appindicator -buildvcs=false
-gcflags=all=-l
-ldflags="-w -X 'main.version=${{env.GITHUB_REF_SLUG}}' -X 'main.commit=${{env.GITHUB_SHA_SHORT}}' -X 'main.date=$(date +'%Y-%m-%dT%H:%M:%S')'"
-o ./${{env.basename}}/sni
./cmd/sni
- name: Patch appindicator rpath
run: |
dnf -y install patchelf
patchelf --force-rpath --set-rpath '$ORIGIN' ./${{env.basename}}/libappindicator3.*
- name: Package ${{env.basename}}.tar.xz for Linux
run: |
ldd ${{env.basename}}/sni
tar cJf ${{env.basename}}.tar.xz ${{env.basename}}/
- name: Upload artifact
uses: actions/upload-artifact@v3 # @v4 does not work with manylinux2014 glibc
uses: actions/upload-artifact@v4
with:
name: ${{env.basename}}.tar.xz
path: ${{github.workspace}}/${{env.basename}}.tar.xz

- name: Upload binaries to release
if: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') }}
uses: svenstaro/upload-release-action@2.7.0 # @2.8.0 probably does not work with manylinux2014 glibc
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.GITHUB_REF_SLUG }}
Expand Down

0 comments on commit 6fb9d18

Please sign in to comment.