diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml new file mode 100644 index 0000000..cb3e3e8 --- /dev/null +++ b/.github/workflows/basic.yml @@ -0,0 +1,24 @@ +name: Java CI + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [ 11, 16 ] + steps: + - uses: actions/checkout@v2 + - name: Set up JDK + uses: actions/setup-java@v2.5.0 + with: + java-version: ${{ matrix.java }} + distribution: 'adopt' + - name: Build and test with Maven + run: mvn package + - name: Build example + run: javac -cp target/classes/:. example.java + - name: Run example + run: java -cp target/classes/:. example \ No newline at end of file diff --git a/README.md b/README.md index 05800b6..c421a00 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,8 @@ Most others do not. The Java Team at Intel (R) introduced the vector implementation for FastPFOR based on the Java Vector API that showed significant gains over the non-vectorized implementation. For an example usage, see -examples/vector/Example.java. The feature requires JDK 19+. +examples/vector/Example.java. The feature requires JDK 19+ and is currently for +advanced users. Maven central repository ------------------------ @@ -166,21 +167,22 @@ Speed is always reported in millions of integers per second. For Maven users --------------- -If you are running JDK 19+ +The current development versions assume JDK 11 or better. ``` mvn compile +mvn exec:java ``` -If you are running earlier versions of JDK +You may run our examples as follows: +```` +mvn package +javac -cp target/classes/:. example.java +java -cp target/classes/:. example ``` -mvn compiler:compile@default-compile -``` - -mvn exec:java -For ant users +For ant users (legacy, currently untested) ------------- If you use Apache ant, please try this: diff --git a/example.java b/example.java index 6569ebd..817e94f 100644 --- a/example.java +++ b/example.java @@ -88,8 +88,7 @@ public static void basicExample() { /** * Like the basicExample, but we store the input array size manually. */ - @Test - public void basicExampleHeadless() { + public static void basicExampleHeadless() { int[] data = new int[2342351]; System.out.println("Compressing " + data.length + " integers in one go using the headless approach"); // data should be sorted for best diff --git a/pom.xml b/pom.xml index 855aa92..fc6912b 100644 --- a/pom.xml +++ b/pom.xml @@ -64,6 +64,10 @@ org.apache.maven.plugins maven-compiler-plugin 3.8.0 + + 11 + 11 + default-compile @@ -76,18 +80,19 @@ me/lemire/integercompression/vector/* module-info.java - - - + + + + @@ -127,9 +132,9 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.0.0 + 3.4.1 - com.kamikaze.pfordelta:me.lemire.integercompression.benchmarktools + me.lemire.integercompression.vector;com.kamikaze.pfordelta:me.lemire.integercompression.benchmarktools diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java index 14e4c1c..d2a749c 100644 --- a/src/main/java/module-info.java +++ b/src/main/java/module-info.java @@ -2,7 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 module me.lemire.integercompression { - requires jdk.incubator.vector; + // This is currently only for advanced users: + // requires jdk.incubator.vector; exports me.lemire.integercompression; exports me.lemire.integercompression.vector; }