pre.yaml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. #***************************************************************************
  2. # _ _ ____ _
  3. # Project ___| | | | _ \| |
  4. # / __| | | | |_) | |
  5. # | (__| |_| | _ <| |___
  6. # \___|\___/|_| \_\_____|
  7. #
  8. # Copyright (C) 2021 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
  9. #
  10. # This software is licensed as described in the file COPYING, which
  11. # you should have received as part of this distribution. The terms
  12. # are also available at https://curl.se/docs/copyright.html.
  13. #
  14. # You may opt to use, copy, modify, merge, publish, distribute and/or sell
  15. # copies of the Software, and permit persons to whom the Software is
  16. # furnished to do so, under the terms of the COPYING file.
  17. #
  18. # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  19. # KIND, either express or implied.
  20. #
  21. # SPDX-License-Identifier: curl
  22. #
  23. ###########################################################################
  24. ---
  25. - hosts: all
  26. tasks:
  27. - name: Install latest stable release of go
  28. when: gimme_stable|default(false)
  29. block:
  30. - name: Find latest stable version
  31. register: go_stable
  32. uri:
  33. url: https://golang.org/VERSION?m=text
  34. return_content: true
  35. - name: Install Go
  36. include_role:
  37. name: ensure-go
  38. vars:
  39. go_version: "{{ go_stable.content | regex_replace('^go', '') }}"
  40. - name: Symlink /usr/local/go/bin/go to /usr/bin/go
  41. become: true
  42. file:
  43. src: /usr/local/go/bin/go
  44. dest: /usr/bin/go
  45. state: link
  46. - name: Install common dependencies
  47. become: true
  48. apt:
  49. update_cache: true
  50. pkg:
  51. - autoconf
  52. - automake
  53. - cmake
  54. - valgrind
  55. - libev-dev
  56. - libc-ares-dev
  57. - libssl-dev
  58. - libtool
  59. - g++
  60. - g++-8
  61. - stunnel4
  62. - libidn2-dev
  63. - gnutls-bin
  64. - python-impacket
  65. - ninja-build
  66. - libgsasl7-dev
  67. - libnghttp2-dev
  68. - name: Install job-specific packages
  69. when: curl_apt_packages is defined
  70. become: true
  71. apt:
  72. pkg: "{{ curl_apt_packages }}"
  73. - name: Symlink /usr/bin/scan-build-10 to /usr/bin/scan-build
  74. when:
  75. - curl_apt_packages is defined
  76. - '"clang-tools-10" in curl_apt_packages'
  77. become: true
  78. file:
  79. src: /usr/bin/scan-build-10
  80. dest: /usr/bin/scan-build
  81. state: link
  82. - name: Run before script
  83. shell: "./scripts/zuul/before_script.sh"
  84. args:
  85. chdir: "{{ zuul.project.src_dir }}"
  86. environment: "{{ curl_env }}"
  87. ...