mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-21 16:38:23 +01:00
blah
This commit is contained in:
parent
25788bc30b
commit
14b1ee0f75
55
.github/workflows/build-helper.yml
vendored
55
.github/workflows/build-helper.yml
vendored
@ -67,10 +67,63 @@ jobs:
|
|||||||
name: waveterm-build-${{ matrix.platform }}
|
name: waveterm-build-${{ matrix.platform }}
|
||||||
path: out/make/*
|
path: out/make/*
|
||||||
retention-days: 2
|
retention-days: 2
|
||||||
|
runbuild-linux-arm:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: scripthaus-dev/scripthaus
|
||||||
|
path: scripthaus
|
||||||
|
- name: Install Linux Build Dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install rpm flatpak flatpak-builder snapcraft
|
||||||
|
- uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: ${{env.GO_VERSION}}
|
||||||
|
cache-dependency-path: |
|
||||||
|
wavesrv/go.sum
|
||||||
|
waveshell/go.sum
|
||||||
|
scripthaus/go.sum
|
||||||
|
- name: Install Scripthaus
|
||||||
|
run: |
|
||||||
|
go work use ./scripthaus;
|
||||||
|
cd scripthaus;
|
||||||
|
go get ./...;
|
||||||
|
CGO_ENABLED=1 go build -o scripthaus cmd/main.go
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: ${{env.NODE_VERSION}}
|
||||||
|
cache: "yarn"
|
||||||
|
- name: Set Version
|
||||||
|
id: set-version
|
||||||
|
run: |
|
||||||
|
VERSION=$(node -e 'console.log(require("./version.js"))')
|
||||||
|
echo "WAVETERM_VERSION=${VERSION}" >> "$GITHUB_OUTPUT"
|
||||||
|
- name: Install Yarn Dependencies
|
||||||
|
run: yarn --frozen-lockfile
|
||||||
|
- name: Build linux/arm64
|
||||||
|
uses: pguyot/arm-runner-action@v2
|
||||||
|
with:
|
||||||
|
image_additional_mb: 2000
|
||||||
|
base_image: dietpi:rpi_armv8_bullseye
|
||||||
|
bind_mount_repository: true
|
||||||
|
commands: |
|
||||||
|
sudo apt-get update && sudo apt-get install -y snapd git
|
||||||
|
sudo snap install --classic go
|
||||||
|
git clone
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: waveterm-build-linux-arm
|
||||||
|
path: out/make/*
|
||||||
|
retention-days: 2
|
||||||
|
|
||||||
upload:
|
upload:
|
||||||
name: "Upload Builds"
|
name: "Upload Builds"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [runbuild]
|
needs: [runbuild, runbuild-linux-arm]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
24
buildres/build-linux-arm.sh
Normal file
24
buildres/build-linux-arm.sh
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
sudo apt-get update && sudo apt-get install -y snapd git
|
||||||
|
sudo snap install --classic go && sudo snap install --classic yarn
|
||||||
|
|
||||||
|
rm -rf dist/
|
||||||
|
rm -rf bin/
|
||||||
|
rm -rf build/
|
||||||
|
node_modules/.bin/webpack --env prod
|
||||||
|
WAVESRV_VERSION=$(node -e 'console.log(require("./version.js"))')
|
||||||
|
WAVESHELL_VERSION=v0.4
|
||||||
|
GO_LDFLAGS="-s -w -X main.BuildTime=$(date +'%Y%m%d%H%M')"
|
||||||
|
function buildWaveShell {
|
||||||
|
(cd waveshell; CGO_ENABLED=0 GOOS=$1 GOARCH=$2 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-$WAVESHELL_VERSION-$1.$2 main-waveshell.go)
|
||||||
|
}
|
||||||
|
function buildWaveSrv {
|
||||||
|
# adds -extldflags=-static, *only* on linux (macos does not support fully static binaries) to avoid a glibc dependency
|
||||||
|
(cd wavesrv; CGO_ENABLED=1 GOARCH=$1 go build -tags "osusergo,netgo,sqlite_omit_load_extension" -ldflags "-linkmode 'external' -extldflags=-static $GO_LDFLAGS -X main.WaveVersion=$WAVESRV_VERSION" -o ../bin/wavesrv.$1 ./cmd)
|
||||||
|
}
|
||||||
|
buildWaveShell darwin amd64
|
||||||
|
buildWaveShell darwin arm64
|
||||||
|
buildWaveShell linux amd64
|
||||||
|
buildWaveShell linux arm64
|
||||||
|
buildWaveSrv $GOARCH
|
||||||
|
yarn run electron-builder -c electron-builder.config.js -l
|
||||||
|
|
Loading…
Reference in New Issue
Block a user