You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

133 lines
5.1 KiB

2 months ago
  1. # Configuration for Linux
  2. configs_linux = [
  3. # OS, compiler
  4. ("ubuntu-18.04", "gcc", ""),
  5. ("debian-9", "gcc", ""),
  6. ("debian-10", "gcc", ""),
  7. ("ubuntu-19.04", "gcc", ""),
  8. ]
  9. # Configurations for Mac
  10. configs_mac = [
  11. # OS, compiler
  12. ("osx", "clang", ""),
  13. ]
  14. # Build types
  15. build_types = [
  16. "DebugClnParser",
  17. "Release",
  18. "ReleaseCln",
  19. "ReleaseClnParser",
  20. ]
  21. python_versions = [
  22. "python3",
  23. ]
  24. if __name__ == "__main__":
  25. s = ""
  26. # Initial config
  27. s += "#\n"
  28. s += "# General config\n"
  29. s += "#\n"
  30. s += "branches:\n"
  31. s += " only:\n"
  32. s += " - master\n"
  33. s += "sudo: required\n"
  34. s += "dist: trusty\n"
  35. s += "language: generic\n"
  36. s += "\n"
  37. s += "# Enable docker support\n"
  38. s += "services:\n"
  39. s += "- docker\n"
  40. s += "\n"
  41. s += "notifications:\n"
  42. s += " email:\n"
  43. s += " on_failure: always\n"
  44. s += " on_success: change\n"
  45. s += " recipients:\n"
  46. s += ' - secure: "EQ9/ZrsTO2bBr3EReU8msl2XlV68ujQEdWVJdSFH5ZM7O1PxDbGARVVZspSCQcf4AdrZE2U8fMPPEgLp9pLIkMA4phm9wk+0USRzIO2xh+leN0t9Ka18cb4LhMtso5CYBU4OauQj/1D8jtu1tWEhSvW8wI2deVqPHvxdlLo4Cl7OiEBvyDj6jeRy/95fDWoMKYK/WrIWAdSs10kh1bVQecpRjdiD0OxHr8VWvP+6Ext1ZhuJuyHPP2Vui02FrSklA315MaVopVhapd3Oj5vExcmQjTkvO7GItcxwvgUHFinHp0aEhJ/FNkNGhzFnZcz8ijKa0MyrGVctYgZbOrycM1NE2uK/Pvaxc5hTFrAI3Jv+09lI3WD/iAtn59Uub18xJlm1z+4icwcHpFG8ch7jiJ5mIazPoivBoiFaIZLjLt0EB9KsPR1sPY3Y5d3oz8wN2w12gjbBBesIgqrjZvdf5+8WAzQrgV8tRlWidlucvr88bGC2IPO8t61ZKdVAZHSEeBejE5/VExq6RyGga6YUdm/sH7a8kmU2BXIxf3UIuQG03Atx7GMF4nv2XDtdWFkDoTeHQyLbu8mQfFFjbIKrGou3GGXm/I+cA99as9VLbvU+prs0ENBIZVddi8fojX2JqcI9n5f4Fe1ZrSaKBt72vtQ2PI38p8f84/qvT69fRp4="\n'
  47. s += ' - secure: "pSV8JF2LGd0CT6N3CYMrJE5bE2wjmCouKtEEH2NfIhLvkYR0tbB6TcGyKBANkbqXSp4Tvtja+hyRjeOJpabLHXNg9XPy2NkXSvNeGjwB2HVlrwC8EB4TxouP3jQrNRo1Rz+OrPkePhkS2OkMQ9gx8ZFfeYfpUttXGoqZdoIb3k9aUN7VjxQndp/VMO8BiRlmfEt/RmfKjcSJYFs8/+4flT45n63R+3JscuawPIgtg+R0Cl11PcG63Vfn+cBpi4FOlU5A3w7PEfoxQ1swlu3fcv4R174LB7cWh1HHL+Yi81kdxpDhAbjjrUSD+jLjTigkEV9duzHu+NN34g2uBzVZ5p9RW6vAC3YyG5wAy0CphaP92FYfHpOV41uHO0VXfkMvo8Xc+TKZRxsDkzjHzyfOp/RujPR/uvafKdYFqz9PvQSunpandKT+pjWdO8K60UCaE9H2wFEWZUULPGlOejMM2Ke/6V4l0wGrVSBZ3GcrGNOIqO97ML644/p78NB6/mz0AnWeeHOlyZPBRryqYNlZSs9hV2Vo8FLUjG5odE4ppBchUCyGDAnfmZ8kCsuONM+eye4l2jm+iiWPbXeVQ2Ffc2boEBcyMDw+LK9EDZUConJJUyuedwoRbmSvveF5rbEPmKEw5Vpzpst+OVH00cWnN+Ka6KdAGMmimqgzZ/YDtew="\n'
  48. s += "\n"
  49. s += "#\n"
  50. s += "# Dependencies\n"
  51. s += "#\n"
  52. s += "addons:\n"
  53. s += " homebrew:\n"
  54. s += " packages:\n"
  55. s += " - coreutils\n"
  56. s += " - cmake\n"
  57. s += " - gmp\n"
  58. s += " - cln\n"
  59. s += " - ginac\n"
  60. s += " - boost\n"
  61. s += " - eigen\n"
  62. s += " - python\n"
  63. s += " - python3\n"
  64. s += " - maven\n"
  65. s += "\n"
  66. s += "#\n"
  67. s += "# Configuration\n"
  68. s += "#\n"
  69. s += "jobs:\n"
  70. s += " include:\n"
  71. # Generate all configurations
  72. # Mac OS X
  73. for config in configs_mac:
  74. osx = config[0]
  75. compiler = "{}{}".format(config[1], config[2])
  76. s += " # {}\n".format(osx)
  77. for python in python_versions:
  78. buildConfig = ""
  79. for build in build_types:
  80. buildConfig += " - os: osx\n"
  81. buildConfig += " compiler: {}\n".format(config[1])
  82. buildConfig += " env: TASK=Test PYTHON={} CONFIG={} COMPILER={} STL=libc++\n".format(python, build, compiler)
  83. buildConfig += " script: travis/build.sh\n"
  84. s += buildConfig
  85. # Linux via Docker
  86. for config in configs_linux:
  87. linux = config[0]
  88. compiler = "{}{}".format(config[1], config[2])
  89. s += " # {}\n".format(linux)
  90. for python in python_versions:
  91. buildConfig = ""
  92. for build in build_types:
  93. buildConfig += " - os: linux\n"
  94. buildConfig += " compiler: {}\n".format(config[1])
  95. buildConfig += " env: TASK=Test PYTHON={} CONFIG={} LINUX={} COMPILER={}\n".format(python, build, linux, compiler)
  96. buildConfig += " script: travis/build.sh\n"
  97. s += buildConfig
  98. # Documentation
  99. config = configs_linux[-1]
  100. linux = config[0]
  101. compiler = "{}{}".format(config[1], config[2])
  102. s += " # Documentation\n".format()
  103. python = python_versions[0]
  104. buildConfig = ""
  105. build = build_types[-1]
  106. buildConfig += " - os: linux\n"
  107. buildConfig += " compiler: {}\n".format(config[1])
  108. buildConfig += " env: TASK=Documentation PYTHON={} CONFIG={} LINUX={} COMPILER={}\n".format(python, build, linux, compiler)
  109. buildConfig += " script: travis/build.sh\n"
  110. buildConfig += " before_deploy:\n"
  111. buildConfig += " docker cp pycarl:/opt/pycarl/. .\n"
  112. buildConfig += " deploy:\n"
  113. buildConfig += " provider: pages\n"
  114. buildConfig += " skip_cleanup: true\n"
  115. buildConfig += " github_token: $GITHUB_TOKEN\n"
  116. buildConfig += " local_dir: doc/build/html/\n"
  117. buildConfig += " on:\n"
  118. buildConfig += " branch: master\n"
  119. s += buildConfig
  120. print(s)