mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-04-27 15:17:38 +00:00
Update CI to build Rust binaries and clarify Node.js builds
- Rename Node.js job to clarify it builds both frontend and backend - Add comment explaining what npm run build does (CSS, client, server) - Include public/bundle/ in Node.js artifacts for frontend assets - Add Rust binary build job with matrix strategy for multiple platforms: - Linux (x86_64) - macOS (x86_64 and arm64) - Windows (x86_64) - Cache Rust dependencies for faster builds - Run tests only on native platforms (not cross-compilation targets)
This commit is contained in:
parent
445187d754
commit
0a067ca7a7
1 changed files with 56 additions and 5 deletions
61
.github/workflows/ci.yml
vendored
61
.github/workflows/ci.yml
vendored
|
|
@ -11,8 +11,8 @@ env:
|
||||||
DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer
|
DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-node-server:
|
build-node-web:
|
||||||
name: Build Node Server
|
name: Build Node.js Web App (Frontend & Backend)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
@ -30,9 +30,10 @@ jobs:
|
||||||
working-directory: web
|
working-directory: web
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Build server
|
- name: Build frontend and backend
|
||||||
working-directory: web
|
working-directory: web
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
# This builds: CSS (Tailwind), Client (TypeScript), and Server (TypeScript)
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
working-directory: web
|
working-directory: web
|
||||||
|
|
@ -41,8 +42,58 @@ jobs:
|
||||||
- name: Upload build artifacts
|
- name: Upload build artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: node-server-build
|
name: node-web-build
|
||||||
path: web/dist/
|
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:
|
build-and-test:
|
||||||
name: Build and Test macOS App
|
name: Build and Test macOS App
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue