# Native build verification (Windows + macOS). # # Pulls the prebuilt meshchatx/public artifact produced by the reusable # Frontend build workflow so that each platform job only has to compile the # cx_Freeze backend and run electron-builder. # # Pinned first-party actions (bump tag and SHA together when upgrading): # actions/checkout@v6.0.1 8e8c483db84b4bee98b60c0593521ed34d9990e8 # actions/setup-python@v6.2.0 a309ff8b426b58ec0e2a45f0f869d46889d02405 # actions/setup-node@v6.1.0 395ad3262231945c25e8478fd5baf05154b1d79f # actions/download-artifact@v5.0.0 634f93cb2916e3fdff6788551b99b062d0335ce0 name: Build on: push: branches: - dev pull_request: branches: - dev workflow_dispatch: permissions: contents: read concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true env: FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true NODE_OPTIONS: --max-old-space-size=8192 PYTHON_VERSION: "3.14" NODE_VERSION: "24" UV_VERSION: "0.11.12" PNPM_VERSION: "10.32.1" jobs: frontend: name: Build frontend artifact uses: ./.github/workflows/frontend-build.yml permissions: contents: read with: artifact_name: meshchatx-frontend-build-${{ github.run_id }}-${{ github.run_attempt }} retention_days: 1 build-test: name: Build test (${{ matrix.label }}) needs: frontend permissions: contents: read strategy: fail-fast: false matrix: include: - os: windows-latest label: windows timeout: 120 build_script: scripts/ci/github-build-windows.sh - os: macos-latest label: macos timeout: 180 build_script: scripts/ci/github-build-macos.sh runs-on: ${{ matrix.os }} timeout-minutes: ${{ matrix.timeout }} defaults: run: shell: bash env: FRONTEND_ARTIFACT_NAME: ${{ needs.frontend.outputs.artifact_name }} MESHCHATX_FRONTEND_PREBUILT: "1" steps: - name: Checkout uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 - name: Set up Python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 with: python-version: ${{ env.PYTHON_VERSION }} - name: Install UV (PyPI pin) env: UV_VERSION: ${{ env.UV_VERSION }} run: bash scripts/ci/github-install-uv.sh - name: Enable pnpm (corepack) run: corepack enable && corepack prepare "pnpm@${PNPM_VERSION}" --activate - name: Set up Node uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f with: node-version: ${{ env.NODE_VERSION }} cache: pnpm cache-dependency-path: pnpm-lock.yaml - name: Install dependencies run: bash scripts/ci/github-install-deps.sh - name: Install Rosetta (Apple Silicon) if: matrix.label == 'macos' run: /usr/sbin/softwareupdate --install-rosetta --agree-to-license || true - name: Ensure x86_64 Homebrew (/usr/local) for universal slice if: matrix.label == 'macos' run: bash scripts/ci/github-ensure-macos-x86-64-homebrew.sh - name: Set up Python x64 for cx_Freeze universal slice id: python_x64 if: matrix.label == 'macos' uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 with: python-version: ${{ env.PYTHON_VERSION }} architecture: x64 update-environment: false - name: Export PYTHON_CMD_X64 for mac universal build if: matrix.label == 'macos' run: echo "PYTHON_CMD_X64=${{ steps.python_x64.outputs.python-path }}" >> "$GITHUB_ENV" - name: Install x86_64 codec2 for pycodec2 (universal slice) if: matrix.label == 'macos' run: | set -euo pipefail arch -x86_64 /usr/local/bin/brew install codec2 - name: Install project deps into x64 Python (mac universal cx_Freeze) if: matrix.label == 'macos' env: PY_X64: ${{ steps.python_x64.outputs.python-path }} ARCHFLAGS: "-arch x86_64" CC: "clang -arch x86_64" CXX: "clang++ -arch x86_64" CFLAGS: "-arch x86_64" run: | set -euo pipefail _codec2="$(arch -x86_64 /usr/local/bin/brew --prefix codec2)" export LDFLAGS="-L${_codec2}/lib -arch x86_64" export CPPFLAGS="-I${_codec2}/include" export PKG_CONFIG_PATH="${_codec2}/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig" arch -x86_64 "$PY_X64" -m pip install -U pip setuptools wheel arch -x86_64 "$PY_X64" -m pip install "cx-freeze>=7.0.0" arch -x86_64 "$PY_X64" -m pip install -e . arch -x86_64 "$PY_X64" scripts/patch_lxst_pyogg_ogg_ctypes.py - name: Download frontend artifact uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 with: name: ${{ env.FRONTEND_ARTIFACT_NAME }} path: meshchatx/public - name: Verify frontend artifact contents run: | set -euo pipefail test -f meshchatx/public/index.html test -d meshchatx/public/assets test -d meshchatx/public/reticulum-docs-bundled/current - name: Build distributables run: bash "${{ matrix.build_script }}"