-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/ipeaGIT/r5r
- Loading branch information
Showing
42 changed files
with
731 additions
and
340 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,62 @@ | ||
name: Java R5RCore build | ||
|
||
on: | ||
push: | ||
paths: | ||
- java-r5rcore/** | ||
- .github/workflows/java-r5rcore-build.yaml | ||
|
||
jobs: | ||
build: | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
|
||
runs-on: ubuntu-latest | ||
|
||
# don't build on merges to master | ||
if: ${{ !github.ref_protected }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up R | ||
uses: r-lib/actions/setup-r@v2 | ||
with: | ||
use-public-rspm: true | ||
|
||
- name: Install R packages | ||
run: | | ||
install.packages(c('devtools', 'remotes')) | ||
remotes::install_deps(dependencies = TRUE) | ||
shell: Rscript {0} | ||
working-directory: r-package | ||
|
||
- name: Install system dependencies | ||
run: | | ||
while read -r cmd | ||
do | ||
eval sudo $cmd | ||
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))') | ||
working-directory: r-package | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
- name: Validate Gradle wrapper | ||
uses: gradle/wrapper-validation-action@ccb4328a959376b642e027874838f60f8e596de3 | ||
- name: Build with Gradle | ||
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 | ||
with: | ||
arguments: build | ||
build-root-directory: java-r5rcore | ||
|
||
- name: Create pull request | ||
# https://github.com/actions/checkout/pull/1184 | ||
run: | | ||
git config user.name "github-actions[bot]" | ||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
mv java-r5rcore/build/libs/java-r5rcore-*.jar r-package/inst/jar/r5r.jar | ||
git add r-package/inst/jar/r5r.jar | ||
git commit -m "Rebuild JAR for commit ${GITHUB_SHA}" | ||
git push |
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,3 @@ | ||
.idea | ||
.gradle | ||
build |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
...r5rcore/.idea/artifacts/r5r_1_0_0_jar.xml → ...r5rcore/.idea/artifacts/r5r_1_1_0_jar.xml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
java-r5rcore/.idea/libraries/r5_v6_8_all.xml → java-r5rcore/.idea/libraries/r5_v6_9_all.xml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,37 @@ | ||
plugins { | ||
id 'java' | ||
} | ||
|
||
group 'org.ipea' | ||
version '1.0.2-SNAPSHOT' | ||
|
||
// Build against the version of R5 that the current r5r download_r5 function will | ||
// grab | ||
def baos = new ByteArrayOutputStream() | ||
exec { | ||
commandLine 'R', '--no-save', '-q', '-s', '-e', 'setwd("../r-package"); devtools::load_all(quiet=T); cat(download_r5());' | ||
standardOutput = baos | ||
} | ||
def r5Path = baos.toString() | ||
|
||
def rjava_baos = new ByteArrayOutputStream() | ||
exec { | ||
commandLine 'R', '--no-save', '-q', '-s', '-e', 'cat(system.file("jri/JRI.jar", package="rJava"))' | ||
standardOutput = rjava_baos | ||
} | ||
def rJavaPath = rjava_baos.toString() | ||
|
||
println(rJavaPath) | ||
|
||
sourceSets { | ||
main { | ||
java { | ||
srcDirs = ['src'] | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation files(r5Path) | ||
implementation files(rJavaPath) | ||
} |
Binary file not shown.
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,6 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip | ||
networkTimeout=10000 | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.