Skip to content

Commit 1f92a43

Browse files
authored
add platform builds and tests (#1)
* Add main.yml workflow and update Makefile and .gitignore; missing LICENSE.md; fix sqlite-memory.c to load extension only when it is statically linked * Update main.yml and dbmem-utils.c for build configuration and timestamp handling * Fix Makefile to use single quotes for architecture options in LLAMA_OPTIONS * Add extension loading test to Makefile; add missing sqlite3 header file * Fix return value check in dbmem_compute_uuid_v7 for Windows platform * Refactor Makefile for platform-specific build configurations; streamline LLAMA options and link flags for macOS, iOS, and Android * Update build configurations for linux-musl; add missing dependencies and improve platform detection * Refactor GitHub Actions and Makefile for Windows builds; streamline conditions and improve command execution * Update llama.cpp cmake options in Makefile * Update Windows build dependencies in GitHub Actions to use mingw-w64-x86_64-sqlite3 * Add Android package dependencies; Fix XCFramework to use make's foreach to avoid shell escaping issues with PLIST/MODULEMAP * Create temporary directory before running unit tests * Update Windows LLAMA build flags and XCFramework target build script * Update unit test temporary directory handling for cross-platform compatibility * Refactor Makefile to use GGML_PREFIX for library paths and installation * Fix Windows platform library prefix handling in Makefile for llama.cpp * Revert Makefile to use build directory paths instead of cmake --install * Add Windows platform support for llama.cpp build with cmake --install paths * Refactor Android testing steps in CI workflow to build and execute unit tests * clean Makefile an main.yml workflow * fix Android test builds * cleanup: remove sqlite amalgamation zip after download * fix(android): update TEST_LDFLAGS to include -static-libstdc++ * fix(android): update TEST_LDFLAGS and add TEST_LINK_EXTRAS for static-libstdc++ * fix(android, ios, ios-sim): remove OMIT_IO setting for platform builds * fix(android): add TEST_TMP_DIR definition for Android platform builds * feat: add curl build infrastructure for remote embedding support * feat: add e2e network tests * fix: add binaries strip commands for each platform, and missing e2e tests dependencies for CI * fix: linux musl e2e test vector extension path * fix: update musl detection logic
1 parent db9707c commit 1f92a43

31 files changed

+25470
-165
lines changed

.github/workflows/main.yml

Lines changed: 555 additions & 0 deletions
Large diffs are not rendered by default.

.gitignore

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,57 @@
1+
# Build artifacts
2+
build/
3+
dist/
4+
*.a
5+
*.o
6+
*.sqlite
7+
8+
# llama.cpp build
9+
modules/llama.cpp/build/
10+
11+
# curl build artifacts (curl/include/ headers remain tracked)
12+
curl/src/
13+
curl/*/
14+
!curl/include/
15+
mbedtls/
16+
17+
# Test artifacts
18+
test/unittest
19+
test/unittest.dSYM/
20+
21+
# iOS/macOS
22+
*.xcworkspacedata
23+
*.xcuserstate
24+
*.xcbkptlist
25+
*.plist
26+
*.dSYM/
27+
28+
# Android
29+
.gradle/
30+
*.aar
31+
local.properties
32+
jniLibs/
33+
*.apk
34+
*.ap_
35+
*.dex
36+
37+
# Node.js
38+
node_modules/
39+
package-lock.json
40+
*.tsbuildinfo
41+
coverage/
42+
*.log
43+
npm-debug.log*
44+
yarn-debug.log*
45+
yarn-error.log*
46+
47+
# IDE
48+
.vscode/
49+
.idea/
50+
*.iml
51+
*.swp
52+
*.swo
53+
54+
# System
155
.DS_Store
256
test/unittest.dSYM/Contents/Info.plist
357
test/unittest.dSYM/Contents/Resources/DWARF/unittest

LICENSE.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
Elastic License 2.0 (modified for open-source use)
2+
3+
Copyright © 2025 SQLite Cloud, Inc.
4+
5+
This software is licensed under the Elastic License 2.0, with the additional grant described below.
6+
7+
You may not use this file except in compliance with the Elastic License 2.0 and the conditions outlined here.
8+
9+
You may obtain a copy of the Elastic License 2.0 at:
10+
11+
```
12+
https://www.elastic.co/licensing/elastic-license
13+
```
14+
15+
Software distributed under the Elastic License is distributed on an "AS IS" BASIS,
16+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
18+
See the Elastic License 2.0 for the specific language governing permissions and limitations under the license.
19+
20+
---
21+
22+
## Additional Grant for Open-Source Projects
23+
24+
In addition to the permissions granted under the Elastic License 2.0:
25+
26+
* **Free Use in Open-Source Projects**:
27+
You may use, copy, distribute, and prepare derivative works of the software — in source or object form, with or without modification — freely and without fee, provided the software is incorporated into or used by an **open-source project** licensed under an OSI-approved open-source license.
28+
29+
---
30+
31+
## Conditions
32+
33+
1. For **open-source projects**, the software may be used, copied, modified, and distributed without restriction or fee.
34+
35+
2. For **non–open-source or commercial production use**, you may use, copy, distribute, and prepare derivative works of the software only with a commercial license from SQLite Cloud, Inc.
36+
37+
3. You may not provide the software to third parties as a managed service, such as a hosted or cloud-based service, unless you have a license for that use.
38+
39+
4. The software may not be used to circumvent the license grant limitations.
40+
41+
5. Any permitted use is subject to compliance with the Elastic License 2.0, this additional grant, and applicable law.

0 commit comments

Comments
 (0)