Skip to content

Commit

Permalink
Merge pull request #114 from Snawoot/drop_go120
Browse files Browse the repository at this point in the history
Drop go1.20 support
  • Loading branch information
Snawoot authored Feb 24, 2024
2 parents 1d81ddd + 3682278 commit 8680aaf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 28 deletions.
29 changes: 5 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,41 +17,22 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Read tag
id: tag
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
-
name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 'stable'
-
name: Read tag
id: tag
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
-
name: Build
run: >-
make -j $(nproc)
bin-linux-amd64 bin-linux-386 bin-linux-arm bin-linux-arm64
bin-linux-mips bin-linux-mipsle bin-linux-mips64 bin-linux-mips64le
bin-freebsd-amd64 bin-freebsd-386 bin-freebsd-arm
bin-netbsd-amd64 bin-netbsd-386
bin-openbsd-amd64 bin-openbsd-386
bin-darwin-amd64 bin-darwin-arm64
bin-android-arm bin-android-arm64
make -j $(nproc) allplus
NDK_CC_ARM64="$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang"
NDK_CC_ARM="$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi21-clang"
VERSION=${{steps.tag.outputs.tag}}
-
name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '~1.20'
-
name: Build
run: >-
make -j $(nproc)
bin-windows-amd64 bin-windows-386 bin-windows-arm
VERSION=${{steps.tag.outputs.tag}}
GO120=go
-
name: Release
uses: softprops/action-gh-release@v1
Expand Down
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ NDK_CC_ARM = $(abspath ../../ndk-toolchain-arm/bin/arm-linux-androideabi-gcc)
NDK_CC_ARM64 = $(abspath ../../ndk-toolchain-arm64/bin/aarch64-linux-android21-clang)

GO := go
GO120 := /usr/lib64/go/1.20/bin/go

src = $(wildcard *.go */*.go */*/*.go) go.mod go.sum

Expand Down Expand Up @@ -104,13 +103,13 @@ $(OUTSUFFIX).darwin-arm64: $(src)
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 $(GO) build $(BUILDOPTS) $(LDFLAGS) -o $@

$(OUTSUFFIX).windows-amd64.exe: $(src)
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 $(GO120) build $(BUILDOPTS) $(LDFLAGS) -o $@
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 $(GO) build $(BUILDOPTS) $(LDFLAGS) -o $@

$(OUTSUFFIX).windows-386.exe: $(src)
CGO_ENABLED=0 GOOS=windows GOARCH=386 $(GO120) build $(BUILDOPTS) $(LDFLAGS) -o $@
CGO_ENABLED=0 GOOS=windows GOARCH=386 $(GO) build $(BUILDOPTS) $(LDFLAGS) -o $@

$(OUTSUFFIX).windows-arm.exe: $(src)
CGO_ENABLED=0 GOOS=windows GOARCH=arm GOARM=7 $(GO120) build $(BUILDOPTS) $(LDFLAGS) -o $@
CGO_ENABLED=0 GOOS=windows GOARCH=arm GOARM=7 $(GO) build $(BUILDOPTS) $(LDFLAGS) -o $@

$(OUTSUFFIX).android-arm: $(src)
CC=$(NDK_CC_ARM) CGO_ENABLED=1 GOOS=android GOARCH=arm GOARM=7 $(GO) build $(LDFLAGS_NATIVE) -o $@
Expand Down

0 comments on commit 8680aaf

Please sign in to comment.