This avoids using Mix while compiling which simplifies
a number of things and let us do further build improvements
later on.
Elixir is only enabled from within rabbitmq_cli currently.
Eunit is disabled since there are only Elixir tests.
Dialyzer will force-enable Elixir in order to process
Elixir-compiled beam files.
This commit also includes a few changes that are
related:
* The Erlang distribution will now be started for parallel-ct
* Many unnecessary PROJECT_MOD lines have been removed
* `eunit_formatters` has been removed, it provides little value
* The new `maybe_flock` Erlang.mk function is used where possible
* Build test deps when testing rabbitmq_cli (Mix won't do it anymore)
* rabbitmq_ct_helpers now use the early plugins to have Dialyzer
properly set up
bazel-erlang has been renamed rules_erlang. v2 is a substantial
refactor that brings Windows support. While this alone isn't enough to
run all rabbitmq-server suites on windows, one can at least now start
the broker (bazel run broker) and run the tests that do not start a
background broker process
They were trying to run `hostname` and `which`, which produced a bunch
of error messages in a hermetic build environment.
And performance of those `shell` calls is not very important, as they
are caled just a few times during script runtime anyway (there is a
hack to make these lazy, but evaluating only once - but it's hardly
worth it).
* Add bazel-test make target so that we can run tests in bazel quickly
Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
Co-authored-by: Philip Kuryloski <kuryloskip@vmware.com>
Mix clusters with v3.7 and v3.8, currently on both erlang versions. As
this also increases the actions duration rabbit ct-* suites have been
de-grouped such that multiple ct suites are no longer run as part of a
GitHub Actions job.
- Provide RABBITMQ_VERSION so that plugin version compatibility checks work
correctly
- Run tests generally as an unpriveleged user in docker, like we do in concourse
- Set USER in the env for erlang-cookie-sources tests
Once the monorepo is built, from within it one can run `make
fetch-topic-branch-${TOPIC_BRANCH}` then `make
topic-branch-${TOPIC_BRANCH}` to rebase the commits from all the
sources back onto the monorepo
Add GitHub Actions workflows for Erlang/OTP 22.3 & 23.0.
The workflows run tests for each component that is now part of this
repo, with test suite parallelization specifically for the rabbit
erlang application.
`$MIX_HOME` is used by mix(1) (for `~/.mix` equivalent). But the Hex
plugin does not use this variable to store `~/.hex`. Instead, it
apparently still relies on `$HOME` only.
So set and export both variables.
If I understand the code correctly, it should be enough to point mix(1)
to the packages we add to the source archive for offline build.
There should be no need to mess with `$HOME` or `$XDG_*_HOME`.
... by using the `override` directive to enforce our internal value.
As a reminder, this a hack to convince mix(1) to work offline and use a
copy of the Hex.pm cache provided in the source archive.
Note that this file was moved from rabbitmq-common. It has no use there
and it avoids the need to go through the entire CI pipeline if we want
to change this file.
The `stats.mk` file was also moved to the new `mk` subdirectory to avoid
file pollution at the root of this project.