-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
152 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: Linux | ||
|
||
on: | ||
push: | ||
branches: [ master, '*-ci' ] | ||
pull_request: | ||
branches: [ master ] | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 0 * * 0' | ||
|
||
jobs: | ||
build_linux: | ||
runs-on: ${{matrix.os}} | ||
strategy: | ||
matrix: | ||
os: ["ubuntu-20.04", "ubuntu-22.04"] | ||
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 | ||
- 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) | ||
- name: Archive Zserio Java Service Rmi classes | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: zserio-service-rest-java-${{matrix.os}} | ||
path: | | ||
build/rmi/**/*.class | ||
build/zserio/**/*.class | ||
build/*.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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-rest-java-${{matrix.os}} | ||
path: | | ||
build/rmi/**/*.class | ||
build/zserio/**/*.class | ||
build/*.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters