File: go-test.yml

package info (click to toggle)
mpich 4.3.0%2Breally4.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 419,120 kB
  • sloc: ansic: 1,215,557; cpp: 74,755; javascript: 40,763; f90: 20,649; sh: 18,463; xml: 14,418; python: 14,397; perl: 13,772; makefile: 9,279; fortran: 8,063; java: 4,553; asm: 324; ruby: 176; lisp: 19; php: 8; sed: 4
file content (72 lines) | stat: -rw-r--r-- 2,238 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
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