name: CI on: push: branches: [ main ] pull_request: branches: [ main ] workflow_dispatch: env: DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer jobs: build-node-web: name: Build Node.js Web App (Frontend & Backend) runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: '20' cache: 'npm' cache-dependency-path: web/package-lock.json - name: Install dependencies working-directory: web run: npm ci - name: Build frontend and backend working-directory: web run: npm run build # This builds: CSS (Tailwind), Client (TypeScript), and Server (TypeScript) - name: Run tests working-directory: web run: npm test - name: Upload build artifacts uses: actions/upload-artifact@v4 with: name: node-web-build path: | web/dist/ web/public/bundle/ build-rust-binaries: name: Build Rust Binaries strategy: matrix: include: - os: ubuntu-latest target: x86_64-unknown-linux-gnu binary-name: tty-fwd - os: macos-latest target: x86_64-apple-darwin binary-name: tty-fwd - os: macos-latest target: aarch64-apple-darwin binary-name: tty-fwd - os: windows-latest target: x86_64-pc-windows-msvc binary-name: tty-fwd.exe runs-on: ${{ matrix.os }} steps: - name: Checkout code uses: actions/checkout@v4 - name: Setup Rust uses: dtolnay/rust-toolchain@stable with: targets: ${{ matrix.target }} - name: Cache Rust dependencies uses: Swatinem/rust-cache@v2 with: workspaces: tty-fwd - name: Build tty-fwd working-directory: tty-fwd run: cargo build --release --target ${{ matrix.target }} - name: Run tests if: matrix.target == 'x86_64-unknown-linux-gnu' || matrix.target == 'x86_64-apple-darwin' || matrix.target == 'x86_64-pc-windows-msvc' working-directory: tty-fwd run: cargo test --release - name: Upload binary uses: actions/upload-artifact@v4 with: name: tty-fwd-${{ matrix.target }} path: tty-fwd/target/${{ matrix.target }}/release/${{ matrix.binary-name }} build-and-test: name: Build and Test macOS App runs-on: macos-15 steps: - name: Checkout code uses: actions/checkout@v4 - name: Setup Xcode run: | sudo xcode-select -s /Applications/Xcode.app/Contents/Developer xcodebuild -version swift --version - name: Install build tools run: | brew install xcbeautify - name: Build Debug run: | set -o pipefail && \ xcodebuild build \ -workspace VibeTunnel.xcworkspace \ -scheme VibeTunnel \ -configuration Debug \ -destination "platform=macOS" \ CODE_SIGN_IDENTITY="" \ CODE_SIGNING_REQUIRED=NO \ | xcbeautify - name: Build Release run: | set -o pipefail && \ xcodebuild build \ -workspace VibeTunnel.xcworkspace \ -scheme VibeTunnel \ -configuration Release \ -destination "platform=macOS" \ CODE_SIGN_IDENTITY="" \ CODE_SIGNING_REQUIRED=NO \ | xcbeautify - name: Run tests run: | set -o pipefail && \ xcodebuild test \ -workspace VibeTunnel.xcworkspace \ -scheme VibeTunnel \ -configuration Debug \ -destination "platform=macOS" \ -resultBundlePath TestResults \ CODE_SIGN_IDENTITY="" \ CODE_SIGNING_REQUIRED=NO \ | xcbeautify - name: Upload test results if: failure() uses: actions/upload-artifact@v4 with: name: test-results path: TestResults - name: Upload build artifacts uses: actions/upload-artifact@v4 with: name: build-artifacts path: | build/Build/Products/Debug/VibeTunnel.app build/Build/Products/Release/VibeTunnel.app