Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions .github/workflows/fork-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Fork CI

on:
push:
branches: [main, 'sid/**']
pull_request:
branches: [main]

concurrency:
group: fork-ci-${{ github.ref }}
cancel-in-progress: true

jobs:
build-macos:
name: Build macOS (LAB)
runs-on: macos-14
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Zig
uses: mlugg/setup-zig@v2
with:
version: 0.15.2

- name: Cache GhosttyKit
id: cache-ghosttykit
uses: actions/cache@v4
with:
path: ghostty/zig-out/lib/GhosttyKit.xcframework
key: ghosttykit-${{ hashFiles('ghostty/.git/HEAD', 'ghostty/.git/refs/heads/**') }}

- name: Build GhosttyKit
if: steps.cache-ghosttykit.outputs.cache-hit != 'true'
run: |
cd ghostty
zig build -Demit-xcframework=true -Dxcframework-target=universal -Doptimize=ReleaseFast

- name: Build cmux LAB (Debug)
run: |
xcodebuild -project GhosttyTabs.xcodeproj \
-scheme cmux \
-configuration Debug \
-destination 'platform=macOS' \
-derivedDataPath /tmp/cmux-fork-ci \
ASSETCATALOG_COMPILER_APPICON_NAME=AppIcon-Fork \
PRODUCT_NAME="cmux LAB" \
build

- name: Build cmux LAB (Release)
run: |
xcodebuild -project GhosttyTabs.xcodeproj \
-scheme cmux \
-configuration Release \
-destination 'platform=macOS' \
-derivedDataPath build \
ASSETCATALOG_COMPILER_APPICON_NAME=AppIcon-Fork \
PRODUCT_NAME="cmux LAB" \
build

build-linux-daemon:
name: Build Linux daemon
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Zig
uses: mlugg/setup-zig@v2
with:
version: 0.15.2

- name: Build cmuxd (x86_64)
run: |
cd cmuxd
zig build -Doptimize=ReleaseFast

nix-check:
name: Nix flake check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix flake check
- run: nix develop --command echo "dev shell OK"
196 changes: 196 additions & 0 deletions .github/workflows/fork-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
name: Fork Release (LAB)

on:
push:
tags:
- 'lab-v*'
workflow_dispatch:
inputs:
tag:
description: 'Release tag (e.g. lab-v0.62.1)'
required: true

concurrency:
group: fork-release
cancel-in-progress: false

jobs:
build-macos:
name: Build macOS .app
runs-on: macos-14
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Zig
uses: mlugg/setup-zig@v2
with:
version: 0.15.2

- name: Build GhosttyKit
run: |
cd ghostty
zig build -Demit-xcframework=true -Dxcframework-target=universal -Doptimize=ReleaseFast

- name: Build cmux LAB (Release)
run: |
xcodebuild -project GhosttyTabs.xcodeproj \
-scheme cmux \
-configuration Release \
-destination 'platform=macOS' \
-derivedDataPath build \
ASSETCATALOG_COMPILER_APPICON_NAME=AppIcon-Fork \
PRODUCT_NAME="cmux LAB" \
PRODUCT_BUNDLE_IDENTIFIER=com.cmuxterm.app.lab \
build

- name: Package DMG
run: |
APP_PATH="build/Build/Products/Release/cmux LAB.app"
npx create-dmg@8.0.0 "$APP_PATH" . --overwrite || true
mv *.dmg cmux-lab-macos.dmg 2>/dev/null || mv "cmux LAB"*.dmg cmux-lab-macos.dmg

- name: Upload macOS artifact
uses: actions/upload-artifact@v4
with:
name: cmux-lab-macos
path: cmux-lab-macos.dmg

build-linux-daemon:
name: Build Linux daemon (cmuxd)
runs-on: ubuntu-latest
strategy:
matrix:
include:
- target: x86_64-linux
arch: amd64
- target: aarch64-linux
arch: arm64
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Zig
uses: mlugg/setup-zig@v2
with:
version: 0.15.2

- name: Build cmuxd
run: |
cd cmuxd
zig build -Doptimize=ReleaseFast -Dtarget=${{ matrix.target }}-gnu
cp zig-out/bin/cmuxd ../cmuxd-${{ matrix.arch }}

- name: Create DEB package
run: |
ARCH=${{ matrix.arch }}
VERSION=${GITHUB_REF_NAME#lab-v}
[ -z "$VERSION" ] && VERSION="0.0.0"
PKG_DIR="cmux-lab_${VERSION}_${ARCH}"
mkdir -p "${PKG_DIR}/DEBIAN"
mkdir -p "${PKG_DIR}/usr/bin"
mkdir -p "${PKG_DIR}/usr/share/doc/cmux-lab"

cp cmuxd-${ARCH} "${PKG_DIR}/usr/bin/cmuxd-lab"
chmod 755 "${PKG_DIR}/usr/bin/cmuxd-lab"

cat > "${PKG_DIR}/DEBIAN/control" <<CTRL
Package: cmux-lab
Version: ${VERSION}
Architecture: ${ARCH}
Maintainer: Jess Sullivan <jess@jesssullivan.dev>
Description: cmux LAB remote daemon with FIDO2/WebAuthn support
Terminal multiplexer remote daemon for enterprise auth testing.
Homepage: https://github.com/Jesssullivan/cmux
CTRL
# Remove leading spaces from heredoc
sed -i 's/^ //' "${PKG_DIR}/DEBIAN/control"

dpkg-deb --build "${PKG_DIR}"
mv "${PKG_DIR}.deb" "cmux-lab_${VERSION}_${ARCH}.deb"

- name: Create RPM package
if: matrix.arch == 'amd64'
run: |
sudo apt-get install -y rpm
VERSION=${GITHUB_REF_NAME#lab-v}
[ -z "$VERSION" ] && VERSION="0.0.0"

mkdir -p rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
cp cmuxd-amd64 rpmbuild/SOURCES/cmuxd-lab

cat > rpmbuild/SPECS/cmux-lab.spec <<'SPEC'
Name: cmux-lab
Version: %{version}
Release: 1%{?dist}
Summary: cmux LAB remote daemon with FIDO2/WebAuthn support
License: MIT
URL: https://github.com/Jesssullivan/cmux

%description
Terminal multiplexer remote daemon for enterprise auth testing.

%install
mkdir -p %{buildroot}/usr/bin
cp %{_sourcedir}/cmuxd-lab %{buildroot}/usr/bin/cmuxd-lab
chmod 755 %{buildroot}/usr/bin/cmuxd-lab

%files
/usr/bin/cmuxd-lab
SPEC
sed -i 's/^ //' rpmbuild/SPECS/cmux-lab.spec
sed -i "s/%{version}/${VERSION}/" rpmbuild/SPECS/cmux-lab.spec

rpmbuild --define "_topdir $(pwd)/rpmbuild" -bb rpmbuild/SPECS/cmux-lab.spec || true

- name: Upload Linux artifacts
uses: actions/upload-artifact@v4
with:
name: cmux-lab-linux-${{ matrix.arch }}
path: |
cmuxd-${{ matrix.arch }}
cmux-lab_*.deb
rpmbuild/RPMS/**/*.rpm

release:
name: Create GitHub Release
needs: [build-macos, build-linux-daemon]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4

- name: Create release
env:
GH_TOKEN: ${{ github.token }}
run: |
TAG="${GITHUB_REF_NAME}"
[ -z "$TAG" ] && TAG="${{ github.event.inputs.tag }}"

# Collect all release assets
ASSETS=()
for f in cmux-lab-macos/*.dmg cmux-lab-linux-*/*.deb cmux-lab-linux-*/cmuxd-* cmux-lab-linux-*/rpmbuild/RPMS/**/*.rpm; do
[ -f "$f" ] && ASSETS+=("$f")
done

gh release create "$TAG" \
--repo "$GITHUB_REPOSITORY" \
--title "cmux LAB $TAG" \
--notes "Fork release with FIDO2/WebAuthn enterprise auth support.

## Assets
- **cmux-lab-macos.dmg** — macOS .app bundle (trans-themed LAB branding)
- **cmuxd-amd64** / **cmuxd-arm64** — Linux remote daemon binaries
- **.deb** — Debian/Ubuntu packages
- **.rpm** — RHEL/Fedora packages (amd64)

## Nix
\`\`\`bash
nix run github:Jesssullivan/cmux/$TAG
\`\`\`
" \
"${ASSETS[@]}"
Binary file added Assets.xcassets/AppIcon-Fork.appiconset/128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets.xcassets/AppIcon-Fork.appiconset/16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets.xcassets/AppIcon-Fork.appiconset/16@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets.xcassets/AppIcon-Fork.appiconset/256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets.xcassets/AppIcon-Fork.appiconset/32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets.xcassets/AppIcon-Fork.appiconset/32@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets.xcassets/AppIcon-Fork.appiconset/512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 68 additions & 0 deletions Assets.xcassets/AppIcon-Fork.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"images": [
{
"filename": "16.png",
"idiom": "mac",
"scale": "1x",
"size": "16x16"
},
{
"filename": "16@2x.png",
"idiom": "mac",
"scale": "2x",
"size": "16x16"
},
{
"filename": "32.png",
"idiom": "mac",
"scale": "1x",
"size": "32x32"
},
{
"filename": "32@2x.png",
"idiom": "mac",
"scale": "2x",
"size": "32x32"
},
{
"filename": "128.png",
"idiom": "mac",
"scale": "1x",
"size": "128x128"
},
{
"filename": "128@2x.png",
"idiom": "mac",
"scale": "2x",
"size": "128x128"
},
{
"filename": "256.png",
"idiom": "mac",
"scale": "1x",
"size": "256x256"
},
{
"filename": "256@2x.png",
"idiom": "mac",
"scale": "2x",
"size": "256x256"
},
{
"filename": "512.png",
"idiom": "mac",
"scale": "1x",
"size": "512x512"
},
{
"filename": "512@2x.png",
"idiom": "mac",
"scale": "2x",
"size": "512x512"
}
],
"info": {
"author": "xcode",
"version": 1
}
}
Loading
Loading