From dd9de257538e0711183652e5ea74e52beceff44e Mon Sep 17 00:00:00 2001 From: Hiddify <114227601+hiddify1@users.noreply.github.com> Date: Sun, 20 Aug 2023 08:28:11 +0000 Subject: [PATCH] fix: issues --- .github/workflows/release.yml | 20 ++++++++++++++++---- Makefile | 5 ++--- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b44990e..e5677a4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,11 +14,11 @@ jobs: fail-fast: false matrix: job: - - { os: "ubuntu-latest", target: "android"} + #- { os: "ubuntu-latest", target: "android"} - { os: "ubuntu-latest", target: "linux-386", aarch: 'x86'} - - { os: "ubuntu-latest", target: "linux-amd64", aarch: 'x64'} - - { os: "ubuntu-latest", target: "windows-386", aarch: 'x86'} - - { os: "ubuntu-latest", target: "windows-amd64", aarch: 'x64' } + #- { os: "ubuntu-latest", target: "linux-amd64", aarch: 'x64'} + #- { os: "ubuntu-latest", target: "windows-386", aarch: 'x86'} + #- { os: "ubuntu-latest", target: "windows-amd64", aarch: 'x64' } - { os: "macos-11", target: "macos-universal" } runs-on: ${{ matrix.job.os }} steps: @@ -27,6 +27,18 @@ jobs: with: fetch-depth: 0 + - name: Set up GCC + if: startsWith(matrix.job.target,'linux') + uses: egor-tensin/setup-gcc@v1 + with: + version: latest + platform: ${{ matrix.job.aarch }} + + - name: gcc + if: startsWith(matrix.job.target,'linux') + run: | + sudo apt-get install --reinstall libc6-dev + - name: Setup Go uses: actions/setup-go@v4 with: diff --git a/Makefile b/Makefile index b53d667..611186e 100644 --- a/Makefile +++ b/Makefile @@ -30,10 +30,9 @@ macos-amd64: env GOOS=darwin GOARCH=amd64 CGO_CFLAGS="-mmacosx-version-min=10.11" CGO_LDFLAGS="-mmacosx-version-min=10.11" CGO_ENABLED=1 go build -trimpath -tags with_gvisor,with_lwip -buildmode=c-shared -o $(BINDIR)/$(NAME)-$@.dylib ./custom macos-arm64: env GOOS=darwin GOARCH=arm64 CGO_CFLAGS="-mmacosx-version-min=10.11" CGO_LDFLAGS="-mmacosx-version-min=10.11" CGO_ENABLED=1 go build -trimpath -tags with_gvisor,with_lwip -buildmode=c-shared -o $(BINDIR)/$(NAME)-$@.dylib ./custom -macos-combine: - lipo -create $(BINDIR)/$(NAME)-macos-amd64.dylib $(BINDIR)/$(NAME)-macos-arm64.dylib -output $(BINDIR)/$(NAME)-$@.dylib -macos-universal: macos-amd64 macos-arm64 macos-combine +macos-universal: macos-amd64 macos-arm64 + lipo -create $(BINDIR)/$(NAME)-macos-amd64.dylib $(BINDIR)/$(NAME)-macos-arm64.dylib -output $(BINDIR)/$(NAME)-$@.dylib clean: