-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (41 loc) · 1.54 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: main
on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'info'
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install apt-get packages
run: |
echo RESET grub-efi/install_devices | sudo debconf-communicate grub-pc
sudo ACCEPT_EULA=Y apt-get update
sudo ACCEPT_EULA=Y apt-get upgrade
sudo apt-get install wget git curl software-properties-common build-essential libjpeg-dev libpng-dev cmake
- name: Run qdrant in Docker
run: |
mkdir qdrant_storage
nohup docker run -d -p 6333:6333 -p 6334:6334 -v ${{ github.workspace }}/qdrant_storage:/qdrant/storage:z qdrant/qdrant
- name: Install Rust target for wasm
run: |
rustup target add wasm32-wasi
- name: Install WasmEdge
run: |
VERSION=0.13.5
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | sudo bash -s -- -v $VERSION --plugins wasmedge_rustls -p /usr/local
# curl -X PUT 'http://localhost:6333/collections/test_collection' -H 'Content-Type: application/json' --data-raw '{ "vectors": { "size": 4, "distance": "Dot" } }'
- name: Run examples
run: |
cd examples
cargo build --target wasm32-wasi --release
wasmedgec target/wasm32-wasi/release/qdrant_examples.wasm qdrant_examples.wasm
wasmedge qdrant_examples.wasm