Skip to content

Commit

Permalink
Merge pull request #2 from PRL-PRG/fixup
Browse files Browse the repository at this point in the history
remove renjin, add CI, fix checks
  • Loading branch information
Jakobeha authored Jan 24, 2024
2 parents c55a9c6 + b9b5e66 commit 868c646
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 19 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# This workflow will test a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Java CI with Maven

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
verify-and-artifact:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: "21"
distribution: "temurin"
cache: maven
- name: Run tests and static analyses
run: mvn --batch-mode --update-snapshots verify
- run: mkdir staging && cp target/*.jar staging
- name: Upload snapshot as artifact
uses: actions/upload-artifact@v3
with:
name: snapshot
path: target/*-SNAPSHOT.jar
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- name: Update dependency graph
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6

verify-macos:
runs-on: macos-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: "21"
distribution: "temurin"
cache: maven
- name: Run tests and static analyses
run: mvn --batch-mode --update-snapshots verify
25 changes: 8 additions & 17 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>

<groupId>org.prlprg</groupId>
<artifactId>r-jit-server</artifactId>
<artifactId>r-compile-server</artifactId>
<version>0.1-SNAPSHOT</version>
<packaging>jar</packaging>

Expand All @@ -17,15 +17,6 @@
<pmdVersion>7.0.0-rc4</pmdVersion>
</properties>

<repositories>
<!-- renjin, R VM in Java -->
<repository>
<id>bedatadriven</id>
<name>bedatadriven public repo</name>
<url>https://nexus.bedatadriven.com/content/groups/public/</url>
</repository>
</repositories>

<dependencyManagement>
<dependencies>
<!-- JUnit5, unit tests -->
Expand All @@ -40,12 +31,6 @@
</dependencyManagement>

<dependencies>
<!-- renjin, R VM in Java -->
<dependency>
<groupId>org.renjin</groupId>
<artifactId>renjin-script-engine</artifactId>
<version>RELEASE</version>
</dependency>
<!-- ZeroMQ, socket communication -->
<dependency>
<groupId>org.zeromq</groupId>
Expand Down Expand Up @@ -166,7 +151,7 @@
<spaces>true</spaces>
<spacesPerTab>2</spacesPerTab>
</indent>
<jackson/>
<prettier/>
</yaml>
</configuration>
</plugin>
Expand Down Expand Up @@ -226,6 +211,12 @@
<version>${pmdVersion}</version>
</dependency>
</dependencies>
<!-- This prevents the warning "Unable to locate Source XRef to link to - DISABLED" -->
<!-- If we want source-links in the `site` pmd report we need to add jxr instead, -->
<!-- but IDEs display their own pmd report which already has source-links -->
<configuration>
<linkXRef>false</linkXRef>
</configuration>
</plugin>
<!-- JUnit5, unit test runner -->
<plugin>
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/org/prlprg/bc/Bc.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package org.prlprg.bc;

import com.google.common.collect.ImmutableList;
import org.renjin.sexp.SEXP;

// TODO: Remove stub with Sexp from branch `filip`
class Sexp {}

/** A complete R bytecode, consisting of a version, array of instructions and associated data, and constants. */
public record Bc(BcCode code, ImmutableList<SEXP> constants) {
public record Bc(BcCode code, ImmutableList<Sexp> constants) {
/**
* The only version of R bytecodes we support, which is also the latest version.
* The bytecode's version is denoted by the first integer in its code.
Expand Down

0 comments on commit 868c646

Please sign in to comment.