Skip to content

Build Binaries (no release) #92

Build Binaries (no release)

Build Binaries (no release) #92

Workflow file for this run

name: Build Binaries (no release)
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
on:
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: ${{ github.workspace }}
permissions:
contents: read
strategy:
matrix:
include:
- os: macos-latest
build_script: pnpm run dist:mac
- os: ubuntu-latest
build_script: pnpm run dist:linux
- os: windows-latest
build_script: pnpm run dist:win
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup pnpm
uses: pnpm/action-setup@v6
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: '22'
cache: 'pnpm'
- name: Install Linux build dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y \
libudev-dev \
libnss3 \
libxshmfence-dev \
libx11-xcb1 \
libxcb1 \
libxext6 \
libxfixes3 \
libxrender1 \
libxi6 \
rpm
- name: Validate Windows build runner
if: contains(matrix.build_script, 'dist:win') && matrix.os != 'windows-latest'
run: |
echo "Windows build scripts must run on windows-latest."
exit 1
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Rebuild native dependencies
run: pnpm run rebuild
- name: Build
run: ${{ matrix.build_script }}
- name: Smoke test x64 NSIS install
if: matrix.os == 'windows-latest'
run: node scripts/test-win-nsis-install.mjs --arch x64
- name: Upload Windows install failure logs
if: failure() && matrix.os == 'windows-latest'
uses: actions/upload-artifact@v7
with:
name: mesh-client-win-x64-install-logs-${{ github.sha }}
path: |
${{ runner.temp }}/mesh-client-install-x64.log
if-no-files-found: ignore
retention-days: 7
- name: Upload macOS Artifact
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v7
with:
name: mesh-client-macos-${{ github.sha }}
path: |
release/mac/**/*.dmg
release/mac/**/*.zip
release/mac-arm64/**/*.dmg
release/mac-arm64/**/*.zip
release/mac-universal/**/*.dmg
release/mac-universal/**/*.zip
release/*.dmg
release/*.zip
retention-days: 30
- name: Upload Linux Artifact
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v7
with:
name: mesh-client-linux-${{ github.sha }}
path: |
release/*.AppImage
release/*.deb
release/*.rpm
retention-days: 30
- name: Upload Windows Artifact
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v7
with:
name: mesh-client-windows-${{ github.sha }}
path: |
# Per-arch NSIS installers: Mesh-client Setup {version}.exe + {version}-arm64.exe
release/*.exe
retention-days: 30
win-arm64-install:
name: Smoke test arm64 NSIS install (WoA)
needs: build
runs-on: windows-11-arm
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Download Windows build artifact
uses: actions/download-artifact@v7
with:
name: mesh-client-windows-${{ github.sha }}
path: release
- name: Smoke test arm64 NSIS install (7z probe + install)
run: node scripts/test-win-nsis-install.mjs --arch arm64 --probe-7z
- name: Upload arm64 install failure logs
if: failure()
uses: actions/upload-artifact@v7
with:
name: mesh-client-win-arm64-install-logs-${{ github.sha }}
path: |
${{ runner.temp }}/mesh-client-install-arm64.log
${{ runner.temp }}/mesh-client-7z-probe/**
if-no-files-found: ignore
retention-days: 7