-
Notifications
You must be signed in to change notification settings - Fork 4
226 lines (222 loc) · 8.84 KB
/
test-case-studies.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
226
---
name: "Testing known case studies"
on:
push:
branches:
- "master"
- "develop"
concurrency:
group: Testing known case studies
cancel-in-progress: true
jobs:
build-and-test:
strategy:
matrix:
jabba_jdk: [temurin@17, amazon-corretto@17, zulu@17, microsoft@17]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build java
run: |
sudo apt-get update
sudo apt-get install -y curl bash build-essential libssl-dev pkg-config dos2unix mingw-w64 musl-dev musl-tools dos2unix
cd ${{ github.workspace }}
# for whatever reason, for the moment nothing seems to work except an extreme manual approach.
# this should be corrected later when misterious external errors stop happening
wget -c https://github.com/Jabba-Team/jabba/releases/download/0.13.0/jabba-0.13.0-linux-amd64 -O ./jabba-linux-amd64
chmod +x jabba-linux-amd64
./jabba-linux-amd64 install ${{ matrix.jabba_jdk }} -o /opt/jdk
export JAVA_HOME=/opt/jdk
export PATH=$PATH:$JAVA_HOME/bin
dos2unix ./gradlew # make sure that gradlew is not with CRLF
./gradlew publishModules
curl -fL "https://github.com/coursier/launchers/raw/master/cs-x86_64-pc-linux-static.gz" | gzip -d > cs
chmod +x ./cs
./cs setup --yes
sbt publishModules
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y
source "$HOME/.cargo/env"
cargo build --release
cp ./target/release/idesyde-orchestration idesyde
python -m pip install robotframework
python -m robot --loglevel DEBUG --exclude slow TestsBenchmark.robot
- uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: test case logs
path: |
log.html
report.html
# - name: Cache-out java imodules
# uses: actions/cache@v3
# with:
# path: ${{ github.workspace }}/imodules
# key: java-imodules-${{ github.ref }}-${{ matrix.jabba_jdk }}
# - name: Cache-out java emodules
# uses: actions/cache@v3
# with:
# path: ${{ github.workspace }}/emodules
# key: java-emodules-${{ github.ref }}-${{ matrix.jabba_jdk }}
# build-scala:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Build scala
# run: |
# sudo apt-get update
# sudo apt-get install -y curl bash build-essential libssl-dev pkg-config dos2unix
# cd ${{ github.workspace }}
# - name: Cache-out scala imodules
# uses: actions/cache@v3
# with:
# path: ${{ github.workspace }}/imodules
# key: scala-imodules-${{ github.ref }}
# - name: Cache-out scala emodules
# uses: actions/cache@v3
# with:
# path: ${{ github.workspace }}/emodules
# key: scala-emodules-${{ github.ref }}
# build-rust:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Build rust
# run: |
# sudo apt-get update
# sudo apt-get install -y curl bash build-essential libssl-dev pkg-config mingw-w64 musl-dev musl-tools
# cd ${{ github.workspace }}
# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y
# source "$HOME/.cargo/env"
# cargo build --release
# cp ./target/release/idesyde-orchestration idesyde
# - name: Cache-out rust
# uses: actions/cache@v3
# with:
# path: ${{ github.workspace }}/idesyde
# key: idesyde-${{ github.ref }}
# test-on-linux:
# strategy:
# matrix:
# jabba_jdk: [temurin@17, amazon-corretto@17, zulu@17, microsoft@17]
# runs-on: ubuntu-latest
# needs: [build-java, build-scala, build-rust]
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-python@v4
# with:
# python-version: '3.10'
# - name: Cache-in java imodules
# uses: actions/cache@v3
# with:
# path: ${{ github.workspace }}/java-imodules
# key: java-imodules-${{ github.ref }}-${{ matrix.jabba_jdk }}
# restore-keys: |
# java-imodules-${{ github.ref }}-
# java-imodules-
# - name: Cache-in java emodules
# uses: actions/cache@v3
# with:
# path: ${{ github.workspace }}/java-emodules
# key: java-emodules-${{ github.ref }}-${{ matrix.jabba_jdk }}
# restore-keys: |
# java-emodules-${{ github.ref }}-
# java-emodules-
# - name: Cache-in scala imodules
# uses: actions/cache@v3
# with:
# path: ${{ github.workspace }}/scala-imodules
# key: scala-imodules-${{ github.ref }}
# restore-keys: |
# scala-imodules-
# - name: Cache-in scala emodules
# uses: actions/cache@v3
# with:
# path: ${{ github.workspace }}/scala-emodules
# key: scala-emodules-${{ github.ref }}
# restore-keys: |
# scala-emodules-
# - name: Cache-in rust
# uses: actions/cache@v3
# with:
# path: ${{ github.workspace }}/idesyde
# key: idesyde-${{ github.ref }}
# - name: Build and Test cases
# continue-on-error: true
# run: |
# sudo apt-get update
# sudo apt-get install -y curl bash build-essential libssl-dev pkg-config mingw-w64 musl-dev musl-tools dos2unix
# cd ${{ github.workspace }}
# mkdir -p imodules
# mkdir -p emodules
# cp -r java-imodules/* imodules/
# cp -r scala-imodules/* imodules/
# cp -r java-emodules/* emodules/
# cp -r scala-emodules/* emodules/
# python -m pip install robotframework
# python -m robot --exclude slow TestsBenchmark.robot
# - name: Upload Robot Log
# uses: actions/upload-artifact@v3
# with:
# name: test-build-log-${{ github.ref }}.html
# path: log.html
# - name: Cache-out outputs
# uses: actions/cache@v3
# with:
# enableCrossOsArchive: true
# path: ${{ github.workspace }}/dist
# key: dist-${{ github.ref }}-${{ matrix.jabba_jdk }}
# test-cases-linux:
# strategy:
# matrix:
# jabba_jdk: [temurin@17, amazon-corretto@17, zulu@17, microsoft@17]
# target: [x86_64-unknown-linux-musl]
# runs-on: ubuntu-latest
# needs: build-on-linux
# steps:
# - uses: actions/checkout@v3
# - name: Cache-in outputs
# uses: actions/cache@v3
# with:
# enableCrossOsArchive: true
# path: ${{ github.workspace }}/dist
# dist- key: ${{ github.ref }}-${{ matrix.jabba_jdk }}
# - uses: actions/setup-python@v4
# with:
# python-version: '3.10'
# - run: |
# cd ${{ github.workspace }}
# cp -r ${{ github.workspace }}/dist/x86_64-unknown-linux-musl/* .
# mkdir -p /opt/jdk
# curl -sL https://github.com/Jabba-Team/jabba/raw/main/install.sh | JABBA_COMMAND="install ${{ matrix.jabba_jdk }} -o /opt/jdk" bash
# export JAVA_HOME=/opt/jdk
# export PATH="$JAVA_HOME/bin:$PATH"
# python -m pip install robotframework
# python -m robot --exclude slow TestsBenchmark.robot
# test-cases-win:
# strategy:
# matrix:
# jabba_jdk: [temurin@17, amazon-corretto@17, zulu@17, microsoft@17]
# runs-on: windows-latest
# needs: build-on-linux
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-python@v4
# with:
# python-version: '3.10'
# - name: Cache-in outputs
# uses: actions/cache@v3
# with:
# enableCrossOsArchive: true
# path: ${{ github.workspace }}/dist
# dist- key: ${{ github.ref }}-${{ matrix.jabba_jdk }}
# - run: |
# cd ${{ github.workspace }}
# cp -r ${{ github.workspace }}/dist/x86_64-pc-windows-gnu/* .
# [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
# Invoke-Expression (
# Invoke-WebRequest https://github.com/Jabba-Team/jabba/raw/master/install.ps1 -UseBasicParsing
# ).Content
# jabba install ${{ matrix.jabba_jdk }}
# jabba alias default ${{ matrix.jabba_jdk }}
# python -m pip install robotframework
# python -m robot --exclude slow TestsBenchmark.robot