File: az-distro-release.yml

package info (click to toggle)
mpich 4.3.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 101,184 kB
  • sloc: ansic: 1,040,629; cpp: 82,270; javascript: 40,763; perl: 27,933; python: 16,041; sh: 14,676; xml: 14,418; f90: 12,916; makefile: 9,270; fortran: 8,046; java: 4,635; asm: 324; ruby: 103; awk: 27; lisp: 19; php: 8; sed: 4
file content (130 lines) | stat: -rw-r--r-- 5,808 bytes parent folder | download | duplicates (2)
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
parameters:
  arch:
  demands: []

jobs:
  - job: Build_${{ parameters.arch }}
    displayName: Build
    variables:
      ${{ if eq(variables['Build.Reason'], 'ResourceTrigger') }}:
        POSTFIX: ucx-${{ replace(variables['Build.SourceBranch'], 'refs/heads/', '') }}
      ${{ if eq(variables['Build.Reason'], 'IndividualCI') }}:
        POSTFIX: ucx-${{ replace(variables['Build.SourceBranch'], 'refs/tags/v', '') }}
      ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
        POSTFIX: ucx-pr$(System.PullRequest.PullRequestNumber)

    strategy:
      matrix:
        # common for both x86 and ARM
        centos8_cuda11_${{ parameters.arch }}:
          build_container: centos8_cuda11_${{ parameters.arch }}
          artifact_name: $(POSTFIX)-centos8-mofed5-cuda11-${{ parameters.arch }}.tar.bz2
        ubuntu18_cuda11_${{ parameters.arch }}:
          build_container: ubuntu18_cuda11_${{ parameters.arch }}
          artifact_name: $(POSTFIX)-ubuntu18.04-mofed5-cuda11-${{ parameters.arch }}.tar.bz2
        ubuntu20_cuda11_${{ parameters.arch }}:
          build_container: ubuntu20_cuda11_${{ parameters.arch }}
          artifact_name: $(POSTFIX)-ubuntu20.04-mofed5-cuda11-${{ parameters.arch }}.tar.bz2
        ubuntu22_cuda11_${{ parameters.arch }}:
          build_container: ubuntu22_cuda11_${{ parameters.arch }}
          artifact_name: $(POSTFIX)-ubuntu22.04-mofed5-cuda11-${{ parameters.arch }}.tar.bz2
        ubuntu20_cuda12_${{ parameters.arch }}:
          build_container: ubuntu20_cuda12_${{ parameters.arch }}
          artifact_name: $(POSTFIX)-ubuntu20.04-mofed5-cuda12-${{ parameters.arch }}.tar.bz2
        ubuntu22_cuda12_${{ parameters.arch }}:
          build_container: ubuntu22_cuda12_${{ parameters.arch }}
          artifact_name: $(POSTFIX)-ubuntu22.04-mofed5-cuda12-${{ parameters.arch }}.tar.bz2
        ubuntu24_cuda12_${{ parameters.arch }}:
          build_container: ubuntu24_cuda12_${{ parameters.arch }}
          artifact_name: $(POSTFIX)-ubuntu24.04-mofed5-cuda12-${{ parameters.arch }}.tar.bz2
        # x86 only
        ${{ if eq(parameters.arch, 'x86_64') }}:
          centos7_cuda11_${{ parameters.arch }}:
            build_container: centos7_cuda11_${{ parameters.arch }}
            artifact_name: $(POSTFIX)-centos7-mofed5-cuda11-${{ parameters.arch }}.tar.bz2
          centos7_cuda12_${{ parameters.arch }}:
            build_container: centos7_cuda12_${{ parameters.arch }}
            artifact_name: $(POSTFIX)-centos7-mofed5-cuda12-${{ parameters.arch }}.tar.bz2
          ubuntu16_cuda11_${{ parameters.arch }}:
            build_container: ubuntu16_cuda11_${{ parameters.arch }}
            artifact_name: $(POSTFIX)-ubuntu16.04-mofed5-cuda11-${{ parameters.arch }}.tar.bz2
          ubuntu18_cuda12_${{ parameters.arch }}:
            build_container: ubuntu18_cuda12_${{ parameters.arch }}
            artifact_name: $(POSTFIX)-ubuntu18.04-mofed5-cuda12-${{ parameters.arch }}.tar.bz2

    container: $[ variables['build_container'] ]
    pool:
      name: MLNX
      demands: ${{ parameters.demands }}


    steps:
      - checkout: self
        clean: true
        fetchDepth: 100
        retryCountOnTaskFailure: 5
        path: "we/need/to/go/deeper"
        # ^ Avoid rpmbuild error: Dest dir longer than base dir is not supported

      - bash: |
          set -eEx
          ./autogen.sh
          mkdir -p pkg-build
          cd pkg-build
          ../contrib/configure-release --with-cuda --with-java=no
          ../contrib/buildrpm.sh -s -t -b --noclean
          cd rpm-dist/$(uname -m)
          tar -cjf "../../../${AZ_ARTIFACT_NAME}" *.rpm
          cd ../../..
          tar -tjf "${AZ_ARTIFACT_NAME}"
        displayName: Build RPM package
        condition: and(succeeded(), contains(variables['artifact_name'], 'centos'))
        env:
          AZ_ARTIFACT_NAME: $(artifact_name)

      - bash: |
          set -eEx

          # Build
          ./autogen.sh
          ./contrib/configure-release --with-cuda --with-java=no
          make dist
          tarball=$(echo ucx*.tar.gz)
          tar -xzvf ${tarball}              # extract the sources in a subdirectory
          cd $(tar tf ${tarball} | head -1) # go to extracted tarball directory
          echo 10 > debian/compat   # https://www.debian.org/doc/manuals/maint-guide/dother.en.htmdpl#compat
          dpkg-buildpackage -us -uc -Pcuda,xpmem
          cd ..                             # Move back to the working directory

          # Rename DEB files          
          VER="${POSTFIX#ucx-}"     # Remove 'ucx-' prefix from the POSTFIX string
          find . -name "ucx*.deb" -exec bash -c 'mv "$1" "${1%%_*}-'"${VER}"'.deb"' _ {} \;
          find . -name '*.deb'      # Show new names

          # Remove superfluous dependency
          dpkg-deb -R "ucx-cuda-${VER}.deb" tmp    # Extract
          sed -i 's/libnvidia-compute | libnvidia-ml1, //g' tmp/DEBIAN/control
          dpkg-deb -b tmp "ucx-cuda-${VER}.deb"        # Rebuild
          dpkg-deb -I "ucx-cuda-${VER}.deb"
          dpkg-deb -I "ucx-${VER}.deb"

          # Package
          tar -cjf "${AZ_ARTIFACT_NAME}" *.deb  # Package all DEBs
          tar -tjf "${AZ_ARTIFACT_NAME}"
        displayName: Build DEB package
        condition: and(succeeded(), contains(variables['artifact_name'], 'ubuntu'))
        env:
          AZ_ARTIFACT_NAME: $(artifact_name)

      - task: GithubRelease@0
        condition: eq(variables['Build.Reason'], 'IndividualCI')
        displayName: Upload artifacts
        inputs:
          githubConnection: release
          repositoryName: openucx/ucx
          action: edit
          tag: $(Build.SourceBranchName)
          isDraft: true
          addChangeLog: false
          assetUploadMode: replace
          assets: "./$(artifact_name)"