The EXLA Makefile uses -O3 by default which causes massive memory usage
during C++ compilation. DEBUG=1 replaces -O3 with -g, drastically
reducing peak RAM. Combined with MAKEFLAGS=-j1 to serialize jobs, this
should fit within CI runner memory limits.
EXLA's cached_make copies libexla.so but Make still compiles .o files
when they're missing from deps/exla/cache/ (they don't survive
mix deps.get). Save the pre-built cache/ directory at /opt/exla-cache/
in the CI image and restore it after mix deps.get in the test step.
With both .o files and libexla.so present, Make skips all C++ compilation.
EXLA's cached_make needs Mix.Tasks.Compile.ElixirMake (from elixir_make),
which must be compiled first. mix deps.compile exla alone doesn't handle
transitive compile-time deps. Use mix deps.compile without args to
compile in dependency order.
- Dockerfile.ci: compile xla dep before exla — exla's extract_xla
calls XLA.archive_path!/0 which requires xla to be compiled first
- Fold build-ci-image into build.yaml as prerequisite job so tests
always have the precompiled EXLA image available
- Remove standalone build-ci-image.yaml (redundant)
Add Dockerfile.ci that extends the hexpm/elixir image with precompiled
EXLA NIF cached at ~/.cache/xla/. When mix test runs, EXLA's cached_make
finds the precompiled libexla.so and skips the OOM-prone g++ C++
compilation entirely.
- Dockerfile.ci: two-stage build — builder compiles EXLA into cache;
final stage copies the cache and installs test deps (cdo)
- .forgejo/workflows/build-ci-image.yaml: builds and pushes prop-ci
image on mix.exs/mix.lock/vendor changes + weekly cron
- .forgejo/workflows/build.yaml: test step uses prop-ci:latest instead
of raw hexpm/elixir image, removing apt-get + hex/rebar install steps