mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 02:27:40 +08:00
Merge pull request #324 from tpayet/gh-actions
Replace Azure CI by Github Actions
This commit is contained in:
commit
a82ecb3cef
5
.dockerignore
Normal file
5
.dockerignore
Normal file
@ -0,0 +1,5 @@
|
||||
target
|
||||
Dockerfile
|
||||
.dockerignore
|
||||
.git
|
||||
.gitignore
|
13
.github/workflows/README.md
vendored
Normal file
13
.github/workflows/README.md
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
# GitHub actions workflow for MeiliDB
|
||||
|
||||
> **Note:**
|
||||
|
||||
> - We do not use [cache](https://github.com/actions/cache) yet but we could use it to speed up CI
|
||||
|
||||
## Workflow
|
||||
|
||||
- On each pull request, we are triggering `cargo test`.
|
||||
- On each commit on master, we are building the latest docker image.
|
||||
|
||||
## TODO
|
||||
- On each tag, we should build the tagged docker image and the binaries for Debian & CentOS
|
19
.github/workflows/publish-docker-latest.yml
vendored
Normal file
19
.github/workflows/publish-docker-latest.yml
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
name: Publish latest image to Docker Hub
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Publish to Registry
|
||||
uses: elgohr/Publish-Docker-Github-Action@master
|
||||
with:
|
||||
name: getmeili/meilisearch
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
20
.github/workflows/publish-docker-tag.yml
vendored
Normal file
20
.github/workflows/publish-docker-tag.yml
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
name: Publish tagged image to Docker Hub
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Publish to Registry
|
||||
uses: elgohr/Publish-Docker-Github-Action@master
|
||||
with:
|
||||
name: getmeili/meilisearch
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
tags: true
|
20
.github/workflows/test.yml
vendored
Normal file
20
.github/workflows/test.yml
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
on: [pull_request]
|
||||
|
||||
name: Cargo test
|
||||
|
||||
jobs:
|
||||
check:
|
||||
name: MeiliDB
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
- name: Run cargo test
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
28
Dockerfile
Normal file
28
Dockerfile
Normal file
@ -0,0 +1,28 @@
|
||||
# Compile
|
||||
FROM alpine:3.10 AS compiler
|
||||
|
||||
RUN apk update --quiet
|
||||
RUN apk add curl
|
||||
RUN apk add build-base
|
||||
RUN apk add libressl-dev
|
||||
|
||||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
|
||||
WORKDIR /meilisearch
|
||||
|
||||
COPY . .
|
||||
|
||||
ENV RUSTFLAGS="-C target-feature=-crt-static"
|
||||
|
||||
RUN $HOME/.cargo/bin/cargo build --release
|
||||
|
||||
# Run
|
||||
FROM alpine:3.10
|
||||
|
||||
RUN apk update --quiet
|
||||
RUN apk add libressl
|
||||
RUN apk add build-base
|
||||
|
||||
COPY --from=compiler /meilisearch/target/release/meilidb-http .
|
||||
|
||||
CMD ./meilidb-http
|
11
README.md
11
README.md
@ -1,6 +1,6 @@
|
||||
# MeiliDB
|
||||
|
||||
[![Build Status](https://dev.azure.com/thomas0884/thomas/_apis/build/status/meilisearch.MeiliDB?branchName=master)](https://dev.azure.com/thomas0884/thomas/_build/latest?definitionId=1&branchName=master)
|
||||
[![Build Status](https://github.com/meilisearch/MeiliDB/workflows/Cargo%20test/badge.svg)](https://dev.azure.com/thomas0884/thomas/_build/latest?definitionId=1&branchName=master)
|
||||
[![dependency status](https://deps.rs/repo/github/meilisearch/MeiliDB/status.svg)](https://deps.rs/repo/github/meilisearch/MeiliDB)
|
||||
[![License](https://img.shields.io/badge/license-commons%20clause-lightgrey)](https://commonsclause.com/)
|
||||
|
||||
@ -27,7 +27,7 @@ It uses [LMDB](https://en.wikipedia.org/wiki/Lightning_Memory-Mapped_Database) a
|
||||
|
||||
You can [read the deep dive](deep-dive.md) if you want more information on the engine, it describes the whole process of generating updates and handling queries or you can take a look at the [typos and ranking rules](typos-ranking-rules.md) if you want to know the default rules used to sort the documents.
|
||||
|
||||
We will be proud if you submit issues and pull requests. You can help to grow this project and start contributing by checking [issues tagged "good-first-issue"](https://github.com/meilisearch/MeiliDB/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22). It is a good start!
|
||||
We will be glad if you submit issues and pull requests. You can help to grow this project and start contributing by checking [issues tagged "good-first-issue"](https://github.com/meilisearch/MeiliDB/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22). It is a good start!
|
||||
|
||||
[![crates.io demo gif](misc/crates-io-demo.gif)](https://crates.meilisearch.com)
|
||||
|
||||
@ -47,7 +47,6 @@ If you have not installed Rust and its package manager `cargo` yet, go to [the i
|
||||
You can deploy the server on your own machine, it will listen to HTTP requests on the 8080 port by default.
|
||||
|
||||
```bash
|
||||
rustup override set nightly
|
||||
cargo run --release
|
||||
```
|
||||
|
||||
@ -112,8 +111,8 @@ curl 'http://127.0.0.1:8080/indexes/movies/search?q=botman'
|
||||
|
||||
## Performances
|
||||
|
||||
With a dataset composed of _100 353_ documents with _352_ attributes each and _3_ of them indexed.
|
||||
So more than _300 000_ fields indexed for _35 million_ stored we can handle more than _2.8k req/sec_ with an average response time of _9 ms_ on an Intel i7-7700 (8) @ 4.2GHz.
|
||||
With a dataset composed of _100 353_ documents with _352_ attributes each and _3_ of them indexed.
|
||||
So more than _300 000_ fields indexed for _35 million_ stored we can handle more than _2.8k req/sec_ with an average response time of _9 ms_ on an Intel i7-7700 (8) @ 4.2GHz.
|
||||
|
||||
Requests are made using [wrk](https://github.com/wg/wrk) and scripted to simulate real users queries.
|
||||
|
||||
@ -128,7 +127,7 @@ Requests/sec: 2806.46
|
||||
Transfer/sec: 759.17KB
|
||||
```
|
||||
|
||||
We also indexed a dataset containing something like _12 millions_ cities names in _24 minutes_ on a machine with _8 cores_, _64 GB of RAM_ and a _300 GB NMVe_ SSD.<br/>
|
||||
We also indexed a dataset containing something like _12 millions_ cities names in _24 minutes_ on a machine with _8 cores_, _64 GB of RAM_ and a _300 GB NMVe_ SSD.<br/>
|
||||
The resulting database was _16 GB_ and search results were between _30 ms_ and _4 seconds_ for short prefix queries.
|
||||
|
||||
### Notes
|
||||
|
@ -1,52 +0,0 @@
|
||||
---
|
||||
trigger:
|
||||
branches:
|
||||
include: [ master ]
|
||||
|
||||
pr: [ master ]
|
||||
|
||||
jobs:
|
||||
- job: test
|
||||
pool:
|
||||
vmImage: 'Ubuntu 16.04'
|
||||
container: tpayet/chiquitita:latest
|
||||
steps:
|
||||
- script: |
|
||||
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable
|
||||
$HOME/.cargo/bin/rustup component add rustfmt
|
||||
displayName: 'Install rustc and components'
|
||||
- script: |
|
||||
$HOME/.cargo/bin/cargo check
|
||||
displayName: 'Check MeiliDB'
|
||||
- script: |
|
||||
$HOME/.cargo/bin/cargo test
|
||||
displayName: 'Test MeiliDB'
|
||||
- script: |
|
||||
$HOME/.cargo/bin/cargo fmt --all -- --check
|
||||
displayName: 'Fmt MeiliDB'
|
||||
|
||||
- job: build
|
||||
dependsOn:
|
||||
- test
|
||||
condition: succeeded()
|
||||
pool:
|
||||
vmImage: 'Ubuntu 16.04'
|
||||
container: tpayet/chiquitita:latest
|
||||
steps:
|
||||
- script: |
|
||||
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable
|
||||
$HOME/.cargo/bin/rustup component add rustfmt
|
||||
displayName: 'Install rustc and components'
|
||||
- script: |
|
||||
$HOME/.cargo/bin/cargo build --release
|
||||
displayName: 'Build MeiliDB'
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
contents: '$(System.DefaultWorkingDirectory)/target/release/meilidb-http'
|
||||
targetFolder: $(Build.ArtifactStagingDirectory)
|
||||
displayName: 'Copy build'
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
artifactName: meilidb
|
||||
displayName: 'Upload artifacts'
|
||||
|
Loading…
Reference in New Issue
Block a user