-
Notifications
You must be signed in to change notification settings - Fork 31
62 lines (53 loc) · 1.8 KB
/
java-r5rcore-build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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 21
uses: actions/setup-java@v3
with:
java-version: '21'
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