chore: hapus infra Nix Rust mati; deploy.yml rombak ke Bun native
Semua flake/default/shell merujuk Cargo.lock + crate 'zesdex-gateway' yang sudah dihapus saat rombak monorepo ke project tunggal Bun, sehingga nix build .#default pasti gagal. Hapus infra Nix yang tak bisa dipakai: - hapus flake.nix, default.nix, shell.nix, flakehub-publish-rolling.yaml - deploy.yml: ganti nix build .#default -> setup-bun + bun build --compile + scp dist/zesdex -> /usr/local/bin/zesdex -> systemctl restart zesdex - docker-compose.yml: RUST_LOG usang -> ZESDEX_API_PORT (env TS) verify: tsc 0 err, bun test 79 pass, dist/zesdex build OK.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
name: Build & Deploy (Nix)
|
||||
name: Build & Deploy (Bun)
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -25,26 +25,27 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@v22
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
determinate: false
|
||||
extra-conf: |
|
||||
sandbox = false
|
||||
accept-flake-config = true
|
||||
bun-version: 1.3.14
|
||||
|
||||
- name: Cache Nix
|
||||
uses: DeterminateSystems/magic-nix-cache-action@v14
|
||||
- name: Install deps
|
||||
run: bun install --frozen-lockfile
|
||||
|
||||
- name: Build zesdex
|
||||
id: build
|
||||
- name: Type-check
|
||||
run: bun run check
|
||||
|
||||
- name: Test
|
||||
run: bun test
|
||||
|
||||
- name: Build binary
|
||||
run: |
|
||||
nix build .#default --impure --option sandbox false --print-build-logs
|
||||
STORE_PATH=$(readlink result)
|
||||
echo "store-path=$STORE_PATH" >> "$GITHUB_OUTPUT"
|
||||
echo "Build OK: $STORE_PATH"
|
||||
bun run build
|
||||
test -x dist/zesdex && echo "binary OK ($(stat -c%s dist/zesdex) bytes)"
|
||||
|
||||
- name: Setup SSH key
|
||||
if: env.VPS_HOST != '' && env.VPS_HOST != 'null'
|
||||
env:
|
||||
SSH_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
run: |
|
||||
@@ -56,6 +57,7 @@ jobs:
|
||||
ssh-keyscan -H "$VPS_HOST" >> ~/.ssh/known_hosts 2>/dev/null
|
||||
|
||||
- name: Deploy zesdex to VPS
|
||||
if: env.VPS_HOST != '' && env.VPS_HOST != 'null'
|
||||
run: |
|
||||
STORE_PATH="${{ steps.build.outputs.store-path }}"
|
||||
ssh "$VPS_USER@$VPS_HOST" "nix copy --to file:///nix/store $STORE_PATH && nix-env --install --force $STORE_PATH --profile /nix/var/nix/profiles/zesdex && systemctl restart zesdex"
|
||||
scp dist/zesdex "$VPS_USER@$VPS_HOST:/usr/local/bin/zesdex"
|
||||
ssh "$VPS_USER@$VPS_HOST" "chmod +x /usr/local/bin/zesdex && systemctl restart zesdex"
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
name: Publish to FlakeHub
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, master]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
flakehub-publish:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: read
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: DeterminateSystems/determinate-nix-action@main
|
||||
- uses: DeterminateSystems/flakehub-push@main
|
||||
with:
|
||||
visibility: public
|
||||
rolling: true
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
{ pkgs ? import <nixpkgs> { } }:
|
||||
|
||||
pkgs.rustPlatform.buildRustPackage {
|
||||
pname = "zesdex";
|
||||
version = "1.18.2";
|
||||
src = ./.;
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
};
|
||||
|
||||
cargoBuildFlags = [ "-p" "zesdex-gateway" "--bin" "zesdex" ];
|
||||
|
||||
nativeBuildInputs = with pkgs; [ pkg-config ];
|
||||
buildInputs = with pkgs; [ openssl sqlite ];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = with pkgs.lib; {
|
||||
description = "AI-native coding agent with workflow orchestration";
|
||||
homepage = "https://github.com/asepharyana/zesdex";
|
||||
license = licenses.mit;
|
||||
mainProgram = "zesdex";
|
||||
};
|
||||
}
|
||||
+1
-1
@@ -12,7 +12,7 @@ services:
|
||||
- ./workspace:/workspace:ro
|
||||
environment:
|
||||
- ZESDEX_DATA_DIR=/data
|
||||
- RUST_LOG=${RUST_LOG:-info}
|
||||
- ZESDEX_API_PORT=${ZESDEX_API_PORT:-8080}
|
||||
stdin_open: true
|
||||
tty: true
|
||||
# For daemon mode, expose the IPC socket directory
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
{
|
||||
description = "Zesdex — AI-native coding agent";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
rust-overlay = {
|
||||
url = "github:oxalica/rust-overlay";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils, rust-overlay }:
|
||||
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
|
||||
let
|
||||
overlays = [ (import rust-overlay) ];
|
||||
pkgs = import nixpkgs { inherit system overlays; };
|
||||
rustToolchain = pkgs.rust-bin.stable.latest.default.override {
|
||||
extensions = [ "rust-src" "rust-analyzer" "clippy" ];
|
||||
};
|
||||
in
|
||||
{
|
||||
devShells.default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
rustToolchain
|
||||
pkg-config
|
||||
openssl
|
||||
sqlite
|
||||
];
|
||||
|
||||
RUST_SRC_PATH = "${rustToolchain}/lib/rustlib/src/rust/library";
|
||||
RUST_LOG = "info";
|
||||
};
|
||||
|
||||
packages.default = pkgs.rustPlatform.buildRustPackage {
|
||||
pname = "zesdex";
|
||||
version = "1.18.2";
|
||||
src = ./.;
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
};
|
||||
|
||||
# Build only the main binary
|
||||
cargoBuildFlags = [ "-p" "zesdex-gateway" "--bin" "zesdex" ];
|
||||
|
||||
nativeBuildInputs = with pkgs; [ pkg-config perl ];
|
||||
buildInputs = with pkgs; [ openssl sqlite ];
|
||||
|
||||
doCheck = false; # Tests require filesystem access
|
||||
|
||||
meta = with pkgs.lib; {
|
||||
description = "AI-native coding agent with workflow orchestration";
|
||||
homepage = "https://github.com/asepharyana/zesdex";
|
||||
license = licenses.mit;
|
||||
mainProgram = "zesdex";
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
{ pkgs ? import <nixpkgs> { } }:
|
||||
|
||||
with pkgs;
|
||||
|
||||
mkShell {
|
||||
buildInputs = [
|
||||
(rust-bin.stable.latest.default.override {
|
||||
extensions = [ "rust-src" "rust-analyzer" "clippy" ];
|
||||
})
|
||||
pkg-config
|
||||
openssl
|
||||
sqlite
|
||||
];
|
||||
|
||||
RUST_SRC_PATH = "${rust-bin.stable.latest.default}/lib/rustlib/src/rust/library";
|
||||
RUST_LOG = "info";
|
||||
}
|
||||
Reference in New Issue
Block a user