-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (64 loc) · 2.4 KB
/
build_windows.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
name: Windows
on:
push:
branches: [ master, '*-ci' ]
pull_request:
branches: [ master ]
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
jobs:
build_windows:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: ["windows-latest"]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8
- name: Build Zserio Java Service Rmi
run: |
# download the latest zserio version
mvn dependency:copy -Dmaven.repo.local="build/download" \
-Dartifact=io.github.ndsev:zserio:LATEST \
-DoutputDirectory="build" -Dmdep.stripVersion=true
# download the latest zserio runtime version
mvn dependency:copy -Dmaven.repo.local="build/download" \
-Dartifact=io.github.ndsev:zserio-runtime:LATEST \
-DoutputDirectory="build" -Dmdep.stripVersion=true
# generate example using Zserio
java -jar build/zserio.jar \
-src examples/zserio/service/rmi/examples/calculator calculator.zs -java build \
-setTopLevelPackage rmi.examples.calculator.gen
# compile example
javac -d build -cp build/zserio-runtime.jar \
src/zserio/service/rmi/*.java \
examples/zserio/service/rmi/examples/calculator/*.java \
build/rmi/examples/calculator/gen/calculator/*.java
shell: bash
- name: Test Zserio Java Service Rmi
run: |
SERVICE_CLASSPATH="build/zserio-runtime.jar;build"
java -cp "${SERVICE_CLASSPATH}" zserio.service.rmi.examples.calculator.CalculatorServer &
sleep 10
{ echo "p"; sleep 1; echo "100"; sleep 1; echo "q"; } | java -cp "${SERVICE_CLASSPATH}" \
zserio.service.rmi.examples.calculator.CalculatorClient | grep "10000"
{ echo "s"; sleep 1; echo "100"; sleep 1; echo "q"; } | java -cp "${SERVICE_CLASSPATH}" \
zserio.service.rmi.examples.calculator.CalculatorClient | grep "10.0"
kill $(jobs -p)
shell: bash
- name: Archive Zserio Java Service Rmi classes
uses: actions/upload-artifact@v3
with:
name: zserio-service-rmi-java-${{matrix.os}}
path: |
build/rmi/**/*.class
build/zserio/**/*.class
build/*.jar