<commit_before>parameters:
  parentJobs: []

jobs:
- job: build_nuget
  dependsOn:
    ${{ parameters.parentJobs }}
  displayName: Build NuGet packages
  condition: succeeded()
  pool: PowerShell
  variables:
    linuxArm32Path: '$(System.ArtifactsDirectory)/linuxArm32'
    winArm32Path: '$(System.ArtifactsDirectory)/winArm32'
    linuxX64Path: '$(System.ArtifactsDirectory)/linuxX64'
    macOSPath: '$(System.ArtifactsDirectory)/macOS'
    winArm64Path: '$(System.ArtifactsDirectory)/winArm64'
    winX64Path: '$(System.ArtifactsDirectory)/winX64'
    winX86Path: '$(System.ArtifactsDirectory)/winX86'
    GenAPIToolPath: '$(System.ArtifactsDirectory)/GenAPI'
    PackagePath: '$(System.ArtifactsDirectory)/UnifiedPackagePath'
    winFxdPath: '$(System.ArtifactsDirectory)/winFxd'
    linuxFxdPath: '$(System.ArtifactsDirectory)/linuxFxd'

  steps:

  - powershell: |
      $content = Get-Content "$(Build.SourcesDirectory)/global.json" -Raw | ConvertFrom-Json
      $vstsCommandString = "vso[task.setvariable variable=SDKVersion]$($content.sdk.version)"
      Write-Host "sending " + $vstsCommandString
      Write-Host "##$vstsCommandString"
    displayName: 'Find SDK version from global.json'

  - task: DotNetCoreInstaller@0
    displayName: 'Use .NET Core SDK from global.json'
    inputs:
      version: '$(SDKVersion)'

  - task: DownloadBuildArtifacts@0
    displayName: 'Download PowerShell build artifacts'
    inputs:
      buildType: current
      downloadType: specific
      itemPattern: |
        finalResults/PowerShell-*-win-*.zip
        finalResults/powershell-*.tar.gz
        results/powershell-*-osx-x64.tar.gz
      downloadPath: '$(System.ArtifactsDirectory)'

  - powershell: 'Get-ChildItem $(System.ArtifactsDirectory) -recurse'<commit_msg>Fix artifact Download issue in release build (#9095)<commit_after>parameters:
  parentJobs: []

jobs:
- job: build_nuget
  dependsOn:
    ${{ parameters.parentJobs }}
  displayName: Build NuGet packages
  condition: succeeded()
  pool: PowerShell
  variables:
    linuxArm32Path: '$(System.ArtifactsDirectory)/linuxArm32'
    winArm32Path: '$(System.ArtifactsDirectory)/winArm32'
    linuxX64Path: '$(System.ArtifactsDirectory)/linuxX64'
    macOSPath: '$(System.ArtifactsDirectory)/macOS'
    winArm64Path: '$(System.ArtifactsDirectory)/winArm64'
    winX64Path: '$(System.ArtifactsDirectory)/winX64'
    winX86Path: '$(System.ArtifactsDirectory)/winX86'
    GenAPIToolPath: '$(System.ArtifactsDirectory)/GenAPI'
    PackagePath: '$(System.ArtifactsDirectory)/UnifiedPackagePath'
    winFxdPath: '$(System.ArtifactsDirectory)/winFxd'
    linuxFxdPath: '$(System.ArtifactsDirectory)/linuxFxd'

  steps:

  - powershell: |
      $content = Get-Content "$(Build.SourcesDirectory)/global.json" -Raw | ConvertFrom-Json
      $vstsCommandString = "vso[task.setvariable variable=SDKVersion]$($content.sdk.version)"
      Write-Host "sending " + $vstsCommandString
      Write-Host "##$vstsCommandString"
    displayName: 'Find SDK version from global.json'

  - task: DotNetCoreInstaller@0
    displayName: 'Use .NET Core SDK from global.json'
    inputs:
      version: '$(SDKVersion)'

  - task: DownloadBuildArtifacts@0
    displayName: 'Download PowerShell build artifacts'
    inputs:
      buildType: current
      downloadType: single
      artifactName: finalResults
      downloadPath: '$(System.ArtifactsDirectory)'

  - powershell: 'Get-ChildItem $(System.ArtifactsDirectory) -recurse'
{'fraction_non_alphanumeric': 0.1222543352601156, 'fraction_numerical': 0.01676300578034682, 'mean_word_length': 4.3246153846153845, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 9, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7243620', 'n_tokens_mistral': 1124, 'n_tokens_neox': 1060, 'n_words': 190}