Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AZP: Create release pipeline #26

Open
wants to merge 20 commits into
base: integration4
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions buildlib/azure-pipelines-int4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# See https://aka.ms/yaml

trigger: none
pr: none

resources:
pipelines:
- pipeline: myTest
source: 'UCX snapshot'
trigger: true

stages:
- stage: Rebase
jobs:
- job: rebase
pool:
name: MLNX
demands:
- ucx_docker -equals yes
displayName: rebase on openucx/ucx@master
steps:
- checkout: self
clean: true
fetchDepth: 200
- bash: |
set -eEx
source buildlib/az-helpers.sh
# Checkout integration4 branch from Mellanox/ucx
git remote set-url origin [email protected]:Mellanox/ucx.git
git fetch origin integration4
git checkout integration4
# Checkout master branch from openucx/ucx
git remote add upstream https://github.com/openucx/ucx.git
git fetch upstream master
git log --oneline -10 upstream/master
# Rebase integration4 branch on master branch
if ! git rebase upstream/master
then
# Automatic rebase failed - show merge conflicts
git status
git diff
head=$(git rev-parse --short HEAD)
azure_log_issue "Rebase on ${head} failed, see https://github.com/Mellanox/ucx/wiki/Manual-rebase-of-integration4-branch for details"
else
# Automatic rebase was successful - update the branch
git push origin HEAD --force
fi
9 changes: 6 additions & 3 deletions buildlib/azure-pipelines-pr.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# See https://aka.ms/yaml
# This pipeline to be run on PRs

trigger: none
trigger:
batch: true
branches:
include:
- integration4
pr:
branches:
include:
- master
- v*.*.x
- integration4
paths:
exclude:
- .gitignore
Expand Down
102 changes: 34 additions & 68 deletions buildlib/azure-pipelines-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,52 +5,27 @@ trigger:
tags:
include:
- v*
pr:
- master
- v*.*.x

resources:
containers:
- container: centos7_cuda11
image: rdmz-harbor.rdmz.labs.mlnx/ucx/centos7-mofed5-cuda11:2
- container: centos8_cuda11
image: rdmz-harbor.rdmz.labs.mlnx/ucx/centos8-mofed5-cuda11:2
- container: ubuntu16_cuda11
image: rdmz-harbor.rdmz.labs.mlnx/ucx/ubuntu16.04-mofed5-cuda11:3
- container: ubuntu18_cuda11
image: rdmz-harbor.rdmz.labs.mlnx/ucx/ubuntu18.04-mofed5-cuda11:3
- container: ubuntu20_cuda11
image: rdmz-harbor.rdmz.labs.mlnx/ucx/ubuntu20.04-mofed5-cuda11:3
- container: centos7
image: rdmz-harbor.rdmz.labs.mlnx/ucx/centos7:4

stages:
- stage: Prepare
jobs:
- job: CheckRelease
pool:
name: MLNX
demands:
- ucx_docker -equals yes
steps:
- checkout: self
fetchDepth: 100
clean: true

- bash: |
set -eE
source ./buildlib/az-helpers.sh
set -x
check_release_build $(Build.Reason) $(Build.SourceVersion) "AZP/RELEASE: "
name: Result
displayName: Check build condition

stages:
# Create an empty draft to avoid race condition in distro releases
- stage: GitHubDraft
condition: eq(dependencies.Prepare.outputs['CheckRelease.Result.Launch'], 'True')
dependsOn: Prepare
- stage: GitHubRelease
variables:
${{ if eq(variables['Build.Reason'], 'ResourceTrigger') }}:
artifact_name: ucx-${{ replace(variables['Build.SourceBranch'], 'refs/heads/', '') }}-centos7-mofed5.tar.bz2
${{ if eq(variables['Build.Reason'], 'IndividualCI') }}:
artifact_name: ucx-${{ replace(variables['Build.SourceBranch'], 'refs/tags/', '') }}-centos7-mofed5.tar.bz2
${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to run release pipeline in case of PR

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it will not run, it just copy paste from release job

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd remove it then

artifact_name: ucx-pr$(System.PullRequest.PullRequestNumber)-centos7-mofed5.tar.bz2
jobs:
- job: DraftRelease
displayName: Create draft release
container: centos7_cuda11
- job: Release
displayName: Create release
container: centos7
pool:
name: MLNX
demands:
Expand All @@ -61,44 +36,35 @@ stages:
fetchDepth: 100
path: "we/need/to/go/deeper"

- bash: ./autogen.sh
displayName: Setup autotools
- bash: |
set -eEx
./autogen.sh
mkdir pkg-build
cd pkg-build
../contrib/configure-release --with-java=no
displayName: Configure

- bash: |
set -eE
gcc --version
./contrib/configure-release --with-java=no
./contrib/buildrpm.sh -s -t -b
displayName: Build tarball
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
env:
AZ_ARTIFACT_NAME: $(artifact_name)

- task: GithubRelease@0
condition: eq(variables['Build.Reason'], 'IndividualCI')
displayName: Create/edit GitHub Draft Release
displayName: Upload artifacts
inputs:
githubConnection: release
repositoryName: openucx/ucx
repositoryName: mellanox/ucx
action: edit
tag: $(Build.SourceBranchName)
isDraft: true
addChangeLog: false
releaseNotesSource: file
releaseNotesFile: NEWS
assetUploadMode: replace
assets: |
./ucx-*.tar.gz
./rpm-dist/ucx-*.src.rpm

- stage: Build
displayName: Build binary packages
dependsOn:
- Prepare
- GitHubDraft
condition: eq(dependencies.Prepare.outputs['CheckRelease.Result.Launch'], 'True')
jobs:
- template: az-distro-release.yml
- template: jucx/jucx-publish.yml
parameters:
${{ if eq(variables['Build.Reason'], 'IndividualCI') }}:
target: publish-release
${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
target: package
assets: "./$(artifact_name)"
21 changes: 20 additions & 1 deletion src/ucp/api/ucp.h
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,21 @@ typedef enum {
} ucp_op_attr_t;


/**
* @ingroup UCP_COMM
* @brief UCP tag send operation flags
*
* Flags dictate the behavior of @ref ucp_tag_send_nbx and
* @ref ucp_tag_send_sync_nbx routines.
*/
typedef enum {
UCP_EP_TAG_SEND_FLAG_EAGER = UCS_BIT(0), /**< force use eager protocol
to transfer data */
UCP_EP_TAG_SEND_FLAG_RNDV = UCS_BIT(1) /**< force use rndv protocol
to transfer data */
} ucp_ep_tag_send_flags_t;


/**
* @ingroup UCP_COMM
* @brief UCP request query attributes
Expand Down Expand Up @@ -3521,7 +3536,11 @@ ucs_status_ptr_t ucp_tag_send_sync_nb(ucp_ep_h ep, const void *buffer, size_t co
* @param [in] buffer Pointer to the message buffer (payload).
* @param [in] count Number of elements to send
* @param [in] tag Message tag.
* @param [in] param Operation parameters, see @ref ucp_request_param_t
* @param [in] param Operation parameters, see @ref ucp_request_param_t.
* This operation supports specific flags, which can be
* passed in @a param by @ref ucp_request_param_t.flags.
* The exact set of flags is defined
* by @ref ucp_ep_tag_send_flags_t.
*
* @return UCS_OK - The send operation was completed immediately.
* @return UCS_PTR_IS_ERR(_ptr) - The send operation failed.
Expand Down
Loading