在根文件夹中上一级添加工件

ZZZSharePoint

我有一个名为 onnxruntime.dll 的工件,它是从管道下载的,它的文件夹结构就像这样 MyProject_x64_windows/bin/Nodes/onnxruntime.dll 。我希望在一个级别上下载这个工件,即 MyProject_x64_windows/bin/onnxruntime.dll

我不确定它是如何在那个级别下载的,我该如何解决这个问题。我无法复制完整的 YAML,但提供了我认为需要的:

  variables:
  IppRoot:        $(Build.SourcesDirectory)/packages/IPP  
  ONNXXRoot:       $(Build.SourcesDirectory)/packages/ONNXRuntime
  
  - stage: MyProject

    jobs:
      
      - job: MyProject_Build
        strategy:
          matrix:
            win:
              imageName:            'windows-2019'
              OrzRootSuffix:        'x64-windows-staticlib'
              osSuffix:             'windows'
              LibFT4222Suffix:      'windows'
              matlabVersion:        '9.6.0-2'
              extraCmakeOptions:    '-D MyProject_ONNX_SUPPORT=On
                                    -D ONNX_RUNTIME_ROOT:PATH=$(ONNXRoot)'
         pool:
          vmImage: $(imageName)

        steps:
        - checkout: self
          lfs: true
        
        - task: UniversalPackages@0
          displayName: 'Download pre-build ONXX Runtime headers and libraries'
          inputs:
            command:            'download'
            vstsFeed:           'MyProjectPackages'
            vstsFeedPackage:    'microsoft.ml.onxxruntime'
            vstsPackageVersion: '*' # use the latest
            downloadDirectory:  '$(ONNXRoot)'

 
        - download: SCMockPipeline
          displayName: Download SCMock
          artifact: scmock
          condition: eq(variables['Agent.OS'], 'Windows_NT')

        - script: python -m pip install jinja2
          displayName: Install python jinja2 template engine

        - task: CMake@1
          displayName: CMake configure
          inputs:
            workingDirectory: '$(Build.BinariesDirectory)'
            cmakeArgs: '-G Ninja
                        $(extraCmakeOptions)                        
                        -DLibFT4222_ROOT=$(LibFT4222Root)
                        -DIPP_ROOT=$(IppRoot)
                        -DCMAKE_BUILD_TYPE=Release
                        -DCMAKE_INSTALL_PREFIX=$(Build.ArtifactStagingDirectory)
                        $(Build.SourcesDirectory)'

        - task: CMake@1
          displayName: CMake build
          inputs:
            workingDirectory:   '$(Build.BinariesDirectory)'
            cmakeArgs:          '--build . --target install'

        - task: PublishPipelineArtifact@1
          displayName: 'Publish MyProject'
          inputs:
            targetPath: $(Build.ArtifactStagingDirectory)
            artifactName: 'MyProject_x64-$(osSuffix)'    
            
        - task: DownloadPipelineArtifact@2
          displayName: Download MyProject artifact
          inputs:
            artifact: 'MyProject_x64-$(osSuffix)'
            path: '$(Build.SourcesDirectory)/MyProject_x64-$(osSuffix)'
休林 - MSFT

您可以尝试在DownloadPipelineArtifact任务中设置目标目录以将工件下载到bin文件夹。

- task: PublishPipelineArtifact@1
          displayName: 'Publish MyProject'
          inputs:
            targetPath: $(Build.ArtifactStagingDirectory)/bin/Nodes/onnxruntime.dll
            artifactName: 'MyProject_x64-$(osSuffix)'

- task: DownloadPipelineArtifact@2
          displayName: Download MyProject artifact
          inputs:
            artifact: 'MyProject_x64-$(osSuffix)'
            path: '$(Build.SourcesDirectory)/MyProject_x64-$(osSuffix)/bin'

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章