Skip to content

Commit

Permalink
selfhosted mm1?
Browse files Browse the repository at this point in the history
  • Loading branch information
asg017 committed Apr 11, 2023
1 parent e4c2189 commit c387ede
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,43 @@ jobs:
with:
name: sqlite-vss-macos
path: dist/debug/*
build-macos-arm-extension:
name: Building MacOS extension
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"
- name: Cache sqlite build
id: cache-sqlite-build
uses: actions/cache@v3
with:
path: vendor/sqlite
key: ${{ runner.os }}-${{ hashFiles('vendor/get_sqlite.sh') }}
- if: steps.cache-sqlite-build.outputs.cache-hit != 'true'
run: ./vendor/get_sqlite.sh
- if: steps.cache-sqlite-build.outputs.cache-hit != 'true'
working-directory: vendor/sqlite
run: ./configure && make
- run: brew install llvm
- name: Cache cmake build
id: cache-cmake-build
uses: actions/cache@v3
with:
path: build
key: ${{ runner.os }}-build
- run: make loadable
env:
# https://stackoverflow.com/questions/48825416/missing-openmp-c-flags-openmp-c-lib-names
CC: /usr/local/opt/llvm/bin/clang
CXX: /usr/local/opt/llvm/bin/clang++
LDFLAGS: "-L/usr/local/opt/llvm/lib"
CPPFLAGS: "-I/usr/local/opt/llvm/include"
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: sqlite-vss-macos-arm
path: dist/debug/*
build-macos-python:
runs-on: macos-latest
needs: [build-macos-extension]
Expand Down
2 changes: 2 additions & 0 deletions vendor/get_sqlite.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash
set -euo pipefail

VENDOR_DIR=$(dirname "$0")

wget https://www.sqlite.org/2022/sqlite-autoconf-3400100.tar.gz -O $VENDOR_DIR/sqlite.tar.gz
Expand Down

0 comments on commit c387ede

Please sign in to comment.