Skip to content

Commit 032e22f

Browse files
committed
add github workflows
Signed-off-by: weedge <[email protected]>
1 parent 461ee45 commit 032e22f

File tree

9 files changed

+211
-1
lines changed

9 files changed

+211
-1
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Bug Report
2+
description: File a bug report
3+
title: "[Bug]: "
4+
labels: [bug, triage]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to fill out this bug report!
10+
11+
- type: input
12+
id: operating_system
13+
attributes:
14+
label: OS
15+
description: Operating system and version (eg Ubuntu 20.04, OSX Catalina)
16+
placeholder: linux
17+
18+
- type: architecutre
19+
id: cpu_arch
20+
attributes:
21+
label: CPU Architecture
22+
description: CPU Architecture (eg: x86, x86-64, arm, etc).
23+
placeholder: linux
24+
25+
- type: input
26+
id: redis_version
27+
attributes:
28+
label: Redis Server Version
29+
description: What version of redis-server are you running (redis-server --version)
30+
placeholder: latest
31+
32+
- type: input
33+
id: redis_module_version
34+
attributes:
35+
label: Redis Module Version
36+
description: What version of this redis module was installed?
37+
placeholder: latest
38+
39+
- type: input
40+
id: was_redis_docker
41+
attributes:
42+
label: Docker Installation
43+
description: What version of this redis module was installed?
44+
placeholder: latest
45+
46+
- type: checkboxes
47+
id: installmethod
48+
attributes:
49+
label: Docker installation
50+
description: Check this box, if you installed the release via a docker.
51+
options:
52+
- label: I installed the dockerhub release
53+
54+
- type: textarea
55+
id: whathappened
56+
label: What happened?
57+
description: Please tell us what happened, and what you expected to happen.
58+
placeholder: Tell us what you see!
59+
60+
- type: textarea
61+
id: logs
62+
label: Relevant log output
63+
description: If release, please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
64+
render: shell

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Bug report
3+
about: Help us improve RedisXANN by reporting a bug
4+
title: '[BUG]'
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
12+
A short description of the bug.
13+
14+
**To reproduce**
15+
16+
Steps to reproduce the behavior and/or a minimal code sample.
17+
18+
**Expected behavior**
19+
20+
A description of what you expected to happen.
21+
22+
**Additional information**
23+
24+
Any additional information that is relevant to the problem.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Crash report
3+
about: Submit a crash report
4+
title: '[CRASH]'
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Crash report**
11+
12+
Paste the complete crash log between the quotes below. Please include a few lines from the log preceding the crash report to provide some context.
13+
14+
```
15+
```
16+
17+
**Additional information**
18+
19+
1. OS distribution and version
20+
2. Steps to reproduce (if any)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Feature request
3+
about: Suggest a feature for RedisXANN
4+
title: '[NEW]'
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**The problem/use-case that the feature addresses**
11+
12+
A description of the problem that the feature will solve, or the use-case with which the feature will be used.
13+
14+
**Description of the feature**
15+
16+
A description of what you want to happen.
17+
18+
**Alternatives you've considered**
19+
20+
Any alternative solutions or features you've considered, including references to existing open and closed feature requests in this repository.
21+
22+
**Additional information**
23+
24+
Any additional information that is relevant to the feature request.

.github/ISSUE_TEMPLATE/other_stuff.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
name: Other
3+
about: Can't find the right issue type? Use this one!
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2+
version: 2
3+
updates:
4+
- package-ecosystem: "cargo"
5+
directory: "/" # Location of package manifests
6+
schedule:
7+
interval: "weekly"

.github/workflows/freebsd.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: freebsd
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: macos-12
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
- name: build
17+
uses: vmactions/[email protected]
18+
with:
19+
usesh: true
20+
sync: rsync
21+
copyback: false
22+
prepare: pkg install -y bash curl lang/rust devel/llvm-devel
23+
run: |
24+
cargo build --all --all-targets --verbose
25+
curl https://sh.rustup.rs -sSf > rustup.sh
26+
sh rustup.sh -y
27+
. $HOME/.cargo/env
28+
rustup target add i686-unknown-freebsd
29+
cargo build --all --all-targets --verbose --target i686-unknown-freebsd
30+
cargo test --all --all-targets --verbose

.github/workflows/macos.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: macos
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: macos-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Build
17+
run: cargo build --all --all-targets --verbose
18+
- name: Run tests
19+
run: cargo test --all --all-targets --verbose

rust/examples/vsstest.rs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,10 +315,24 @@ fn test_redis_info_version(ctx: &Context, _: Vec<RedisString>) -> RedisResult {
315315
Err(RedisError::Str("Error calling \"info server\""))
316316
}
317317

318+
#[cfg(not(test))]
319+
macro_rules! get_allocator {
320+
() => {
321+
redis_module::alloc::RedisAlloc
322+
};
323+
}
324+
325+
#[cfg(test)]
326+
macro_rules! get_allocator {
327+
() => {
328+
std::alloc::System
329+
};
330+
}
331+
318332
redis_module! {
319333
name: "vsstest",
320334
version: 1,
321-
allocator: (redis_module::alloc::RedisAlloc, redis_module::alloc::RedisAlloc),
335+
allocator: (get_allocator!(), get_allocator!()),
322336
data_types: [],
323337
commands: [
324338
["hnswlib.test", hnswlib_test, "", 0, 0, 0],

0 commit comments

Comments
 (0)