From 5f0a41759aa09246413db22a69b95820e9397a9f Mon Sep 17 00:00:00 2001 From: Alfredo Gallardo Date: Thu, 16 May 2024 17:13:36 -0400 Subject: [PATCH] - fix: cicd and readme --- .github/workflows/release-dev.yml | 10 +++++-- .github/workflows/release-prod.yml | 9 ++++++- .gitignore | 3 +++ README.md | 3 +++ package-lock.json | 42 +++++++++++++++++++++++++++--- package.json | 3 ++- 6 files changed, 63 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release-dev.yml b/.github/workflows/release-dev.yml index c022fc433..ae3a1bd5e 100644 --- a/.github/workflows/release-dev.yml +++ b/.github/workflows/release-dev.yml @@ -20,7 +20,6 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - lfs: true - name: get npm version id: package-version @@ -128,7 +127,6 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - lfs: true - name: (Windows) Install asiosdk if: ${{ matrix.arch == 'x86_64-pc-windows-msvc' }} @@ -196,6 +194,14 @@ jobs: npm cache verify npm ci --no-audit --prefer-offline + - name: Download side binaries + env: + ARCH: ${{ matrix.arch }} + SHINKAI_NODE_VERSION: v0.7.5 + OLLAMA_VERSION: v0.1.38 + run: | + npx ts-node ./ci-scripts/download-side-binaries.ts + - name: Adapt package version run: | npm version ${{ needs.prebuild.outputs.version }}${{ github.run_number }} --git-tag-version false diff --git a/.github/workflows/release-prod.yml b/.github/workflows/release-prod.yml index 736fb81bb..1e7fe7653 100644 --- a/.github/workflows/release-prod.yml +++ b/.github/workflows/release-prod.yml @@ -125,7 +125,6 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - lfs: true - name: (Windows) Install asiosdk} if: ${{ matrix.arch == 'x86_64-pc-windows-msvc' }} @@ -193,6 +192,14 @@ jobs: npm cache verify npm ci --no-audit --prefer-offline + - name: Download side binaries + env: + ARCH: ${{ matrix.arch }} + SHINKAI_NODE_VERSION: v0.7.5 + OLLAMA_VERSION: v0.1.38 + run: | + npx ts-node ./ci-scripts/download-side-binaries.ts + - name: (Linux) Run NX build on shinkai-desktop if: ${{ matrix.arch == 'x86_64-unknown-linux-gnu' }} run: npx nx build shinkai-desktop --skip-nx-cache diff --git a/.gitignore b/.gitignore index 2834702c5..33e0054c4 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,6 @@ qr_code_device_0.png apps/shinkai-visor-e2e/test-report apps/shinkai-desktop/src-tauri/storage apps/shinkai-desktop/src-tauri/node_storage + +apps/shinkai-desktop/src-tauri/bin/ollama-windows-resources/* +apps/shinkai-desktop/src-tauri/bin/* \ No newline at end of file diff --git a/README.md b/README.md index f964d3358..817bbf228 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,9 @@ To get started first clone this repo: ``` $ git clone https://github.com/dcSpark/shinkai-apps + +# Download side binaries. IE: +ARCH="aarch64-apple-darwin" OLLAMA_VERSION="v0.1.38" SHINKAI_NODE_VERSION="v0.7.5" npx ts-node ./ci-scripts/download-side-binaries.ts ``` Once you have done that simply use `npm` to compile/serve it yourself: diff --git a/package-lock.json b/package-lock.json index 4ab20adea..cb728dc0c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@shinkai/source", - "version": "0.7.3", + "version": "0.7.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@shinkai/source", - "version": "0.7.3", + "version": "0.7.4", "hasInstallScript": true, "license": "MIT", "workspaces": [ @@ -191,7 +191,8 @@ "vite-plugin-top-level-await": "^1.3.1", "vite-plugin-wasm": "^3.2.2", "vite-tsconfig-paths": "^4.2.3", - "vitest": "^0.34.3" + "vitest": "^0.34.3", + "zip-lib": "^1.0.4" }, "engines": { "node": "18", @@ -36275,6 +36276,15 @@ "fd-slicer": "~1.1.0" } }, + "node_modules/yazl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/yazl/-/yazl-2.5.1.tgz", + "integrity": "sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==", + "dev": true, + "dependencies": { + "buffer-crc32": "~0.2.3" + } + }, "node_modules/yn": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", @@ -36326,6 +36336,32 @@ "node": "^12.20.0 || >=14" } }, + "node_modules/zip-lib": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/zip-lib/-/zip-lib-1.0.4.tgz", + "integrity": "sha512-tcwMLUsT/dxgEQMwxoWt0BSP3QVK9vV/rw7ORkUvG6QEW8GgZVDThzhE8FDeROD0vrMG9QDFLreJ9eTOYc56Tw==", + "dev": true, + "dependencies": { + "yauzl": "^3.1.3", + "yazl": "^2.5.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/zip-lib/node_modules/yauzl": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-3.1.3.tgz", + "integrity": "sha512-JCCdmlJJWv7L0q/KylOekyRaUrdEoUxWkWVcgorosTROCFWiS9p2NNPE9Yb91ak7b1N5SxAZEliWpspbZccivw==", + "dev": true, + "dependencies": { + "buffer-crc32": "~0.2.3", + "pend": "~1.2.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/zip-stream": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-2.1.3.tgz", diff --git a/package.json b/package.json index ecd2ab6ef..744e263bf 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,8 @@ "vite-plugin-top-level-await": "^1.3.1", "vite-plugin-wasm": "^3.2.2", "vite-tsconfig-paths": "^4.2.3", - "vitest": "^0.34.3" + "vitest": "^0.34.3", + "zip-lib": "^1.0.4" }, "dependencies": { "@capacitor-community/barcode-scanner": "^4.0.1",