Welcome to mirror list, hosted at ThFree Co, Russian Federation.

crossdac-build.yml « templates « coreclr « pipelines « eng - github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9bc3125f6a050b45002e53ec10bf6e16f857941f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
parameters:
  archType: ''
  osGroup: ''
  osSubgroup: ''
  hostArchType: ''

steps:
  # Always build the crossdac, that way we know in CI/PR if things break to build.
  - ${{ if and(eq(parameters.osGroup, 'windows'), notin(parameters.archType, 'x86')) }}:
    - script: $(Build.SourcesDirectory)/src/coreclr/build-runtime$(scriptExt) $(buildConfig) ${{ parameters.archType }} -hostarch ${{ parameters.hostArchType }} -ci -os Linux -cmakeargs "-DCLR_CROSS_COMPONENTS_BUILD=1" -ninja $(officialBuildIdArg) -component crosscomponents
      displayName: Build Cross OS Linux DAC for Windows

    - script: $(Build.SourcesDirectory)/src/coreclr/build-runtime$(scriptExt) $(buildConfig) ${{ parameters.archType }} -hostarch ${{ parameters.hostArchType }} -ci -os alpine -cmakeargs "-DCLR_CROSS_COMPONENTS_BUILD=1" -ninja $(officialBuildIdArg) -component crosscomponents
      displayName: Build Cross OS Linux-musl DAC for Windows

    - powershell: |
        function CopyAndVerifyCrossOsAssets {
          [CmdletBinding()]
          param (
            [Parameter(Mandatory)][string]$crossDacDir,
            [Parameter(Mandatory)][string]$targetDir
          )

          if ('${{ parameters.archType }}' -ne '${{ parameters.hostArchType }}')
          {
            $crossDacDir = Join-Path $crossDacDir -ChildPath '${{ parameters.hostArchType }}'
          }

          $availableFiles = ls -File $crossDacDir

          Write-Host "Probed for files in ""$crossDacDir"", found:"
          $availableFiles | fl

          if (-not ("mscordaccore.dll" -in $availableFiles.Name `
                   -and "mscordaccore.pdb" -in $availableFiles.Name `
                   -and "mscordbi.dll" -in $availableFiles.Name `
                   -and "mscordbi.pdb" -in $availableFiles.Name`
                   ))
          {
            Write-Error "Couldn't find one of the expected crossdac files."
          }

          New-Item $targetDir -ItemType 'Directory' -Force -ea 0
          $availableFiles | %{ cp $_.FullName $targetDir -v }
        }

        CopyAndVerifyCrossOsAssets -CrossDacDir $(buildMuslDacRootFolderPath) -TargetDir '$(buildMuslDacStagingPath)/${{ parameters.hostArchType }}'
        CopyAndVerifyCrossOsAssets -CrossDacDir $(buildLinuxDacRootFolderPath) -TargetDir '$(buildLinuxDacStagingPath)/${{ parameters.hostArchType }}'

        Write-Host "Final directory contents:"
        ls -R $(crossDacArtifactPath)

      displayName: Gather CrossDac Artifacts

  - ${{ if eq(parameters.osGroup, 'Linux') }}:
    - task: CopyFiles@2
      displayName: Gather runtime for CrossDac
      inputs:
        SourceFolder: $(coreClrProductRootFolderPath)
        Contents: libcoreclr.so
        TargetFolder: '$(crossDacArtifactPath)/${{ parameters.osGroup }}${{ parameters.osSubgroup }}.$(archType).$(buildConfigUpper)/${{ parameters.hostArchType }}'

  # Make the assets available in a single container for the packaging job.
  - task: PublishBuildArtifacts@1
    displayName: Publish runtime for CrossDac
    inputs:
      pathtoPublish:  $(crossDacArtifactPath)
      PublishLocation: Container
      artifactName:  $(buildCrossDacArtifactName)