config.yml 972 B

123456789101112131415161718192021222324252627282930313233343536
  1. # Golang CircleCI 2.0 configuration file
  2. #
  3. # Check https://circleci.com/docs/2.0/language-go/ for more details
  4. version: 2
  5. jobs:
  6. test:
  7. requires:
  8. - check
  9. docker:
  10. - image: yunion/alpine-build:3.22.0-go-1.24.6-1
  11. environment:
  12. ONECLOUD_CI_BUILD: "1"
  13. #### TEMPLATE_NOTE: go expects specific checkout path representing url
  14. #### expecting it in the form of
  15. #### /go/src/github.com/circleci/go-tool
  16. #### /go/src/bitbucket.org/circleci/go-tool
  17. working_directory: /root/go/src/yunion.io/x/onecloud
  18. resource_class: large
  19. parallelism: 1
  20. steps:
  21. - checkout
  22. - run:
  23. command: |
  24. make -j3 check
  25. make test
  26. targets="$(circleci tests glob "cmd/*" | grep -v cmd/host-image | circleci tests split)"
  27. echo $targets | tr ' ' '\n'
  28. make $targets
  29. ls -lh _output/bin/
  30. workflows:
  31. version: 2
  32. build_and_test:
  33. jobs:
  34. - test