-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d8a5656
commit 4c78c99
Showing
18 changed files
with
2,153 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Test Java | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
CONDA_PREFIX: /usr/share/miniconda | ||
|
||
jobs: | ||
test: | ||
name: Build and test Java | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ "macos-latest", "windows-latest", "ubuntu-latest"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.7 | ||
- name: Add conda to system path | ||
run: | | ||
# $CONDA is an environment variable pointing to the root of the miniconda directory | ||
echo $CONDA/bin >> $GITHUB_PATH | ||
echo $CONDA | ||
- name: Install python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r build.requirements.txt | ||
- name: Maturin develop | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
maturin-version: latest | ||
command: develop | ||
args: --release | ||
- name: save bloom filter to file | ||
run: python py_tests/test_save_file.py | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '8' | ||
- run: chmod +x millw | ||
- run: ./millw fastbloomjvm.test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.10.12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import mill._, scalalib._, publish._ | ||
import mill.define.Sources | ||
import mill.scalalib.JavaModule | ||
import $ivy.`io.github.otavia-projects::mill-rust_mill$MILL_BIN_PLATFORM:0.2.1` | ||
import io.github.otavia.jni.plugin.RustJniModule | ||
|
||
object ProjectInfo { | ||
|
||
def description: String = "Some fast bloom filter implemented by Rust for Python and Java!" | ||
|
||
def organization: String = "io.github.yankun1992" | ||
|
||
def organizationUrl: String = "" | ||
|
||
def projectUrl: String = "" | ||
|
||
def licenses = Seq() | ||
|
||
def author = Seq("Yan Kun <yan_kun@icekredit.com>") | ||
|
||
def version = "0.5.5-SNAPSHOT" | ||
|
||
def buildTool = "mill" | ||
|
||
def buildToolVersion = mill.BuildInfo.millVersion | ||
|
||
} | ||
|
||
object fastbloomjvm extends RustJniModule with PublishModule { | ||
|
||
override def release: Boolean = true | ||
|
||
override def publishVersion: T[String] = ProjectInfo.version | ||
|
||
override def pomSettings: T[PomSettings] = PomSettings( | ||
description = ProjectInfo.description, | ||
organization = ProjectInfo.organization, | ||
url = "", | ||
licenses = ProjectInfo.licenses, | ||
versionControl = VersionControl(), | ||
developers = Seq(Developer("yan_kun", "Yan Kun", "", Some("icekredit"), Some(""))) | ||
) | ||
|
||
override def artifactName = "fastbloomjvm" | ||
|
||
override def artifactId = "fastbloom" | ||
|
||
override def ivyDeps = Agg(ivy"io.github.otavia-projects:jni-loader:0.2.1") | ||
|
||
object test extends Tests with TestModule.Junit4 { | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[package] | ||
name = "fastbloom" # generated by nativeInit with defaultNativeName | ||
version = "0.5.5" | ||
authors = ["Yan Kun <yan_kun_1992@foxmail.com>"] | ||
edition = "2021" | ||
|
||
[dependencies] | ||
jni = "0.21" | ||
fastbloom-rs = { path = "../../fastbloom-rs" } | ||
|
||
[lib] | ||
crate_type = ["cdylib"] |
Oops, something went wrong.