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
|
parameters:
name: go test
demands: []
jobs:
- job: ${{ parameters.name }}
workspace:
clean: all
pool:
name: MLNX
demands: ${{ parameters.demands }}
steps:
- checkout: self
fetchDepth: 100
clean: true
displayName: Checkout
- bash: |
set -x
# Standard go pre-commit: https://github.com/golang/go/blob/release-branch.go1.1/misc/git/pre-commit
gofiles=$(git diff --cached --name-only --diff-filter=ACM | grep '.go$')
[ -z "$gofiles" ] && exit 0
unformatted=$(gofmt -l $gofiles)
[ -z "$unformatted" ] && exit 0
# Some files are not gofmt'd. Print message and fail.
echo >&2 "Go files must be formatted with gofmt. Please run:"
for fn in $unformatted; do
echo >&2 " gofmt -w $PWD/$fn"
done
exit 1
- bash: |
set -xeE
source buildlib/az-helpers.sh
az_init_modules
az_module_load dev/go-latest
try_load_cuda_env
./autogen.sh
mkdir build
cd build
../contrib/configure-devel --prefix=$(Agent.TempDirectory)/ucx-$(Build.BuildId) \
--with-go --enable-gtest=no --with-cuda=$have_cuda
make -j`nproc`
make install
displayName: Build UCX
- bash: |
set -xeE
source buildlib/az-helpers.sh
az_init_modules
try_load_cuda_env
az_module_load dev/go-latest
make -C build/bindings/go test
displayName: Run go tests
- bash: |
set -xeE
source buildlib/az-helpers.sh
az_init_modules
try_load_cuda_env
az_module_load dev/go-latest
go_port=$((30000 + $(AZP_AGENT_ID) * 100))
args="-p=$go_port"
if [ "${{ parameters.name }}" == "gpu" ]; then
args="$args -m=cuda"
fi
LD_LIBRARY_PATH=$(Agent.TempDirectory)/ucx-$(Build.BuildId)/lib/:$LD_LIBRARY_PATH $(Agent.TempDirectory)/ucx-$(Build.BuildId)/bin/goperftest $args &
sleep 5
LD_LIBRARY_PATH=$(Agent.TempDirectory)/ucx-$(Build.BuildId)/lib/:$LD_LIBRARY_PATH $(Agent.TempDirectory)/ucx-$(Build.BuildId)/bin/goperftest $args -i=localhost
displayName: Run go performance test
|