new: add all linux support
This commit is contained in:
23
.github/workflows/release.yml
vendored
23
.github/workflows/release.yml
vendored
@@ -19,10 +19,25 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
job:
|
job:
|
||||||
- { os: 'ubuntu-latest', target: 'android' }
|
- { os: 'ubuntu-latest', target: 'android' }
|
||||||
- { os: 'ubuntu-20.04', target: 'linux-amd64', aarch: 'x64' }
|
- { os: 'ubuntu-20.04', target: 'linux-amd64' }
|
||||||
- { os: 'ubuntu-latest', target: 'windows-amd64', aarch: 'x64' }
|
- { os: 'ubuntu-latest', target: 'windows-amd64', aarch: 'x64' }
|
||||||
- { os: 'macos-11', target: 'macos-universal' }
|
- { os: 'macos-11', target: 'macos-universal' }
|
||||||
- { os: "macos-11", target: "ios" }
|
- { os: "macos-11", target: "ios" }
|
||||||
|
# linux custom
|
||||||
|
- {name: linux-amd64, goos: linux, goarch: amd64, goamd64: v1, target: 'linux-custom', os: 'ubuntu-20.04'}
|
||||||
|
- {name: linux-amd64-v3, goos: linux, goarch: amd64, goamd64: v3, target: 'linux-custom', os: 'ubuntu-20.04'}
|
||||||
|
- {name: linux-386, goos: linux, goarch: 386, target: 'linux-custom', os: 'ubuntu-20.04'}
|
||||||
|
- {name: linux-arm64, goos: linux, goarch: arm64, target: 'linux-custom', os: 'ubuntu-20.04'}
|
||||||
|
- {name: linux-armv5, goos: linux, goarch: arm, goarm: 5, target: 'linux-custom', os: 'ubuntu-20.04'}
|
||||||
|
- {name: linux-armv6, goos: linux, goarch: arm, goarm: 6, target: 'linux-custom', os: 'ubuntu-20.04'}
|
||||||
|
- {name: linux-armv7, goos: linux, goarch: arm, goarm: 7, target: 'linux-custom', os: 'ubuntu-20.04'}
|
||||||
|
- {name: linux-mips-softfloat, goos: linux, goarch: mips, gomips: softfloat, target: 'linux-custom', os: 'ubuntu-20.04'}
|
||||||
|
- {name: linux-mips-hardfloat, goos: linux, goarch: mips, gomips: hardfloat, target: 'linux-custom', os: 'ubuntu-20.04'}
|
||||||
|
- {name: linux-mipsel-softfloat, goos: linux, goarch: mipsle, gomips: softfloat, target: 'linux-custom', os: 'ubuntu-20.04'}
|
||||||
|
- {name: linux-mipsel-hardfloat, goos: linux, goarch: mipsle, gomips: hardfloat, target: 'linux-custom', os: 'ubuntu-20.04'}
|
||||||
|
- {name: linux-mips64, goos: linux, goarch: mips64, target: 'linux-custom', os: 'ubuntu-20.04'}
|
||||||
|
- {name: linux-mips64el, goos: linux, goarch: mips64le, target: 'linux-custom', os: 'ubuntu-20.04'}
|
||||||
|
- {name: linux-s390x, goos: linux, goarch: s390x, target: 'linux-custom', os: 'ubuntu-20.04'}
|
||||||
|
|
||||||
runs-on: ${{ matrix.job.os }}
|
runs-on: ${{ matrix.job.os }}
|
||||||
steps:
|
steps:
|
||||||
@@ -65,6 +80,12 @@ jobs:
|
|||||||
brew install create-dmg tree coreutils
|
brew install create-dmg tree coreutils
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
|
env:
|
||||||
|
GOOS: ${{ matrix.job.goos }}
|
||||||
|
GOARCH: ${{ matrix.job.goarch }}
|
||||||
|
GOAMD64: ${{ matrix.job.goamd64 }}
|
||||||
|
GOARM: ${{ matrix.job.goarm }}
|
||||||
|
GOMIPS: ${{ matrix.job.gomips }}
|
||||||
run: |
|
run: |
|
||||||
make -j$(($(nproc) + 1)) ${{ matrix.job.target }}
|
make -j$(($(nproc) + 1)) ${{ matrix.job.target }}
|
||||||
|
|
||||||
|
|||||||
11
Makefile
11
Makefile
@@ -55,10 +55,15 @@ windows-amd64:
|
|||||||
|
|
||||||
|
|
||||||
linux-amd64:
|
linux-amd64:
|
||||||
env GOOS=linux GOARCH=amd64 $(GOBUILDLIB) -o $(BINDIR)/$(LIBNAME).so ./custom
|
env GOOS=linux GOARCH=amd64 make linux-custom
|
||||||
|
|
||||||
|
|
||||||
|
linux-custom:
|
||||||
|
mkdir -p $(BINDIR)/lib/
|
||||||
|
env $(GOBUILDLIB) -o $(BINDIR)/lib/$(LIBNAME).so ./custom
|
||||||
mkdir lib
|
mkdir lib
|
||||||
cp $(BINDIR)/$(LIBNAME).so ./lib/$(LIBNAME).so
|
cp $(BINDIR)/lib/$(LIBNAME).so ./lib/$(LIBNAME).so
|
||||||
env GOOS=linux GOARCH=amd64 CGO_LDFLAGS="./lib/$(LIBNAME).so" $(GOBUILDSRV) -o $(BINDIR)/$(CLINAME) ./cli/bydll
|
env CGO_LDFLAGS="./lib/$(LIBNAME).so" $(GOBUILDSRV) -o $(BINDIR)/$(CLINAME) ./cli/bydll
|
||||||
rm -rf ./lib
|
rm -rf ./lib
|
||||||
chmod +x $(BINDIR)/$(CLINAME)
|
chmod +x $(BINDIR)/$(CLINAME)
|
||||||
make webui
|
make webui
|
||||||
|
|||||||
Reference in New Issue
Block a user