Skip to content

Commit

Permalink
android+ios release artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
asg017 committed Sep 13, 2024
1 parent d26dc92 commit 6f75fc3
Show file tree
Hide file tree
Showing 2 changed files with 122 additions and 11 deletions.
114 changes: 113 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,84 @@ jobs:
name: sqlite-vec-wasm32-emscripten
path: dist/.wasm/*
include-hidden-files: true
build-android-extensions:
runs-on: ubuntu-latest
strategy:
matrix:
platforms:
[
{ name: android-aarch64, cc: aarch64-linux-android21-clang },
{ name: android-i686, cc: i686-linux-android21-clang },
{ name: android-x86_64, cc: x86_64-linux-android21-clang },
{ name: android-armv7a, cc: armv7a-linux-androideabi21-clang },
]
steps:
- uses: actions/checkout@v4
- run: ./scripts/vendor.sh
- uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "temurin"
- uses: android-actions/setup-android@v3
- run: |
sdkmanager --install "ndk;27.0.12077973"
echo "ANDROID_NDK_HOME=$ANDROID_SDK_ROOT/ndk/27.0.12077973" >> $GITHUB_ENV
- run: |
ls $ANDROID_NDK_HOME/toolchains/llvm/prebuilt/
ls $ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin
- run: |
export PATH=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
make CC=${{ matrix.platforms.cc }} \
AR=llvm-ar \
RANLIB=llvm-ranlib \
STRIP=llvm-strip loadable
- uses: actions/upload-artifact@v4
with:
name: sqlite-vec-${{ matrix.platforms.name }}-extension
path: dist/*.so
build-ios-extensions:
runs-on: ${{ matrix.platforms.runner }}
strategy:
fail-fast: false
matrix:
platforms: [
{
name: ios-aarch64,
target: arm64-apple-ios,
sdk: iphoneos,
runner: macos-14,
},
#{
# name: ios-x86_64,
# target: x86_64-apple-ios,
# sdk: iphoneos,
# runner: macos-12,
#},
{
name: iossimulator-aarch64,
target: arm64-apple-ios-simulator,
sdk: iphonesimulator,
runner: macos-14,
},
{
name: iossimulator-x86_64,
target: x86_64-apple-ios-simulator,
sdk: iphonesimulator,
runner: macos-14,
},
]
steps:
- uses: actions/checkout@v4
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- run: ./scripts/vendor.sh

- run: make CFLAGS="-target ${{ matrix.platforms.target }} -isysroot $(xcrun -sdk ${{ matrix.platforms.sdk }} --show-sdk-path) -fembed-bitcode -DNDEBUG=1" loadable static
- uses: actions/upload-artifact@v4
with:
name: sqlite-vec-${{ matrix.platforms.name }}-extension
path: dist/*
dist:
runs-on: ubuntu-latest
needs:
Expand All @@ -101,6 +179,8 @@ jobs:
build-macos-aarch64-extension,
build-windows-x86_64-extension,
build-wasm32-emscripten,
build-android-extensions,
build-ios-extensions,
]
permissions:
contents: write
Expand All @@ -126,8 +206,40 @@ jobs:
with:
name: sqlite-vec-wasm32-emscripten
path: dist/wasm32-emscripten
- uses: actions/download-artifact@v4
with:
name: sqlite-vec-android-aarch64-extension
path: dist/android-aarch64
- uses: actions/download-artifact@v4
with:
name: sqlite-vec-android-i686-extension
path: dist/android-i686
- uses: actions/download-artifact@v4
with:
name: sqlite-vec-android-x86_64-extension
path: dist/android-x86_64
- uses: actions/download-artifact@v4
with:
name: sqlite-vec-android-armv7a-extension
path: dist/android-armv7a
- uses: actions/download-artifact@v4
with:
name: sqlite-vec-android-armv7a-extension
path: dist/android-armv7a
- uses: actions/download-artifact@v4
with:
name: sqlite-vec-ios-aarch64-extension
path: dist/ios-aarch64
- uses: actions/download-artifact@v4
with:
name: sqlite-vec-iossimulator-aarch64-extension
path: dist/iossimulator-aarch64
- uses: actions/download-artifact@v4
with:
name: sqlite-vec-iossimulator-x86_64-extension
path: dist/iossimulator-x86_64
- run: |
curl -L https://github.com/asg017/sqlite-dist/releases/download/v0.0.1-alpha.11/sqlite-dist-x86_64-unknown-linux-gnu.tar.xz \
curl -L https://github.com/asg017/sqlite-dist/releases/download/v0.0.1-alpha.13/sqlite-dist-x86_64-unknown-linux-gnu.tar.xz \
| tar xfJ - --strip-components 1
- run: make sqlite-vec.h
- run: ./sqlite-dist ./sqlite-dist.toml --input dist/ --output distx/ --version $(cat VERSION)
Expand Down
19 changes: 9 additions & 10 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
with:
name: sqlite-vec-linux-x86_64-extension
path: dist/*
build-x86_64-linux-android-extension:
build-android-extensions:
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down Expand Up @@ -55,25 +55,24 @@ jobs:
with:
name: sqlite-vec-android-${{ matrix.platforms.name }}-extension
path: dist/*.so
build-ios-extension:
build-ios-extensions:
runs-on: ${{ matrix.platforms.runner }}
strategy:
fail-fast: false
matrix:
platforms:
[
platforms: [
{
name: ios-arm64,
target: arm64-apple-ios,
sdk: iphoneos,
runner: macos-14,
},
{
name: ios-x86_64,
target: x86_64-apple-ios,
sdk: iphoneos,
runner: macos-12,
},
#{
# name: ios-x86_64,
# target: x86_64-apple-ios,
# sdk: iphoneos,
# runner: macos-12,
#},
{
name: ios-simulator-arm64,
target: arm64-apple-ios-simulator,
Expand Down

0 comments on commit 6f75fc3

Please sign in to comment.