Repository navigation
Plan Kamera-Abgleich: Ringpuffer #236
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| # Checks for every pull request and every push to main: types, unit tests, build, and | |
| # the end-to-end tests (Electron via Playwright, e2e/). The repo is public, Actions | |
| # minutes are free. Publishing stays in pages.yml. | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| env: | |
| LZS_FFMPEG_REQUIRED: '1' | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: '24' | |
| cache: 'npm' | |
| - run: npm ci | |
| # the own build the Linux app ships (scripts/ffmpeg-builds.json, linux-x64) | |
| - run: node scripts/ffmpeg-fetch.mjs linux-x64 | |
| - run: npx tsc --noEmit | |
| - run: npx tsc -p e2e --noEmit | |
| - run: npm run lang:check -- --strict | |
| - run: npm test | |
| - run: npm run build | |
| # the NDI helper builds without any SDK (helpers/ndi/ndi-min.h); run it once without runtime | |
| - run: node scripts/build-helpers.mjs ndi && helpers/bin/lz-ndi --list && helpers/bin/lz-ndi --selftest | |
| e2e: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| env: | |
| MEDIAMTX_VERSION: v1.21.1 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: '24' | |
| cache: 'npm' | |
| - run: npm ci | |
| # the bridge takes vendor/ffmpeg before the system one (SRT spec, 10-bit spec) | |
| - run: node scripts/ffmpeg-fetch.mjs linux-x64 | |
| - name: ffmpeg, Xvfb, mediamtx | |
| run: | | |
| sudo apt-get update -q | |
| sudo apt-get install -y -q ffmpeg xvfb | |
| curl -fsSL "https://github.com/bluenviron/mediamtx/releases/download/${MEDIAMTX_VERSION}/mediamtx_${MEDIAMTX_VERSION}_linux_amd64.tar.gz" | sudo tar -xz -C /usr/local/bin mediamtx | |
| mediamtx --version | |
| # headless Chromium for the viewport checks (e2e/responsive.spec.ts) | |
| - run: npx playwright install --with-deps chromium | |
| # the camera bridge built into the desktop app (scripts/build-camera-bridge.mjs); same tag as scripts/camera-bridge.json | |
| - uses: actions/checkout@v5 | |
| with: | |
| repository: larszu/lz-camera-bridge | |
| ref: v2.2.0 | |
| path: vendor/lz-camera-bridge | |
| sparse-checkout: packages/bridge | |
| # Electron downloads its binary on first use; WebGL runs in SwiftShader (slow, see e2e/playwright.config.ts) | |
| - run: xvfb-run -a npm run test:e2e | |
| # The ffmpeg builds the installers ship, run on their own OS: licence (no nonfree), SRT, | |
| # v210/HEVC 10 over TCP and SRT (test/ffmpeg.test.ts, test/out10.test.ts). | |
| ffmpeg-desktop: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: macos-latest | |
| ffmpeg: darwin-universal | |
| - os: windows-latest | |
| ffmpeg: win32-x64 | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| LZS_FFMPEG_REQUIRED: '1' | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: '24' | |
| cache: 'npm' | |
| - run: npm ci | |
| - run: node scripts/ffmpeg-fetch.mjs ${{ matrix.ffmpeg }} | |
| - run: npx vitest run test/ffmpeg.test.ts test/out10.test.ts | |
| # the helpers the installers ship (DeckLink, NDI), compiled as release.yml does: a | |
| # Windows-only compile error otherwise shows up only at release time | |
| - name: DeckLink SDK include files | |
| run: node scripts/decklink-sdk-fetch.mjs | |
| - name: MSVC (Windows helpers) | |
| if: runner.os == 'Windows' | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Helpers (DeckLink, NDI) build and start without driver | |
| shell: bash | |
| run: | | |
| set -eu | |
| node scripts/build-helpers.mjs decklink ndi | |
| exe=""; if [ "$RUNNER_OS" = Windows ]; then exe=.exe; fi | |
| for h in lz-decklink lz-ndi; do "helpers/bin/$h$exe" --list || true; done | |
| "helpers/bin/lz-ndi$exe" --selftest | |
| # The Linux app as release.yml packages it (AppImage + deb, x64), started under Xvfb: bridge | |
| # up with the SHIPPED ffmpeg, UI served (scripts/linux-smoke.sh). The deb is installed with apt | |
| # (AppArmor profile, /opt) and started like a user would. | |
| linux-app: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: '24' | |
| cache: 'npm' | |
| - run: npm ci | |
| - run: sudo apt-get update -q && sudo apt-get install -y -q xvfb | |
| - run: node scripts/ffmpeg-fetch.mjs linux-x64 | |
| - run: npm run build | |
| - run: node scripts/decklink-sdk-fetch.mjs | |
| - name: Helpers (DeckLink, NDI) build and start without driver | |
| run: | | |
| node scripts/build-helpers.mjs decklink ndi | |
| for h in lz-decklink lz-ndi; do "helpers/bin/$h" --list || true; done | |
| helpers/bin/lz-ndi --selftest | |
| # the camera bridge built into the desktop app (scripts/build-camera-bridge.mjs); same tag as scripts/camera-bridge.json | |
| - uses: actions/checkout@v5 | |
| with: | |
| repository: larszu/lz-camera-bridge | |
| ref: v2.2.0 | |
| path: vendor/lz-camera-bridge | |
| sparse-checkout: packages/bridge | |
| - run: node scripts/build-camera-bridge.mjs --required | |
| - name: Package (AppImage, deb) | |
| run: node node_modules/electron-builder/cli.js --config electron-builder.js --linux --publish never | |
| - name: Package contents | |
| run: | | |
| set -eu | |
| ls -lh release/ | |
| res=release/linux-unpacked/resources | |
| test -x "$res/ffmpeg/ffmpeg"; test -x "$res/ffmpeg/ffprobe"; ls "$res/ffmpeg/licenses" | |
| # built-in camera bridge: bundle in the archive, serialport's native module unpacked | |
| node -e "const a=require('@electron/asar');const l=a.listPackage('$res/app.asar');if(!l.some(f=>f.endsWith('electron/camera-bridge.cjs')))throw new Error('camera-bridge.cjs missing')" | |
| ls "$res"/app.asar.unpacked/node_modules/@serialport/bindings-cpp/prebuilds/linux-x64/*.node | |
| test -x "$res/app.asar.unpacked/helpers/bin/lz-decklink"; test -x "$res/app.asar.unpacked/helpers/bin/lz-ndi" | |
| test -f release/latest-linux.yml && cat release/latest-linux.yml | |
| ls release/*.AppImage release/*.deb | |
| dpkg-deb --info release/*.deb | |
| grep -E '^(Categories|Name|Exec)=' release/linux-unpacked/*.desktop 2>/dev/null || dpkg-deb --fsys-tarfile release/*.deb | tar -xO --wildcards '*.desktop' | |
| # packaging trap: the packaged package.json must not say "type": "module" | |
| node -e "const p=JSON.parse(require('@electron/asar').extractFile('release/linux-unpacked/resources/app.asar','package.json'));console.log(p.type,p.main);if(p.type!=='commonjs')process.exit(1)" | |
| - name: Smoke start AppImage | |
| run: | | |
| chmod +x release/*.AppImage | |
| bash scripts/linux-smoke.sh "$(ls release/*.AppImage)" --appimage-extract-and-run --no-sandbox | |
| - name: Smoke start deb (installed, with the sandbox) | |
| run: | | |
| sudo apt-get install -y -q "./$(ls release/*.deb)" | |
| bash scripts/linux-smoke.sh lz-scopes |