Skip to content

[OIL] Use mustache templates to build Java SDK + Add Java SDK build step to actions #5595

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Sep 13, 2024
39 changes: 39 additions & 0 deletions .github/workflows/generate-and-build-sdks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ jobs:
_build/install/default/xapi/sdk/go/*
!_build/install/default/xapi/sdk/go/dune

- name: Store Java SDK source
uses: actions/upload-artifact@v4
with:
name: SDK_Source_Java
path: _build/install/default/xapi/sdk/java/*

- name: Trim dune cache
run: opam exec -- dune cache trim --size=2GiB

Expand Down Expand Up @@ -84,6 +90,39 @@ jobs:
source/*
!source/src/*.o

build-java-sdk:
name: Build Java SDK
runs-on: ubuntu-latest
needs: generate-sdk-sources
steps:
- name: Install dependencies
run: sudo apt-get install maven

- name: Retrieve Java SDK source
uses: actions/download-artifact@v4
with:
name: SDK_Source_Java
path: source/

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

- name: Build Java SDK
shell: bash
run: |
xapi_version="${{ inputs.xapi_version }}"
xapi_version="${xapi_version//v/}"
mkdir -p target && mvn -f source/xen-api/pom.xml -B -Drevision=$xapi_version-prerelease clean package && mv source/xen-api/target/*.jar target/

- name: Store Java SDK
uses: actions/upload-artifact@v4
with:
name: SDK_Artifacts_Java
path: target/*

build-csharp-sdk:
name: Build C# SDK
runs-on: windows-2022
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ jobs:
name: SDK_Artifacts_C
path: libxenserver/usr/local/

- name: Retrieve Java SDK distribution artifacts
uses: actions/download-artifact@v4
with:
name: SDK_Artifacts_Java
path: dist/

- name: Retrieve C# SDK distribution artifacts
uses: actions/download-artifact@v4
with:
Expand Down
Loading
Loading