-
Notifications
You must be signed in to change notification settings - Fork 3
148 lines (133 loc) · 4.48 KB
/
ci-tests.yml
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# 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.
#
# See https://github.com/r-lib/actions/tree/master/examples#readme for
# additional example workflows available for the R community.
name: ci-tests
on:
push:
branches: [ "feature/google_bigquery_connector" ]
pull_request:
branches: [ "feature/google_bigquery_connector" ]
jobs:
build:
runs-on: ${{ matrix.config.os-name }}-${{ matrix.config.os-version }}
name: >-
${{ matrix.config.os-name }}-${{ matrix.config.os-version }}
R ${{ matrix.config.r-version}} - Java ${{ matrix.config.java}}
Spark ${{ matrix.config.spark }}
strategy:
fail-fast: false
matrix:
config:
- os-name: ubuntu
os-version: latest
java: 8
spark: 2.3
r-version: release
- os-name: ubuntu
os-version: "20.04"
java: 11
spark: 3.0
r-version: oldrel
- os-name: ubuntu
os-version: "22.04"
java: 17
spark: 3.5
r-version: devel
- os-name: macos
os-version: latest
java: 8
spark: 3.1
r-version: release
- os-name: macos
os-version: latest
java: 17
spark: 3.4
r-version: devel
- os-name: windows
os-version: latest
java: 8
spark: 2.4
r-version: oldrel
- os-name: windows
os-version: "2019"
java: 11
spark: 3.2
r-version: devel
- os-name: windows
os-version: "2022"
java: 17
spark: 3.3
r-version: release
env:
SPARK_VERSION: ${{ matrix.config.spark }}
BILLING_PROJECT_ID: ${{ secrets.GCLOUD_BILLING_PROJECT_ID }}
MATERIALIZATION_DATASET: test
GOOGLE_APPLICATION_CREDENTIALS: ${{ github.workspace }}/adc.json
steps:
- uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4.4.0
with:
distribution: 'zulu'
java-version: ${{ matrix.config.java }}
java-package: jdk
architecture: x64
- name: Print effective Java version
run: java -version
- name: Set up R ${{ matrix.r-version }}
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r-version }}
use-public-rspm: true
- name: Print effective R version
run: version
shell: Rscript {0}
- name: R CMD javareconf
if: runner.os != 'Windows'
run: |
java -version
echo java_home:$JAVA_HOME
echo library paths: $LD_LIBRARY_PATH
sudo R CMD javareconf JAVA_HOME=$JAVA_HOME
- name: Install and cache dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: ${{ matrix.config.java }}
extra-packages: |
any::rcmdcheck
- name: Install Spark
run: |
sparklyr::spark_install(version="${{ matrix.config.spark }}")
shell: Rscript {0}
- name: Set Google application default credentials
env:
ADC: ${{ secrets.GCLOUD_APPLICATION_CREDENTIALS }}
shell: bash
run: |
echo $ADC > $GOOGLE_APPLICATION_CREDENTIALS
- name: Run R CMD check
uses: r-lib/actions/check-r-package@v2
with:
error-on: '"error"'
check-dir: '"check"'
- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
with:
name: ${{ matrix.config.os-name }}${{matrix.config.os-version}}-Java${{ matrix.config.java }}-R${{ matrix.config.r-version }}-Spark${{ matrix.config.spark }}-results
path: |
check/sparkbq.Rcheck/
!check/sparkbq.Rcheck/00_pkg_src/
!adc.json
- name: Upload successfully built package
if: success()
uses: actions/upload-artifact@main
with:
name: ${{ matrix.config.os-name }}${{matrix.config.os-version}}-Java${{ matrix.config.java }}-R${{ matrix.config.r-version }}-Spark${{ matrix.config.spark }}-results
path: |
check/sparkbq_*.tar.gz
!adc.json