-
Notifications
You must be signed in to change notification settings - Fork 2
225 lines (222 loc) · 7.18 KB
/
use.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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
name: use
on:
push:
branches: [ master ]
tags: [ 'v*.*' ]
pull_request:
branches: [ master ]
jobs:
test-Main:
strategy:
fail-fast: true
matrix:
os: [ ubuntu-latest , windows-latest, macos-latest ]
java: [ 11 ]
Rserver: [ Renjin ]
env:
NO_TEST_JAVA: 1
#NO_TEST_MAIN: 1
#NO_TEST_ISSUES: 1
NO_TEST_R: 1
NO_TEST_PYTHON: 1
NO_TEST_BASH: 1
NO_TEST_CMD: 1
#NO_CALCULATORS: 1
R_SERVER: ${{ matrix.Rserver }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
java-package: jdk
- uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'
- if: matrix.os == 'macos-latest'
run: |
ln -s /Library/Frameworks/R.framework/Versions/3.6 /Library/Frameworks/R.framework/Versions/3.5
echo "/Library/Frameworks/R.framework/Resources/bin" >> $GITHUB_PATH
- run: sudo R CMD javareconf
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
- run: Rscript -e "install.packages('rJava',repos = 'https://cloud.r-project.org')"
shell: bash
- run: |
WD=$PWD
cd ..
git clone https://github.com/Funz/funz-profile
git clone https://github.com/Funz/funz-core
cd funz-core
ant clean dist
cd ..
cd $WD
ant dist # required by funz-calculator/dist-test
cd ..
git clone https://github.com/Funz/funz-calculator
cd funz-calculator
ant clean dist-test
cd ..
cd $WD
shell: bash
- run: echo "R.server=$R_SERVER" > Funz.conf
shell: bash
- run: |
ant -noinput -buildfile build.xml test
if [ ${{ matrix.os }} = 'windows-latest' ]; then taskkill //F //IM java.exe || echo "no java"; else killall java || echo "no java"; fi
shell: bash
id: anttest
continue-on-error: true
timeout-minutes: 60
- if: steps.anttest.outcome != 'success'
uses: actions/upload-artifact@v2
with:
name: artifacts-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.Rserver }}-Main
path: |
*.txt
*.log
*.out
*.Rout
- if: matrix.os == 'ubuntu-latest' && steps.anttest.outcome != 'success'
run: sudo apt-get -y install imagemagick
- if: steps.anttest.outcome != 'success'
uses: OrbitalOwen/desktop-screenshot-action@0.1
with:
file-name: 'test-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.Rserver }}-Main.jpg'
- if: steps.anttest.outcome != 'success' && matrix.os != 'windows-latest'
run: ps aux
- if: steps.anttest.outcome != 'success' && matrix.os == 'windows-latest'
run: tasklist /V
- if: steps.anttest.outcome != 'success'
run: exit 1
test-FunzCLI:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest , windows-latest, macos-latest ]
java: [ 11 ]
Rserver: [ R2js ]
CLI: [ R, Python, Bash, Cmd ]
exclude:
- os: ubuntu-latest
CLI: Cmd
- os: macos-latest
CLI: Cmd
- os: windows-latest
CLI: Bash
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
NO_TEST_JAVA: 1
NO_TEST_MAIN: 1
NO_TEST_ISSUES: 1
#NO_TEST_R: 1
#NO_TEST_PYTHON: 1
#NO_TEST_BASH: 1
#NO_TEST_CMD: 1
#NO_CALCULATORS: 1
R_SERVER: ${{ matrix.Rserver }}
runs-on: ${{ matrix.os }}
steps:
- run: |
#echo '::set-env name=NO_TEST_R::1'
echo '::set-env name=NO_TEST_PYTHON::1'
echo '::set-env name=NO_TEST_BASH::1'
echo '::set-env name=NO_TEST_CMD::1'
shell: bash
if: matrix.CLI == 'R'
- run: |
echo '::set-env name=NO_TEST_R::1'
#echo '::set-env name=NO_TEST_PYTHON::1'
echo '::set-env name=NO_TEST_BASH::1'
echo '::set-env name=NO_TEST_CMD::1'
shell: bash
if: matrix.CLI == 'Python'
- run: |
echo '::set-env name=NO_TEST_R::1'
echo '::set-env name=NO_TEST_PYTHON::1'
#echo '::set-env name=NO_TEST_BASH::1'
echo '::set-env name=NO_TEST_CMD::1'
shell: bash
if: matrix.CLI == 'Bash'
- run: |
echo '::set-env name=NO_TEST_R::1'
echo '::set-env name=NO_TEST_PYTHON::1'
echo '::set-env name=NO_TEST_BASH::1'
#echo '::set-env name=NO_TEST_CMD::1'
shell: bash
if: matrix.CLI == 'Cmd'
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
java-package: jdk
- uses: r-lib/actions/setup-r@v2
with:
r-version: release
- if: matrix.os == 'macos-latest'
run: |
ln -s /Library/Frameworks/R.framework/Versions/3.6 /Library/Frameworks/R.framework/Versions/3.5
echo "/Library/Frameworks/R.framework/Resources/bin" >> $GITHUB_PATH
- run: sudo R CMD javareconf
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
- run: Rscript -e "install.packages('rJava',repos = 'https://cloud.r-project.org')"
if: env.NO_TEST_R != 1
- uses: actions/setup-python@v2
with:
python-version: 3.9
if: env.NO_TEST_PYTHON != 1
- run: |
python -m pip install --upgrade pip
pip install py4j==0.10.8.1
pip install numpy
if: env.NO_TEST_PYTHON != 1
- if: matrix.os == 'windows-latest' && env.NO_TEST_PYTHON != 1
run: |
python -m venv venv3
venv3/Scripts/Activate.ps1
- run: |
WD=$PWD
cd ..
git clone https://github.com/Funz/funz-profile
git clone https://github.com/Funz/funz-core
cd funz-core
ant clean dist
cd ..
cd $WD
ant dist # required by funz-calculator/dist-test
cd ..
git clone https://github.com/Funz/funz-calculator
cd funz-calculator
ant clean dist-test
cd ..
cd $WD
shell: bash
- run: echo "R.server=$R_SERVER" > Funz.conf
shell: bash
- run: |
ant -noinput -buildfile build.xml test
if [ ${{ matrix.os }} = 'windows-latest' ]; then taskkill //F //IM "java.exe" || echo "no java"; else killall java || echo "no java"; fi
shell: bash
id: anttest
continue-on-error: true
timeout-minutes: 60
- if: steps.anttest.outcome != 'success'
uses: actions/upload-artifact@v2
with:
name: artifacts-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.Rserver }}-${{ matrix.CLI }}
path: |
*.txt
*.log
*.out
*.Rout
- if: matrix.os == 'ubuntu-latest' && steps.anttest.outcome != 'success'
run: sudo apt-get -y install imagemagick
- if: steps.anttest.outcome != 'success'
uses: OrbitalOwen/desktop-screenshot-action@0.1
with:
file-name: 'test-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.Rserver }}-${{ matrix.CLI }}.jpg'
- if: steps.anttest.outcome != 'success' && matrix.os != 'windows-latest'
run: ps aux
- if: steps.anttest.outcome != 'success' && matrix.os == 'windows-latest'
run: tasklist /V
- if: steps.anttest.outcome != 'success'
run: exit 1