Skip to content

Commit

Permalink
Merge pull request #5595 from danilo-delbusso/oil/java
Browse files Browse the repository at this point in the history
[OIL] Use mustache templates to build Java SDK + Add Java SDK build step to actions
  • Loading branch information
kc284 authored Sep 13, 2024
2 parents eda6239 + 9466a7e commit 373672b
Show file tree
Hide file tree
Showing 5 changed files with 1,022 additions and 843 deletions.
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

0 comments on commit 373672b

Please sign in to comment.