Updates
This commit is contained in:
@@ -38,7 +38,14 @@ jobs:
|
||||
npm install --no-audit --no-fund --loglevel=info
|
||||
|
||||
- name: Test
|
||||
env:
|
||||
SKIP_INTEGRATION: '1'
|
||||
run: npm test
|
||||
|
||||
- name: Healthcheck script loads
|
||||
run: node scripts/healthcheck.js
|
||||
- name: Syntax check packaging entrypoints
|
||||
run: |
|
||||
node --check bin/peardata-server.mjs
|
||||
node --check scripts/make.cjs
|
||||
node --check scripts/bare-standalone.cjs
|
||||
node --check forge.config.cjs
|
||||
node --check electron/main.cjs
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
# Rolling release for Gitea (mirrors peardock-style forge pipelines).
|
||||
# Runs on every push to main/master — always rebuilds and republishes the `rolling` tag.
|
||||
# peardata rolling release — Linux Bare servers + Electron clients (all 64-bit hosts).
|
||||
#
|
||||
# Secrets:
|
||||
# RELEASE_TOKEN — Gitea PAT with repo release write (required)
|
||||
# GITEA_URL — optional forge base URL (defaults to origin / GITHUB_SERVER_URL)
|
||||
# GITEA_URL — optional forge base URL
|
||||
#
|
||||
# Server hosts: linux-x64, linux-arm64 only
|
||||
# Client hosts: linux-x64, linux-arm64, darwin-x64, darwin-arm64, win32-x64, win32-arm64
|
||||
name: Release rolling
|
||||
|
||||
on:
|
||||
@@ -11,6 +13,18 @@ on:
|
||||
branches: [main, master]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
skip_client:
|
||||
description: 'Skip Electron client builds (server only)'
|
||||
required: false
|
||||
default: 'false'
|
||||
server_hosts:
|
||||
description: 'Comma-separated Linux server hosts'
|
||||
required: false
|
||||
default: 'linux-x64,linux-arm64'
|
||||
client_hosts:
|
||||
description: 'Comma-separated 64-bit client hosts'
|
||||
required: false
|
||||
default: 'linux-x64,linux-arm64,darwin-x64,darwin-arm64,win32-x64,win32-arm64'
|
||||
dry_run:
|
||||
description: 'Build artifacts without uploading'
|
||||
required: false
|
||||
@@ -26,29 +40,89 @@ env:
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 45
|
||||
timeout-minutes: 180
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Use Node.js 22
|
||||
uses: actions/setup-node@v4
|
||||
timeout-minutes: 5
|
||||
with:
|
||||
node-version: '22'
|
||||
|
||||
- name: Install + test
|
||||
- name: Install system deps (electron + cross packaging)
|
||||
timeout-minutes: 8
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
run: |
|
||||
set -euo pipefail
|
||||
APT_OPTS=(
|
||||
-o Acquire::ForceIPv4=true
|
||||
-o Acquire::Retries=3
|
||||
-o Acquire::http::Timeout=30
|
||||
-o Acquire::https::Timeout=30
|
||||
)
|
||||
if [ -f /etc/apt/sources.list.d/microsoft-prod.list ]; then
|
||||
sudo mv /etc/apt/sources.list.d/microsoft-prod.list /etc/apt/sources.list.d/microsoft-prod.list.bak || true
|
||||
fi
|
||||
sudo apt-get update -qq "${APT_OPTS[@]}" || true
|
||||
sudo apt-get install -y -qq "${APT_OPTS[@]}" \
|
||||
libnss3 \
|
||||
libatk-bridge2.0-0 \
|
||||
libgtk-3-0 \
|
||||
libgbm1 \
|
||||
libasound2t64 \
|
||||
zip \
|
||||
unzip \
|
||||
ca-certificates
|
||||
|
||||
- name: Install dependencies
|
||||
timeout-minutes: 15
|
||||
env:
|
||||
NODE_OPTIONS: '--dns-result-order=ipv4first'
|
||||
GIT_TERMINAL_PROMPT: '0'
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD: '1'
|
||||
npm_config_fetch_retries: '3'
|
||||
npm_config_fetch_timeout: '120000'
|
||||
npm_config_fund: 'false'
|
||||
npm_config_audit: 'false'
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git config --global url."https://github.com/".insteadOf "ssh://[email protected]/"
|
||||
git config --global url."https://github.com/".insteadOf "[email protected]:"
|
||||
npm install --no-audit --no-fund
|
||||
SKIP_INTEGRATION=1 npm test
|
||||
echo "==> npm ci (ignore lifecycle scripts — avoid electron hangs)"
|
||||
npm ci --ignore-scripts --no-audit --no-fund --loglevel=info
|
||||
echo "==> esbuild binary"
|
||||
node node_modules/esbuild/install.js
|
||||
node -e "console.log('node', process.version); console.log('esbuild', require('esbuild').version)"
|
||||
|
||||
- name: Build + publish rolling release
|
||||
- name: Unit tests
|
||||
timeout-minutes: 10
|
||||
env:
|
||||
SKIP_INTEGRATION: '1'
|
||||
run: npm test
|
||||
|
||||
- name: Install rcodesign (macOS codesign on Linux)
|
||||
timeout-minutes: 2
|
||||
run: |
|
||||
set -euo pipefail
|
||||
ARCH="$(uname -m)"
|
||||
case "$ARCH" in
|
||||
x86_64|amd64) HOST=linux-x64 ;;
|
||||
aarch64|arm64) HOST=linux-arm64 ;;
|
||||
*) echo "unsupported arch $ARCH for rcodesign"; exit 1 ;;
|
||||
esac
|
||||
SRC="tools/rcodesign/${HOST}/rcodesign"
|
||||
if [ ! -f "$SRC" ]; then
|
||||
echo "ERROR: vendored rcodesign missing at $SRC"
|
||||
echo "See tools/rcodesign/README.md"
|
||||
exit 1
|
||||
fi
|
||||
sudo install -m 0755 "$SRC" /usr/local/bin/rcodesign
|
||||
echo "Installed from $SRC ($(cat "tools/rcodesign/${HOST}/VERSION" 2>/dev/null || echo unknown))"
|
||||
rcodesign --version
|
||||
|
||||
- name: Build all hosts + publish rolling release
|
||||
env:
|
||||
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
GITEA_URL: ${{ secrets.GITEA_URL }}
|
||||
@@ -56,8 +130,20 @@ jobs:
|
||||
GITHUB_SERVER_URL: ${{ github.server_url }}
|
||||
GITHUB_SHA: ${{ github.sha }}
|
||||
GITEA_SHA: ${{ github.sha }}
|
||||
RELEASE_TAG: rolling
|
||||
NODE_OPTIONS: '--dns-result-order=ipv4first'
|
||||
PEARDATA_SERVER_HOSTS: ${{ github.event.inputs.server_hosts || 'linux-x64,linux-arm64' }}
|
||||
PEARDATA_CLIENT_HOSTS: ${{ github.event.inputs.client_hosts || 'linux-x64,linux-arm64,darwin-x64,darwin-arm64,win32-x64,win32-arm64' }}
|
||||
PEARDATA_SKIP_CLIENT: ${{ github.event.inputs.skip_client == 'true' && '1' || '0' }}
|
||||
DRY_RUN: ${{ github.event.inputs.dry_run == 'true' && '1' || '0' }}
|
||||
RELEASE_TAG: rolling
|
||||
npm_config_build_from_source: 'false'
|
||||
PEARDATA_SKIP_REBUILD: '1'
|
||||
ELECTRON_CACHE: ${{ github.workspace }}/.cache/electron
|
||||
electron_config_cache: ${{ github.workspace }}/.cache/electron
|
||||
PEARDATA_ELECTRON_DOWNLOAD_TIMEOUT_MS: '180000'
|
||||
PEARDATA_CLIENT_TIMEOUT_MS: '480000'
|
||||
ELECTRON_GET_USE_PROXY: '0'
|
||||
CI: 'true'
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [ "${DRY_RUN:-0}" != "1" ] && [ -z "${RELEASE_TOKEN:-}" ]; then
|
||||
@@ -71,5 +157,9 @@ jobs:
|
||||
if [ -z "${GITEA_URL:-}" ]; then
|
||||
export GITEA_URL="${GITHUB_SERVER_URL:-}"
|
||||
fi
|
||||
chmod +x scripts/gitea-rolling-release.sh scripts/release.sh
|
||||
mkdir -p "${ELECTRON_CACHE:-$GITHUB_WORKSPACE/.cache/electron}"
|
||||
mkdir -p "$GITHUB_WORKSPACE/.cache/electron-zips"
|
||||
echo "Server hosts (Linux only): $PEARDATA_SERVER_HOSTS"
|
||||
echo "Client hosts: $PEARDATA_CLIENT_HOSTS"
|
||||
chmod +x scripts/gitea-rolling-release.sh scripts/bare-standalone.cjs scripts/make.cjs scripts/predownload-electron.cjs
|
||||
bash scripts/gitea-rolling-release.sh
|
||||
|
||||
Reference in New Issue
Block a user