Skip to content

Commit

Permalink
chore: Added CI jobs. (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
amunra authored Jan 19, 2023
1 parent e60d71a commit 4204b2b
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
42 changes: 42 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: build
on: [push]

jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
java-version: 8
path-sep: ":"
- os: ubuntu-latest
java-version: 11
path-sep: ":"
- os: ubuntu-latest
java-version: 17
path-sep: ":"
- os: windows-latest
java-version: 11
path-sep: ";"
- os: macos-latest
java-version: 11
path-sep: ":"
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} + Java ${{ matrix.java-version }}
steps:
- name: Checkout repository
uses: actions/checkout@v3

# https://github.com/actions/setup-java
- name: Install Java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ matrix.java-version }}
cache: 'maven'

- name: Build with Maven
run: mvn package

- name: Runnig the example
run: java -cp "./rust-maven-example/target/rust-maven-example-1.0.0-SNAPSHOT.jar${{ matrix.path-sep }}./jar-jni/target/jar-jni-1.0.0-SNAPSHOT.jar" io.questdb.rust.maven.example.Main
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.logging.Log;

import java.io.File;
import java.util.HashMap;

public final class CargoInstalledChecker {
Expand Down Expand Up @@ -81,7 +82,7 @@ public synchronized void check(Log log, String cargoPath)
if (cargoPath.equals("cargo")) {
error
.append("Rust's `cargo` not found in PATH=")
.append(Shlex.quote(System.getenv("PATH")));
.append(Shlex.quote(String.join(File.pathSeparator, System.getenv("PATH"))));
} else {
error
.append("Rust's `cargo` not found at ")
Expand Down

0 comments on commit 4204b2b

Please sign in to comment.