CD 调试

This commit is contained in:
Max 2022-02-12 21:27:52 +08:00
parent 37bbf1ff60
commit 44164c0d8a
3 changed files with 21 additions and 24 deletions

View file

@ -12,17 +12,16 @@ jobs:
matrix:
go: [1.17]
platform: [ubuntu-latest, macos-11]
arch: [x86_64, arm64]
runs-on: ${{ matrix.platform }}
steps:
# - name: Arm Build
# if: matrix.platform == 'ubuntu-latest' && matrix.arch == 'x86_64'
# run: |
# sudo apt-get update
# sudo apt-get install -y libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi libncurses5-dev build-essential bison flex libssl-dev bc
# sudo apt-get install -y gcc-arm-linux-gnueabi g++-arm-linux-gnueabi
# sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
# sudo apt-get install -y g++-aarch64-linux-gnu crossbuild-essential-arm64
- name: Arm Build
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi libncurses5-dev build-essential bison flex libssl-dev bc
sudo apt-get install -y gcc-arm-linux-gnueabi g++-arm-linux-gnueabi
sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
sudo apt-get install -y g++-aarch64-linux-gnu crossbuild-essential-arm64
- name: Setup Cache
uses: actions/cache@v2
@ -96,11 +95,11 @@ jobs:
- name: Make Artifacts Linux
if: matrix.platform == 'ubuntu-latest'
run: |
make artifact-linux
make artifacts-linux
- name: Make Artifacts MacOS
if: matrix.platform == 'macos-11'
run: |
make artifact-macos
make artifacts-macos
- name: Push to Station (@Silicon Valley)
uses: nogsantos/scp-deploy@master

View file

@ -248,8 +248,8 @@ linux: clean
mv .tmp/xiang-*-* dist/release/
chmod +x dist/release/xiang-*-*
.PHONY: artifact-linux
artifact-linux: clean
.PHONY: artifacts-linux
artifacts-linux: clean
mkdir -p dist/release
# UI制品
@ -266,18 +266,17 @@ artifact-linux: clean
# 制品
mkdir -p dist
CGO_ENABLED=1 CGO_LDFLAGS="-static" go build -v -o dist/yao-${VERSION}-linux-${RUNNER_ARCH}
# 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=arm64 CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ go build -v -o dist/yao-${VERSION}-linux-arm64
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=arm64 CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ go build -v -o dist/yao-${VERSION}-linux-arm64
mkdir -p dist/release
mv dist/yao-*-* dist/release/
chmod +x dist/release/yao-*-*
ls -l dist/release/
dist/release/yao-${VERSION}-linux-${RUNNER_ARCH} version
dist/release/yao-${VERSION}-linux-amd64 version
.PHONY: artifact-macos
artifact-macos: clean
.PHONY: artifacts-macos
artifacts-macos: clean
mkdir -p dist/release
# UI制品
@ -294,15 +293,14 @@ artifact-macos: clean
# 制品
mkdir -p dist
CGO_ENABLED=1 go build -v -o dist/yao-${VERSION}-darwin-${RUNNER_ARCH}
# CGO_ENABLED=1 CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build -v -o dist/yao-${VERSION}-darwin-amd64
# CGO_ENABLED=1 CGO_LDFLAGS="-static" GOOS=darwin GOARCH=arm64 go build -v -o dist/yao-${VERSION}-linux-arm64
CGO_ENABLED=1 CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build -v -o dist/yao-${VERSION}-darwin-amd64
CGO_ENABLED=1 CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 go build -v -o dist/yao-${VERSION}-darwin-arm64
mkdir -p dist/release
mv dist/yao-*-* dist/release/
chmod +x dist/release/yao-*-*
ls -l dist/release/
dist/release/yao-${VERSION}-darwin-${RUNNER_ARCH} version
dist/release/yao-${VERSION}-darwin-arm64 version
.PHONY: win32
win32: bindata

View file

@ -4,7 +4,7 @@ package share
// session -> freeport fix bug
// 更新制品目录 -> ui/downloads
// Arm64 制品 -> arm build test
// MacOS 制品 -> debug 4
// MacOS 制品 -> debug 5
// VERSION 版本号
const VERSION = "0.9.1"