jobs: - job: distro_release displayName: distro 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/', '') }} ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: POSTFIX: ucx-pr$(System.PullRequest.PullRequestNumber) pool: name: MLNX demands: - harbor_registry -equals yes strategy: matrix: centos7_cuda11: build_container: centos7_cuda11 artifact_name: $(POSTFIX)-centos7-mofed5-cuda11.tar.bz2 centos8_cuda11: build_container: centos8_cuda11 artifact_name: $(POSTFIX)-centos8-mofed5-cuda11.tar.bz2 ubuntu16_cuda11: build_container: ubuntu16_cuda11 artifact_name: $(POSTFIX)-ubuntu16.04-mofed5-cuda11.deb ubuntu18_cuda11: build_container: ubuntu18_cuda11 artifact_name: $(POSTFIX)-ubuntu18.04-mofed5-cuda11.deb ubuntu20_cuda11: build_container: ubuntu20_cuda11 artifact_name: $(POSTFIX)-ubuntu20.04-mofed5-cuda11.deb container: $[ variables['build_container'] ] steps: - checkout: self clean: true fetchDepth: 100 path: "we/need/to/go/deeper" # ^ Avoid rpmbuild error: Dest dir longer than base dir is not supported - bash: | set -eEx ./autogen.sh mkdir pkg-build cd pkg-build ../contrib/configure-release --with-cuda --with-java=no displayName: Configure - bash: | set -eEx cd pkg-build ../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 cd pkg-build dpkg-buildpackage -us -uc find .. -name '*.deb' find .. -name '*.deb' -exec cp {} "../${AZ_ARTIFACT_NAME}" \; dpkg-deb -I "../${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)"