mirror of
https://github.com/netbirdio/netbird.git
synced 2026-05-20 15:49:55 +00:00
Wails v3 alpha.94 switched its default Linux backend from GTK3 + WebKit2GTK 4.1 to GTK4 + WebKitGTK 6.0 (the GTK3 path is now gated behind a `gtk3` build tag). cgo files that the binary, the tests, and the lint job all parse now request `pkg-config --cflags gtk4 webkitgtk-6.0 ...`, so the existing libgtk-3-dev + libwebkit2gtk-4.1 apt deps no longer satisfy them — lint, unit tests, and the linux release build all fail with `Package 'gtk4' ... not found`. Replace the apt deps across the four workflows that build/lint the client tree (golangci-lint, golang-test-linux, release, and the wasm lint job that also walks client/) with libgtk-4-dev + libwebkitgtk-6.0-dev + libsoup-3.0-dev. Both packages are available from jammy (22.04 LTS) onwards, so existing ubuntu-22.04 runners stay valid.
69 lines
1.8 KiB
YAML
69 lines
1.8 KiB
YAML
name: Wasm
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.actor_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
js_lint:
|
|
name: "JS / Lint"
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
GOOS: js
|
|
GOARCH: wasm
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
- name: Install Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: "go.mod"
|
|
- name: Install dependencies
|
|
run: sudo apt update && sudo apt install -y -q libgtk-4-dev libwebkitgtk-6.0-dev libsoup-3.0-dev libayatana-appindicator3-dev libgl1-mesa-dev xorg-dev libpcap-dev
|
|
- name: Install golangci-lint
|
|
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
|
|
with:
|
|
version: latest
|
|
install-mode: binary
|
|
skip-cache: true
|
|
skip-save-cache: true
|
|
cache-invalidation-interval: 0
|
|
working-directory: ./client
|
|
continue-on-error: true
|
|
|
|
js_build:
|
|
name: "JS / Build"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
- name: Install Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: "go.mod"
|
|
- name: Build Wasm client
|
|
run: GOOS=js GOARCH=wasm go build -o netbird.wasm ./client/wasm/cmd
|
|
env:
|
|
CGO_ENABLED: 0
|
|
- name: Check Wasm build size
|
|
run: |
|
|
echo "Wasm build size:"
|
|
ls -lh netbird.wasm
|
|
|
|
SIZE=$(stat -c%s netbird.wasm)
|
|
SIZE_MB=$((SIZE / 1024 / 1024))
|
|
|
|
echo "Size: ${SIZE} bytes (${SIZE_MB} MB)"
|
|
|
|
if [ ${SIZE} -gt 58720256 ]; then
|
|
echo "Wasm binary size (${SIZE_MB}MB) exceeds 56MB limit!"
|
|
exit 1
|
|
fi
|
|
|