@@ -45,10 +45,6 @@ description: 'Build GraalVM and set up environment for testing'
4545on :
4646 workflow_call :
4747 inputs :
48- env :
49- description : ' Internal env name for build'
50- required : false
51- type : string
5248 dynamic-imports :
5349 default : ' /substratevm'
5450 description : ' Internal dynamic imports for build'
6460 description : ' Internal GraalVM components to build'
6561 required : false
6662 type : string
63+ outputs :
64+ graalvm-home :
65+ description : " The path of the archived GRAALVM_HOME directory"
66+ value : ${{ jobs.build_from_source.outputs.graalvm-home }}
67+ graalvm-artifact-name :
68+ description : " The name of the GraalVM artifact"
69+ value : ${{ jobs.build_from_source.outputs.graalvm-graalvm-artifact-name }}
70+ graalvm-artifact-file-name :
71+ description : " The file name of the GraalVM artifact"
72+ value : ${{ jobs.build_from_source.outputs.graalvm-graalvm-artifact-file-name }}
6773 # Enable manual dispatch of the workflow
6874 # see https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
6975 workflow_dispatch :
7278 build_from_source :
7379 name : Build GraalVM
7480 runs-on : ubuntu-22.04
81+ outputs :
82+ graalvm-home : ${{ steps.set_outputs.outputs.graalvm-home }}
83+ graalvm-artifact-name : ${{ steps.set_outputs.outputs.graalvm-artifact-name }}
7584 steps :
7685 - name : Checkout oracle/graal
7786 uses : actions/checkout@v4
8695 echo "MX_VERSION=$(jq -r '.mx_version' common.json)" >> ${GITHUB_ENV}
8796 # Workaround testsuite locale issue
8897 echo "LANG=en_US.UTF-8" >> ${GITHUB_ENV}
98+ - name : Set workflow outputs
99+ id : set_outputs
100+ shell : bash
101+ run : |
102+ echo "graalvm-home=$(basename ${GRAALVM_HOME})" >> $GITHUB_OUTPUT
103+ echo "graalvm-artifact-name=graalvm" >> $GITHUB_OUTPUT
104+ echo "graalvm-artifact-file-name=graalvm.tgz" >> $GITHUB_OUTPUT
89105 - name : Checkout graalvm/mx
90106 uses : actions/checkout@v6
91107 with :
@@ -105,16 +121,12 @@ jobs:
105121 shell : bash
106122 run : |
107123 cd vm
108- MX_ARGS=("--java-home" "${JAVA_HOME}")
109- if [ -n "${{ inputs.env }}" ]; then
110- MX_ARGS+=("--env" "${{ inputs.env }}")
111- else
112- MX_ARGS+=(
113- "--dy" "${{ inputs.dynamic-imports }}"
114- "--native-images=${{ inputs.native-images }}"
115- "--components=${{ inputs.components }}"
116- )
117- fi
124+ MX_ARGS=(
125+ "--java-home" "${JAVA_HOME}"
126+ "--dy" "${{ inputs.dynamic-imports }}"
127+ "--native-images=${{ inputs.native-images }}"
128+ "--components=${{ inputs.components }}"
129+ )
118130 ${MX_PATH}/mx "${MX_ARGS[@]}" build
119131 ln -s $(${MX_PATH}/mx "${MX_ARGS[@]}" graalvm-home) ${GRAALVM_HOME}
120132 - name : Show GraalVM version info
@@ -135,6 +147,6 @@ jobs:
135147 - name : Upload GraalVM archive as artifact
136148 uses : actions/upload-artifact@v4
137149 with :
138- name : graalvm
139- path : graalvm.tgz
150+ name : ${{ steps.set_outputs.outputs. graalvm-artifact-name }}
151+ path : ${{ steps.set_outputs.outputs.graalvm-artifact-file-name }}
140152
0 commit comments