CD 调试
This commit is contained in:
parent
7b2a2d39c6
commit
37bbf1ff60
3 changed files with 24 additions and 20 deletions
21
.github/workflows/release.yml
vendored
21
.github/workflows/release.yml
vendored
|
|
@ -12,16 +12,17 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
go: [1.17]
|
go: [1.17]
|
||||||
platform: [ubuntu-latest, macos-11]
|
platform: [ubuntu-latest, macos-11]
|
||||||
|
arch: [x86_64, arm64]
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
steps:
|
steps:
|
||||||
- name: Arm Build
|
# - name: Arm Build
|
||||||
if: matrix.platform == 'ubuntu-latest'
|
# if: matrix.platform == 'ubuntu-latest' && matrix.arch == 'x86_64'
|
||||||
run: |
|
# run: |
|
||||||
sudo apt-get update
|
# 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 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-gnueabi g++-arm-linux-gnueabi
|
||||||
sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
|
# 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
|
# sudo apt-get install -y g++-aarch64-linux-gnu crossbuild-essential-arm64
|
||||||
|
|
||||||
- name: Setup Cache
|
- name: Setup Cache
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
|
|
@ -95,11 +96,11 @@ jobs:
|
||||||
- name: Make Artifacts Linux
|
- name: Make Artifacts Linux
|
||||||
if: matrix.platform == 'ubuntu-latest'
|
if: matrix.platform == 'ubuntu-latest'
|
||||||
run: |
|
run: |
|
||||||
make artifacts
|
make artifact-linux
|
||||||
- name: Make Artifacts MacOS
|
- name: Make Artifacts MacOS
|
||||||
if: matrix.platform == 'macos-11'
|
if: matrix.platform == 'macos-11'
|
||||||
run: |
|
run: |
|
||||||
make artifacts-macos
|
make artifact-macos
|
||||||
|
|
||||||
- name: Push to Station (@Silicon Valley)
|
- name: Push to Station (@Silicon Valley)
|
||||||
uses: nogsantos/scp-deploy@master
|
uses: nogsantos/scp-deploy@master
|
||||||
|
|
|
||||||
21
Makefile
21
Makefile
|
|
@ -248,8 +248,8 @@ linux: clean
|
||||||
mv .tmp/xiang-*-* dist/release/
|
mv .tmp/xiang-*-* dist/release/
|
||||||
chmod +x dist/release/xiang-*-*
|
chmod +x dist/release/xiang-*-*
|
||||||
|
|
||||||
.PHONY: artifacts
|
.PHONY: artifact-linux
|
||||||
artifacts: clean
|
artifact-linux: clean
|
||||||
mkdir -p dist/release
|
mkdir -p dist/release
|
||||||
|
|
||||||
# UI制品
|
# UI制品
|
||||||
|
|
@ -266,17 +266,18 @@ 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" go build -v -o dist/yao-${VERSION}-linux-${RUNNER_ARCH}
|
||||||
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
|
mkdir -p dist/release
|
||||||
mv dist/yao-*-* dist/release/
|
mv dist/yao-*-* dist/release/
|
||||||
chmod +x dist/release/yao-*-*
|
chmod +x dist/release/yao-*-*
|
||||||
ls -l dist/release/
|
ls -l dist/release/
|
||||||
dist/release/yao-${VERSION}-linux-amd64 version
|
dist/release/yao-${VERSION}-linux-${RUNNER_ARCH} version
|
||||||
|
|
||||||
.PHONY: artifacts-macos
|
.PHONY: artifact-macos
|
||||||
artifacts-macos: clean
|
artifact-macos: clean
|
||||||
mkdir -p dist/release
|
mkdir -p dist/release
|
||||||
|
|
||||||
# UI制品
|
# UI制品
|
||||||
|
|
@ -293,13 +294,15 @@ artifacts-macos: clean
|
||||||
|
|
||||||
# 制品
|
# 制品
|
||||||
mkdir -p dist
|
mkdir -p dist
|
||||||
CGO_ENABLED=1 CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build -v -o dist/yao-${VERSION}-darwin-amd64
|
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
|
||||||
|
|
||||||
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-*-*
|
||||||
ls -l dist/release/
|
ls -l dist/release/
|
||||||
dist/release/yao-${VERSION}-linux-amd64 version
|
dist/release/yao-${VERSION}-darwin-${RUNNER_ARCH} version
|
||||||
|
|
||||||
.PHONY: win32
|
.PHONY: win32
|
||||||
win32: bindata
|
win32: bindata
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ package share
|
||||||
// session -> freeport fix bug
|
// session -> freeport fix bug
|
||||||
// 更新制品目录 -> ui/downloads
|
// 更新制品目录 -> ui/downloads
|
||||||
// Arm64 制品 -> arm build test
|
// Arm64 制品 -> arm build test
|
||||||
// MacOS 制品 -> debug 2
|
// MacOS 制品 -> debug 4
|
||||||
|
|
||||||
// VERSION 版本号
|
// VERSION 版本号
|
||||||
const VERSION = "0.9.1"
|
const VERSION = "0.9.1"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue