feat: CTRL+SHIFT+D diagnose pane, SSH frame color, SynapseIQ auto-start #4
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: TurtleTerm Native Linux Packages | |
| on: | |
| push: | |
| tags: | |
| - 'turtle-term-v*' | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Package version without prefix, for example 0.1.0-dev' | |
| required: false | |
| default: '0.1.0-dev' | |
| permissions: | |
| contents: write | |
| id-token: write | |
| attestations: write | |
| artifact-metadata: write | |
| jobs: | |
| build-native-linux-packages: | |
| name: Build native Linux packages on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-24.04 | |
| deb_arch: amd64 | |
| rpm_arch: x86_64 | |
| arch_arch: x86_64 | |
| # ubuntu-24.04-arm is beta and unavailable on this plan; omitted for now | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Resolve package version | |
| id: version | |
| shell: bash | |
| env: | |
| INPUT_VERSION: ${{ github.event.inputs.version }} | |
| run: | | |
| if [[ "${GITHUB_REF:-}" == refs/tags/turtle-term-v* ]]; then | |
| version="${GITHUB_REF_NAME#turtle-term-v}" | |
| else | |
| version="${INPUT_VERSION:-0.1.0-dev}" | |
| fi | |
| echo "version=$version" >> "$GITHUB_OUTPUT" | |
| - name: Install Rust toolchain | |
| run: | | |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ | |
| sh -s -- -y --default-toolchain stable --profile minimal | |
| echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" | |
| - name: Install Linux build and package dependencies | |
| run: | | |
| sudo apt-get update -q | |
| CI=yes ./get-deps | |
| sudo apt-get install -y --no-install-recommends \ | |
| cpio desktop-file-utils dpkg-dev rpm zstd | |
| - name: Build TurtleTerm runtime binaries | |
| run: | | |
| cargo build --release --locked -p wezterm | |
| cargo build --release --locked -p wezterm-gui | |
| cargo build --release --locked -p wezterm-mux-server | |
| - name: Run TurtleTerm smoke tests | |
| run: | | |
| python3 assets/sourceos/tests/test_sourceos_term_smoke.py | |
| python3 assets/sourceos/tests/test_turtle_product_identity.py | |
| python3 assets/sourceos/tests/test_turtle_linux_desktop_identity.py | |
| - name: Build Debian package | |
| env: | |
| TURTLE_TERM_VERSION: ${{ steps.version.outputs.version }} | |
| TURTLE_TERM_DEB_ARCH: ${{ matrix.deb_arch }} | |
| TURTLE_TERM_OUT_DIR: ${{ github.workspace }}/dist/native | |
| run: bash packaging/scripts/build-deb-package.sh | |
| - name: Build RPM package | |
| env: | |
| TURTLE_TERM_VERSION: ${{ steps.version.outputs.version }} | |
| TURTLE_TERM_RPM_ARCH: ${{ matrix.rpm_arch }} | |
| TURTLE_TERM_OUT_DIR: ${{ github.workspace }}/dist/native | |
| run: bash packaging/scripts/build-rpm-package.sh | |
| - name: Build Arch package | |
| env: | |
| TURTLE_TERM_VERSION: ${{ steps.version.outputs.version }} | |
| TURTLE_TERM_ARCH_ARCH: ${{ matrix.arch_arch }} | |
| TURTLE_TERM_OUT_DIR: ${{ github.workspace }}/dist/native | |
| run: bash packaging/scripts/build-arch-package.sh | |
| - name: Verify package artifacts exist | |
| run: | | |
| ls -lah dist/native | |
| test -n "$(find dist/native -name 'turtle-term_*.deb' -print -quit)" | |
| test -n "$(find dist/native -name 'turtle-term_*.deb.sha256' -print -quit)" | |
| test -n "$(find dist/native -name 'turtle-term_*.deb.manifest.json' -print -quit)" | |
| test -n "$(find dist/native -name 'turtle-term-*.rpm' -print -quit)" | |
| test -n "$(find dist/native -name 'turtle-term-*.rpm.sha256' -print -quit)" | |
| test -n "$(find dist/native -name 'turtle-term-*.rpm.manifest.json' -print -quit)" | |
| test -n "$(find dist/native -name 'turtle-term-*.pkg.tar.zst' -print -quit)" | |
| test -n "$(find dist/native -name 'turtle-term-*.pkg.tar.zst.sha256' -print -quit)" | |
| test -n "$(find dist/native -name 'turtle-term-*.pkg.tar.zst.manifest.json' -print -quit)" | |
| - name: Write native package index | |
| env: | |
| PACKAGE_VERSION: ${{ steps.version.outputs.version }} | |
| run: | | |
| python3 - <<'PY' | |
| import json, os | |
| from pathlib import Path | |
| root = Path('dist/native') | |
| packages = [] | |
| for path in sorted(root.rglob('*.manifest.json')): | |
| data = json.loads(path.read_text()) | |
| if data.get('schema') == 'sourceos.turtle-term.native-package.manifest.v0': | |
| packages.append(data) | |
| if not packages: | |
| raise SystemExit('no native package manifests found') | |
| index = { | |
| 'schema': 'sourceos.turtle-term.native-package.index.v0', | |
| 'product': 'TurtleTerm', | |
| 'version': os.environ['PACKAGE_VERSION'], | |
| 'package_count': len(packages), | |
| 'packages': packages, | |
| } | |
| Path('dist/native/turtle-term-native-packages.index.json').write_text(json.dumps(index, indent=2, sort_keys=True) + '\n') | |
| PY | |
| sha256sum dist/native/turtle-term-native-packages.index.json > dist/native/turtle-term-native-packages.index.json.sha256 | |
| - name: Attest native Linux package artifacts | |
| uses: actions/attest@v4 | |
| with: | |
| subject-path: | | |
| dist/native/turtle-term_*.deb | |
| dist/native/turtle-term_*.deb.sha256 | |
| dist/native/turtle-term_*.deb.manifest.json | |
| dist/native/rpmbuild/RPMS/**/*.rpm | |
| dist/native/rpmbuild/RPMS/**/*.rpm.sha256 | |
| dist/native/rpmbuild/RPMS/**/*.rpm.manifest.json | |
| dist/native/turtle-term-*.pkg.tar.zst | |
| dist/native/turtle-term-*.pkg.tar.zst.sha256 | |
| dist/native/turtle-term-*.pkg.tar.zst.manifest.json | |
| dist/native/turtle-term-native-packages.index.json | |
| dist/native/turtle-term-native-packages.index.json.sha256 | |
| - name: Upload native package artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: turtle-term-native-linux-${{ matrix.deb_arch }} | |
| path: | | |
| dist/native/turtle-term_*.deb | |
| dist/native/turtle-term_*.deb.sha256 | |
| dist/native/turtle-term_*.deb.manifest.json | |
| dist/native/rpmbuild/RPMS/**/*.rpm | |
| dist/native/rpmbuild/RPMS/**/*.rpm.sha256 | |
| dist/native/rpmbuild/RPMS/**/*.rpm.manifest.json | |
| dist/native/turtle-term-*.pkg.tar.zst | |
| dist/native/turtle-term-*.pkg.tar.zst.sha256 | |
| dist/native/turtle-term-*.pkg.tar.zst.manifest.json | |
| dist/native/turtle-term-native-packages.index.json | |
| dist/native/turtle-term-native-packages.index.json.sha256 | |
| - name: Publish native packages to GitHub release | |
| if: startsWith(github.ref, 'refs/tags/turtle-term-v') | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| tag="${GITHUB_REF_NAME}" | |
| gh release create "$tag" \ | |
| --title "TurtleTerm ${tag}" \ | |
| --notes "TurtleTerm ${tag} — native Linux packages." \ | |
| 2>/dev/null || true | |
| find dist/native -name '*.deb' -o -name '*.deb.sha256' -o -name '*.deb.manifest.json' \ | |
| -o -name '*.rpm' -o -name '*.rpm.sha256' -o -name '*.rpm.manifest.json' \ | |
| -o -name '*.pkg.tar.zst' -o -name '*.pkg.tar.zst.sha256' -o -name '*.pkg.tar.zst.manifest.json' \ | |
| -o -name '*.index.json' -o -name '*.index.json.sha256' \ | |
| | xargs gh release upload "$tag" --clobber |