Skip to content
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

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 @@ -44,6 +44,12 @@ jobs:
name: SDK_Source_PowerShell
path: _build/install/default/xapi/sdk/powershell/*

- 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 @@ -73,6 +79,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 11
uses: actions/setup-java@v4
with:
java-version: '11'
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 -Dmaven.source.skip=true -Dmaven.javadoc.skip=true 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 @@ -58,6 +58,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/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will you add the package and release steps in following code in future?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

files are indeed packaged with the release. see further down on line 105, where we store everything in dist/*

[...]
gh release create ${{ github.ref_name }} --repo ${{ github.repository }} --generate-notes dist/* \

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also if you're curious here's an example release:

https://github.com/danilo-delbusso/xen-api/releases/tag/v60.1.3

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