5959 default : ' '
6060 required : False
6161
62+ # TODO: add inputs for upload/download of e2e binaries artifact
63+ # e2e_binaries_artifact:
64+ # type: string
65+ # default: ''
66+ # required: False
67+ # e2e_binaries_archive:
68+ # type: string
69+ # default: ''
70+ # required: False
71+ # e2e_binaries_decompress_command:
72+ # type: string
73+ # default: ''
74+ # required: False
75+
76+ # For e2e binary artifact upload
77+ upload_artifact :
78+ type : string
79+ default : ' false'
80+ artifact_suffix :
81+ type : string
82+ default : ' default'
83+ artifact_archive_name :
84+ type : string
85+ default : e2e_binaries.tar.zst
86+ # #########################################################################
87+
6288 reset_intel_gpu :
6389 type : string
6490 required : False
78104 default : ' false'
79105 required : False
80106
107+ # TODO: add outputs for upload of e2e binaries artifact
108+ outputs :
109+ run_conclusion :
110+ value : ${{ jobs.run.outputs.build_conclusion }}
111+ artifact_archive_name :
112+ value : ${{ jobs.run.outputs.artifact_archive_name }}
113+ artifact_decompress_command :
114+ value : ${{ jobs.run.outputs.artifact_decompress_command }}
115+ # #########################################################################
116+
81117 workflow_dispatch :
82118 inputs :
83119 runner :
142178 options :
143179 - false
144180 - true
181+ # TODO: e2e binary upload params
182+ upload_artifact :
183+ type : choice
184+ options :
185+ - " false"
186+ - " true"
187+ build_artifact_suffix :
188+ type : choice
189+ options :
190+ - " default"
191+ retention-days :
192+ type : choice
193+ options :
194+ - 3
195+ # ################################
145196
146197permissions :
147198 contents : read
@@ -154,10 +205,37 @@ jobs:
154205 container :
155206 image : ${{ inputs.image }}
156207 options : ${{ inputs.image_options }}
208+ # TODO: Add outputs for uploading e2e binaries
209+ outputs :
210+ run_conclusion : ${{ steps.run.conclusion }}
211+ artifact_archive_name : ${{ steps.artifact_info.outputs.ARCHIVE_NAME }}
212+ artifact_decompress_command : ${{ steps.artifact_info.outputs.DECOMPRESS }}
213+ # #########################################################################
157214 env : ${{ fromJSON(inputs.env) }}
158215 steps :
159216 # TODO: Deduce artifact archive params
160217 # NOTE: Only needs to run for build-only runs
218+ - name : Deduce artifact archive params
219+ if : inputs.upload_artifact == 'true'
220+ # To reduce number of inputs parameters that is limited for manual triggers.
221+ id : artifact_info
222+ run : |
223+ NAME="${{inputs.artifact_archive_name}}"
224+ if [ -z "$NAME" ]; then
225+ NAME=e2e_binaries.tar.zst
226+ fi
227+ echo ARCHIVE_NAME="$NAME" >> $GITHUB_OUTPUT
228+ if [ "${NAME}" != "${NAME%.tar.gz}" ]; then
229+ echo COMPRESS="gzip" >> $GITHUB_OUTPUT
230+ echo DECOMPRESS="gunzip" >> $GITHUB_OUTPUT
231+ elif [ "${NAME}" != "${NAME%.tar.zst}" ]; then
232+ echo COMPRESS="zstd -9" >> $GITHUB_OUTPUT
233+ echo DECOMPRESS="zstd" >> $GITHUB_OUTPUT
234+ else
235+ echo "Unsupported extension"
236+ exit 1
237+ fi
238+ # ###########################################################################
161239 - name : Reset Intel GPU
162240 if : inputs.reset_intel_gpu == 'true'
163241 run : |
@@ -381,6 +459,17 @@ jobs:
381459 grep 'exit code: [^0]' -r logs >> $GITHUB_STEP_SUMMARY
382460
383461 exit $ret
462+ # NOTE: Only should be ran on build-only runs
384463 # TODO: Pack E2E binaries
464+ - name : Pack toolchain
465+ if : ${{ always() && !cancelled() && inputs.upload_artifact == 'true'}}
466+ run : tar -I '${{ steps.artifact_info.outputs.COMPRESS }}' -cf ${{ steps.artifact_info.outputs.ARCHIVE_NAME }} -C ./build-e2e .
385467 # TODO: Upload E2e binaries
386- # NOTE: Only should be ran on build-only runs
468+ - name : Upload toolchain
469+ if : ${{ always() && !cancelled() && inputs.upload_artifact == 'true'}}
470+ uses : actions/upload-artifact@v4
471+ with :
472+ name : sycl_linux_${{ inputs.build_artifact_suffix }}
473+ path : ${{ steps.artifact_info.outputs.ARCHIVE_NAME }}
474+ retention-days : ${{ inputs.retention-days }}
475+ # ###########################################################################
0 commit comments