github.com/SagerNet/gvisor@v0.0.0-20210707092255-7731c139d75c/.buildkite/pipeline.yaml (about)

     1  _templates:
     2    common: &common
     3      timeout_in_minutes: 30
     4      retry:
     5        automatic:
     6          - exit_status: -1
     7            limit: 10
     8          - exit_status: "*"
     9            limit: 2
    10    benchmarks: &benchmarks
    11      timeout_in_minutes: 120
    12      retry:
    13        automatic: false
    14      soft_fail: true
    15      if: build.branch == "master"
    16      env:
    17        # BENCHMARKS_OFFICIAL is set from hooks/pre-command, based
    18        # on whether this is executing on the master branch.
    19        BENCHMARKS_DATASET: buildkite
    20        BENCHMARKS_PLATFORMS: "ptrace kvm"
    21        BENCHMARKS_PROJECT: gvisor-benchmarks
    22        BENCHMARKS_TABLE: benchmarks
    23        BENCHMARKS_UPLOAD: true
    24  
    25  steps:
    26    # Run basic smoke tests before preceding to other tests.
    27    - <<: *common
    28      label: ":fire: Smoke tests"
    29      command: make smoke-tests
    30    - wait
    31  
    32    # Check that the Go branch builds.
    33    - <<: *common
    34      label: ":golang: Go branch"
    35      commands:
    36        - tools/go_branch.sh
    37        - git checkout go && git clean -xf .
    38        - go build ./...
    39  
    40    # Release workflow.
    41    - <<: *common
    42      label: ":ship: Release tests"
    43      commands:
    44        - make artifacts/x86_64
    45        - make BAZEL_OPTIONS=--config=cross-aarch64 artifacts/aarch64
    46        - make release
    47  
    48    # Images tests.
    49    - <<: *common
    50      label: ":docker: Images (x86_64)"
    51      command: make ARCH=x86_64 load-all-images
    52    - <<: *common
    53      label: ":docker: Images (aarch64)"
    54      command: make ARCH=aarch64 load-all-images
    55  
    56    # Basic unit tests.
    57    - <<: *common
    58      label: ":golang: Nogo tests"
    59      command: make nogo-tests
    60    - <<: *common
    61      label: ":test_tube: Unit tests"
    62      command: make unit-tests
    63    - <<: *common
    64      label: ":test_tube: runsc tests"
    65      command: make runsc-tests
    66  
    67    # All system call tests.
    68    - <<: *common
    69      label: ":toolbox: System call tests"
    70      command: make syscall-tests
    71      parallelism: 20
    72  
    73    # Integration tests.
    74    - <<: *common
    75      label: ":docker: Docker tests"
    76      command: make docker-tests
    77    - <<: *common
    78      label: ":goggles: Overlay tests"
    79      command: make overlay-tests
    80    - <<: *common
    81      label: ":safety_pin: Host network tests"
    82      command: make hostnet-tests
    83    - <<: *common
    84      label: ":satellite: SWGSO tests"
    85      command: make swgso-tests
    86    - <<: *common
    87      label: ":coffee: Do tests"
    88      command: make do-tests
    89    - <<: *common
    90      label: ":person_in_lotus_position: KVM tests"
    91      command: make kvm-tests
    92    - <<: *common
    93      label: ":weight_lifter: Fsstress test"
    94      command: make fsstress-test
    95    - <<: *common
    96      label: ":docker: Containerd 1.3.9 tests"
    97      command: make containerd-test-1.3.9
    98    - <<: *common
    99      label: ":docker: Containerd 1.4.3 tests"
   100      command: make containerd-test-1.4.3
   101  
   102    # Check the website builds.
   103    - <<: *common
   104      label: ":earth_americas: Website tests"
   105      command: make website-build
   106  
   107    # Networking tests.
   108    - <<: *common
   109      label: ":table_tennis_paddle_and_ball: IPTables tests"
   110      command: make iptables-tests
   111    - <<: *common
   112      label: ":construction_worker: Packetdrill tests"
   113      command: make packetdrill-tests
   114    - <<: *common
   115      label: ":hammer: Packetimpact tests"
   116      command: make packetimpact-tests
   117  
   118    # Runtime tests.
   119    - <<: *common
   120      label: ":php: PHP runtime tests"
   121      command: make php7.3.6-runtime-tests_vfs2
   122      parallelism: 10
   123    - <<: *common
   124      label: ":java: Java runtime tests"
   125      command: make java11-runtime-tests_vfs2
   126      parallelism: 40
   127    - <<: *common
   128      label: ":golang: Go runtime tests"
   129      command: make go1.12-runtime-tests_vfs2
   130      parallelism: 10
   131    - <<: *common
   132      label: ":node: NodeJS runtime tests"
   133      command: make nodejs12.4.0-runtime-tests_vfs2
   134      parallelism: 10
   135    - <<: *common
   136      label: ":python: Python runtime tests"
   137      command: make python3.7.3-runtime-tests_vfs2
   138      parallelism: 10
   139  
   140    # Runtime tests (VFS1).
   141    - <<: *common
   142      label: ":php: PHP runtime tests (VFS1)"
   143      command: make php7.3.6-runtime-tests
   144      parallelism: 10
   145      if: build.message =~ /VFS1/ || build.branch == "master"
   146    - <<: *common
   147      label: ":java: Java runtime tests (VFS1)"
   148      command: make java11-runtime-tests
   149      parallelism: 40
   150      if: build.message =~ /VFS1/ || build.branch == "master"
   151    - <<: *common
   152      label: ":golang: Go runtime tests (VFS1)"
   153      command: make go1.12-runtime-tests
   154      parallelism: 10
   155      if: build.message =~ /VFS1/ || build.branch == "master"
   156    - <<: *common
   157      label: ":node: NodeJS runtime tests (VFS1)"
   158      command: make nodejs12.4.0-runtime-tests
   159      parallelism: 10
   160      if: build.message =~ /VFS1/ || build.branch == "master"
   161    - <<: *common
   162      label: ":python: Python runtime tests (VFS1)"
   163      command: make python3.7.3-runtime-tests
   164      parallelism: 10
   165      if: build.message =~ /VFS1/ || build.branch == "master"
   166  
   167    # ARM tests.
   168    - <<: *common
   169      label: ":mechanical_arm: ARM"
   170      command: make arm-qemu-smoke-test
   171  
   172    # Run basic benchmarks smoke tests (no upload).
   173    - <<: *common
   174      label: ":fire: Benchmarks smoke test"
   175      command: make benchmark-platforms
   176      # Use the opposite of the benchmarks filter.
   177      if: build.branch != "master"
   178  
   179    # Run all benchmarks.
   180    - <<: *benchmarks
   181      label: ":bazel: ABSL build benchmarks"
   182      command: make benchmark-platforms BENCHMARKS_FILTER="ABSL/page_cache.clean" BENCHMARKS_SUITE=absl BENCHMARKS_TARGETS=test/benchmarks/fs:bazel_test
   183    - <<: *benchmarks
   184      label: ":go: runsc build benchmarks"
   185      command: make benchmark-platforms BENCHMARKS_FILTER="Runsc/page_cache.clean/filesystem.bind" BENCHMARKS_SUITE=runsc BENCHMARKS_TARGETS=test/benchmarks/fs:bazel_test
   186    - <<: *benchmarks
   187      label: ":metal: FFMPEG benchmarks"
   188      command: make benchmark-platforms BENCHMARKS_SUITE=ffmpeg BENCHMARKS_TARGETS=test/benchmarks/media:ffmpeg_test
   189    # For fio, running with --test.benchtime=Xs scales the written/read
   190    # bytes to several GB. This is not a problem for root/bind/volume mounts,
   191    # but for tmpfs mounts, the size can grow to more memory than the machine
   192    # has availabe. Fix the runs to 1GB written/read for the benchmark.
   193    - <<: *benchmarks
   194      label: ":floppy_disk: FIO benchmarks (read/write)"
   195      command: make benchmark-platforms BENCHMARKS_SUITE=fio BENCHMARKS_TARGETS=test/benchmarks/fs:fio_test BENCHMARKS_FILTER=Fio/operation\.[rw][er] BENCHMARKS_OPTIONS=--test.benchtime=1000x
   196    # For rand(read|write) fio benchmarks, running 15s does not overwhelm the system for tmpfs mounts.
   197    - <<: *benchmarks
   198      label: ":cd: FIO benchmarks (randread/randwrite)"
   199      command: make benchmark-platforms BENCHMARKS_SUITE=fio BENCHMARKS_TARGETS=test/benchmarks/fs:fio_test BENCHMARKS_FILTER=Fio/operation\.rand BENCHMARKS_OPTIONS=--test.benchtime=15s
   200    - <<: *benchmarks
   201      label: ":globe_with_meridians: HTTPD benchmarks"
   202      command: make benchmark-platforms BENCHMARKS_FILTER="Continuous" BENCHMARKS_SUITE=httpd BENCHMARKS_TARGETS=test/benchmarks/network:httpd_test
   203    - <<: *benchmarks
   204      label: ":piedpiper: iperf benchmarks"
   205      command: make benchmark-platforms BENCHMARKS_SUITE=iperf BENCHMARKS_TARGETS=test/benchmarks/network:iperf_test
   206    - <<: *benchmarks
   207      label: ":nginx: nginx benchmarks"
   208      command: make benchmark-platforms BENCHMARKS_FILTER="Continuous" BENCHMARKS_SUITE=nginx BENCHMARKS_TARGETS=test/benchmarks/network:nginx_test
   209    - <<: *benchmarks
   210      label: ":node: node benchmarks"
   211      command: make benchmark-platforms BENCHMARKS_SUITE=node BENCHMARKS_TARGETS=test/benchmarks/network:node_test
   212    - <<: *benchmarks
   213      label: ":redis: Redis benchmarks"
   214      command: make benchmark-platforms BENCHMARKS_SUITE=redis BENCHMARKS_TARGETS=test/benchmarks/database:redis_test BENCHMARKS_OPTIONS=-test.benchtime=15s
   215    - <<: *benchmarks
   216      label: ":ruby: Ruby benchmarks"
   217      command: make benchmark-platforms BENCHMARKS_SUITE=ruby BENCHMARKS_TARGETS=test/benchmarks/network:ruby_test
   218    - <<: *benchmarks
   219      label: ":weight_lifter: Size benchmarks"
   220      command: make benchmark-platforms  BENCHMARKS_SUITE=size BENCHMARKS_TARGETS=test/benchmarks/base:size_test
   221    - <<: *benchmarks
   222      label: ":speedboat: Startup benchmarks"
   223      command: make benchmark-platforms BENCHMARKS_SUITE=startup BENCHMARKS_TARGETS=test/benchmarks/base:startup_test
   224    - <<: *benchmarks
   225      label: ":computer: sysbench benchmarks"
   226      command: make benchmark-platforms BENCHMARKS_SUITE=sysbench BENCHMARKS_TARGETS=test/benchmarks/base:sysbench_test
   227    - <<: *benchmarks
   228      label: ":tensorflow: TensorFlow benchmarks"
   229      command: make benchmark-platforms BENCHMARKS_SUITE=tensorflow BENCHMARKS_TARGETS=test/benchmarks/ml:tensorflow_test