.gitlab-ci.yml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. ###################### Begin Defaults
  2. stages:
  3. - all
  4. variables:
  5. GIT_DEPTH: 0
  6. GIT_STRATEGY: clone
  7. default:
  8. before_script:
  9. - |
  10. # before_script
  11. echo "Starting before_script actions."
  12. echo "Finished before_script actions."
  13. after_script:
  14. - |
  15. # after_script
  16. echo "Starting after_script actions."
  17. echo "Finished after_script actions."
  18. ###################### End Defaults
  19. ###################### Begin Common Blocks
  20. .scriptCommon: &scriptCommon |
  21. # scriptCommon
  22. echo "Project Name : $CI_PROJECT_TITLE"
  23. echo "Project Git Commit : $CI_COMMIT_SHA"
  24. echo "Project Git Branch : $CI_COMMIT_BRANCH"
  25. echo "GitLab CI User Details : $GITLAB_USER_LOGIN - $GITLAB_USER_NAME ($GITLAB_USER_ID) $GITLAB_USER_EMAIL"
  26. echo "GitLab CI Job Name : $CI_JOB_NAME"
  27. echo "GitLab CI Job ID : $CI_JOB_ID"
  28. echo "GitLab CI Job Stage : $CI_JOB_STAGE"
  29. echo "GitLab CI Runner Details : $CI_RUNNER_VERSION ($CI_RUNNER_REVISION)"
  30. .scriptGitPre: &scriptGitPre |
  31. # scriptGitPre
  32. git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
  33. git --no-pager fetch --tags
  34. git --no-pager fetch --all --recurse-submodules=yes
  35. git --no-pager update-index -q --refresh --really-refresh
  36. git --no-pager for-each-ref --count=1
  37. git --no-pager reset --hard
  38. git --no-pager diff --full-index --exit-code
  39. ###################### End Common Blocks
  40. ###################### Begin Windows Build + Test
  41. #windows job:
  42. # tags:
  43. # - Windows-x86_64
  44. # stage: all
  45. # script:
  46. # - *scriptCommon
  47. # - $env:Path += ";C:\Program Files\Git\cmd;C:\Go\bin;C:\Progra~1\Git"
  48. # - *scriptGitPre
  49. # - |
  50. # # TODO(jhj): PLACEHOLDER - Windows build and test will eventually go here
  51. # - |
  52. # # status
  53. # echo "Windows skipped"
  54. ###################### End Windows Build + Test
  55. ###################### Begin Linux
  56. linux job:
  57. tags:
  58. - Linux-x86_64
  59. stage: all
  60. script:
  61. - *scriptCommon
  62. - |
  63. # upgrade system, install development tools
  64. - yum install dnf -y || true :;
  65. - yum clean all -y || true :;
  66. - dnf upgrade --refresh -y || true :;
  67. - dnf groupinstall "Development Tools" -y || true :;
  68. - dnf install epel-release centos-release-scl centos-release-scl-rh -y || true :;
  69. - dnf install pv valgrind ccache graphviz clang zsh autoconf-archive bash mksh rpmconf scl-utils devtoolset-9 -y || true :;
  70. - dnf groupupdate base -y || true :;
  71. - yes | /usr/sbin/rpmconf -a || true :;
  72. - . /opt/rh/devtoolset-9/enable
  73. - dnf clean all -y || true :;
  74. - *scriptGitPre
  75. - gcc --version
  76. - gmake clean
  77. - gmake distclean
  78. - gmake -k
  79. - gmake test -k
  80. # - gmake install
  81. # - gmake installcheck
  82. # - gmake uninstall
  83. - gmake clean
  84. - gmake distclean
  85. - |
  86. # status
  87. echo "gmake: clean -> distclean -> test -> clean -> distclean: OK"
  88. ###################### End Linux Build + Test
  89. ####################### Begin macOS Build + Test
  90. #macos job:
  91. # tags:
  92. # - macOS_X-x86_64
  93. # stage: all
  94. # script:
  95. # - |
  96. # # update & upgrade homebrew
  97. # bash --norc --noprofile --posix -c "brew update >/dev/null 2>&1 || true :;" >/dev/null 2>&1 || true :;
  98. # bash --norc --noprofile --posix -c "brew upgrade >/dev/null 2>&1 || true :;" >/dev/null 2>&1 || true :;
  99. # - *scriptCommon
  100. # - if type brew >/dev/null 2>&1; then export HOMEBREW_PREFIX=$(brew --prefix 2>/dev/null); for dir in ${HOMEBREW_PREFIX}/opt/*/libexec/gnubin; do export PATH="${dir}:${PATH}"; done; fi
  101. # - export PATH="/usr/local/opt/gcc/bin:${PATH}"
  102. # - *scriptGitPre
  103. # - gcc --version
  104. # - gmake clean OS=darwin
  105. # - gmake distclean OS=darwin
  106. # - gmake OS=darwin -k
  107. # - gmake test OS=darwin -k
  108. ## - gmake install OS=darwin
  109. ## - gmake installcheck OS=darwin
  110. ## - gmake uninstall OS=darwin
  111. # - gmake clean OS=darwin
  112. # - gmake distclean OS=darwin
  113. # - |
  114. # # status
  115. # echo "gmake: clean -> distclean -> test -> clean -> distclean: OK"
  116. ####################### End macOS Build + Test