+ 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:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "share/const.go"
|
||||
# paths:
|
||||
# - "share/const.go"
|
||||
|
||||
jobs:
|
||||
release:
|
||||
|
|
@ -13,6 +13,13 @@ jobs:
|
|||
matrix:
|
||||
go: [1.17]
|
||||
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
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
|
|
|
|||
2
Makefile
2
Makefile
|
|
@ -267,6 +267,8 @@ artifacts: clean
|
|||
# 制品
|
||||
mkdir -p dist
|
||||
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
|
||||
mv dist/yao-*-* dist/release/
|
||||
chmod +x dist/release/yao-*-*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue