+ actions + arm
This commit is contained in:
parent
462ae9810b
commit
773bc131d3
2 changed files with 11 additions and 2 deletions
11
.github/workflows/release.yml
vendored
11
.github/workflows/release.yml
vendored
|
|
@ -3,8 +3,8 @@ name: Release
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
paths:
|
# paths:
|
||||||
- "share/const.go"
|
# - "share/const.go"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
|
|
@ -13,6 +13,13 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
go: [1.17]
|
go: [1.17]
|
||||||
steps:
|
steps:
|
||||||
|
- name: arm env
|
||||||
|
run: |
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi libncurses5-dev build-essential bison flex libssl-dev bc
|
||||||
|
apt-get install -y gcc-arm-linux-gnueabi g++-arm-linux-gnueabi
|
||||||
|
apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
|
||||||
|
|
||||||
- name: Setup Cache
|
- name: Setup Cache
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
2
Makefile
2
Makefile
|
|
@ -267,6 +267,8 @@ artifacts: clean
|
||||||
# 制品
|
# 制品
|
||||||
mkdir -p dist
|
mkdir -p dist
|
||||||
CGO_ENABLED=1 CGO_LDFLAGS="-static" GOOS=linux GOARCH=amd64 go build -v -o dist/yao-${VERSION}-linux-amd64
|
CGO_ENABLED=1 CGO_LDFLAGS="-static" GOOS=linux GOARCH=amd64 go build -v -o dist/yao-${VERSION}-linux-amd64
|
||||||
|
CC=arm-linux-gnueabi-gcc CXX=arm-linux-gnueabi-g++ CGO_ENABLED=1 GOOS=linux GOARCH=arm GOARM=7 go build -v -o dist/yao-${VERSION}-linux-arm
|
||||||
|
|
||||||
mkdir -p dist/release
|
mkdir -p dist/release
|
||||||
mv dist/yao-*-* dist/release/
|
mv dist/yao-*-* dist/release/
|
||||||
chmod +x dist/release/yao-*-*
|
chmod +x dist/release/yao-*-*
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue