Skip to content

Adding github actions. #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
@@ -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
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
------------------------
Expand Down Expand Up @@ -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:
Expand Down
3 changes: 1 addition & 2 deletions example.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 13 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>11</source>
<target>11</target>
</configuration>
<executions>
<execution>
<id>default-compile</id>
Expand All @@ -76,18 +80,19 @@
<exclude>me/lemire/integercompression/vector/*</exclude>
<exclude>module-info.java</exclude>
</excludes>
</configuration>
</execution>
<execution>
</configuration>
</execution>
<!-- The vector module will be enabled when JDK19+ is LTE, currently only for advanced users. -->
<!--<execution>
<id>vector-fastpfor</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<configuration>
<release>19</release>
</configuration>
</execution>
</configuration>
</execution> -->
</executions>
</plugin>
<plugin>
Expand Down Expand Up @@ -127,9 +132,9 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.0</version>
<version>3.4.1</version>
<configuration>
<excludePackageNames>com.kamikaze.pfordelta:me.lemire.integercompression.benchmarktools</excludePackageNames>
<excludePackageNames>me.lemire.integercompression.vector;com.kamikaze.pfordelta:me.lemire.integercompression.benchmarktools</excludePackageNames>
</configuration>
<executions>
<execution>
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}