mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-04 23:59:56 +00:00
* add c-api test for package * fix bug for running c-api test for package * refine run application script * remove redundant code * include CUDA test * Remove testing CUDA EP temporarily * fix bug * Code refactor * try to fix YAML bug * try to fix YAML bug * try to fix YAML bug * fix bug for multiple directories in Pipelines * fix bug * add comments and fix bug * Update c-api-noopenmp-packaging-pipelines.yml * Remove failOnStandardError flag in Pipelines
41 lines
1.7 KiB
YAML
41 lines
1.7 KiB
YAML
# Sets version number from VERSION.txt into a variable. As well as the git commit hash.
|
|
parameters:
|
|
versionFileDirectory: "$(Build.SourcesDirectory)"
|
|
workingDirectory: "$(Build.SourcesDirectory)"
|
|
|
|
|
|
steps:
|
|
- task: CmdLine@2
|
|
displayName: 'Set Version Number variables for Windows'
|
|
inputs:
|
|
script: |
|
|
SETLOCAL EnableDelayedExpansion
|
|
set /p _OnnxRuntimeVersion=<${{parameters.versionFileDirectory}}\VERSION_NUMBER
|
|
@echo ##vso[task.setvariable variable=OnnxRuntimeVersion;]%_OnnxRuntimeVersion%
|
|
|
|
FOR /F "tokens=* USEBACKQ" %%F IN (`git rev-parse HEAD`) DO (
|
|
@echo ##vso[task.setvariable variable=OnnxRuntimeGitCommitHash;]%%F
|
|
)
|
|
|
|
FOR /F "tokens=* USEBACKQ" %%F IN (`git rev-parse --short HEAD`) DO (
|
|
@echo ##vso[task.setvariable variable=OnnxRuntimeGitCommitHashShort;]%%F
|
|
)
|
|
|
|
workingDirectory: ${{parameters.workingDirectory}}
|
|
condition: eq(variables['Agent.OS'], 'Windows_NT')
|
|
|
|
- task: CmdLine@2
|
|
displayName: 'Set version number variables for Unix'
|
|
inputs:
|
|
script: |
|
|
_OnnxRuntimeVersion=$(head -1 ${{parameters.versionFileDirectory}}/VERSION_NUMBER)
|
|
echo "##vso[task.setvariable variable=OnnxRuntimeVersion;]$_OnnxRuntimeVersion"
|
|
|
|
_OnnxRuntimeGitCommitHash=$(git rev-parse HEAD)
|
|
echo "##vso[task.setvariable variable=OnnxRuntimeGitCommitHash;]$_OnnxRuntimeGitCommitHash"
|
|
|
|
_OnnxRuntimeGitCommitHash=$(git rev-parse --short=8 HEAD)
|
|
echo "##vso[task.setvariable variable=OnnxRuntimeGitCommitHashShort;]$_OnnxRuntimeGitCommitHash"
|
|
|
|
workingDirectory: ${{parameters.workingDirectory}}
|
|
condition: not(eq(variables['Agent.OS'], 'Windows_NT'))
|