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.

Makefile 2.3KB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. .SILENT:
  2. .PHONY: \
  3. docs docs-server docs-watch docs-sync-server linux-ci macos-ci \
  4. vagrant-freebsd-ci site alpine-static-ci _alpine-static-ci poetry-setup \
  5. full-ci dev-build release-build
  6. clean:
  7. rm -f -vr -- $(shell find -name __pycache__ -type d)
  8. rm -f -vr -- _build/ _prebuilt/
  9. rm -f -v -- $(shell find -name "*.stamp" -type f)
  10. docs:
  11. sphinx-build -b html \
  12. docs \
  13. _build/docs \
  14. -d _build/doctrees \
  15. -Wqanj8
  16. echo "Docs generated to _build/docs"
  17. hugo-docs:
  18. env GEN_FOR_HUGO=1 $(MAKE) docs
  19. docs-server: docs
  20. echo "Docs are visible on http://localhost:9794/"
  21. cd _build/docs && \
  22. python -m http.server 9794
  23. docs-watch: docs
  24. +sh tools/docs-watch.sh
  25. docs-sync-server:
  26. mkdir -p _build/docs
  27. cd _build/docs && \
  28. browser-sync start --server \
  29. --reload-delay 300 \
  30. --watch **/*.html
  31. .poetry.stamp: poetry.lock
  32. poetry install --no-dev
  33. touch .poetry.stamp
  34. poetry-setup: .poetry.stamp
  35. full-ci: poetry-setup
  36. poetry run dds-ci --clean
  37. dev-build: poetry-setup
  38. poetry run dds-ci --rapid
  39. release-build: poetry-setup
  40. poetry run dds-ci --no-test
  41. macos-ci: full-ci
  42. mv _build/dds _build/dds-macos-x64
  43. linux-ci: full-ci
  44. mv _build/dds _build/dds-linux-x64
  45. _alpine-static-ci:
  46. poetry install --no-dev
  47. # Alpine Linux does not ship with ASan nor UBSan, so we can't use them in
  48. # our test-build. Just use the same build for both. CCache will also speed this up.
  49. poetry run dds-ci \
  50. --bootstrap-with=lazy \
  51. --test-toolchain=tools/gcc-9-static-rel.jsonc \
  52. --main-toolchain=tools/gcc-9-static-rel.jsonc
  53. mv _build/dds _build/dds-linux-x64
  54. alpine-static-ci:
  55. docker build \
  56. --build-arg DDS_USER_UID=$(shell id -u) \
  57. -t dds-builder \
  58. -f tools/Dockerfile.alpine \
  59. tools/
  60. docker run \
  61. -t --rm \
  62. -u $(shell id -u) \
  63. -v $(PWD):/host -w /host \
  64. -e CCACHE_DIR=/host/.docker-ccache \
  65. dds-builder \
  66. make _alpine-static-ci
  67. vagrant-freebsd-ci:
  68. vagrant up freebsd11
  69. vagrant rsync
  70. vagrant ssh freebsd11 -c '\
  71. cd /vagrant && \
  72. make full-ci \
  73. '
  74. mkdir -p _build/
  75. vagrant scp freebsd11:/vagrant/_build/dds _build/dds-freebsd-x64
  76. vagrant halt
  77. site: docs
  78. rm -r -f -- _site/
  79. mkdir -p _site/
  80. cp site/index.html _site/
  81. cp -r _build/docs _site/
  82. echo "Site generated at _site/"
  83. py-check:
  84. poetry run mypy tools/dds_ci
  85. poetry run pylint tools/dds_ci
  86. format:
  87. poetry run dds-format