1
0

setup_complement_prerequisites.sh 886 B

1234567891011121314151617181920212223242526
  1. #!/bin/sh
  2. #
  3. # Common commands to set up Complement's prerequisites in a GitHub Actions CI run.
  4. #
  5. # Must be called after Synapse has been checked out to `synapse/`.
  6. #
  7. set -eu
  8. alias block='{ set +x; } 2>/dev/null; func() { echo "::group::$*"; set -x; }; func'
  9. alias endblock='{ set +x; } 2>/dev/null; func() { echo "::endgroup::"; set -x; }; func'
  10. block Install Complement Dependencies
  11. sudo apt-get -qq update && sudo apt-get install -qqy libolm3 libolm-dev
  12. go install -v github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
  13. endblock
  14. block Install custom gotestfmt template
  15. mkdir .gotestfmt/github -p
  16. cp synapse/.ci/complement_package.gotpl .gotestfmt/github/package.gotpl
  17. endblock
  18. block Check out Complement
  19. # Attempt to check out the same branch of Complement as the PR. If it
  20. # doesn't exist, fallback to HEAD.
  21. synapse/.ci/scripts/checkout_complement.sh
  22. endblock