Files
ortools-clone/bazel/docs/ci.md
2022-01-06 17:06:56 +01:00

869 B

CI: Makefile/Docker testing

To test the build on various distro, I'm using docker containers and a Makefile for orchestration.

pros:

  • You are independent of third party CI runner VM images (e.g. github actions/virtual-environments).
  • You can run it locally on any host having a linux docker image support.
  • Most CI provide runner with docker and Makefile installed.

cons:

  • Only GNU/Linux distro supported.
  • Could take few GiB (~30 GiB for all distro and all languages)
    • ~500MiB OS + C++/CMake tools,

Usage

To get the help simply type:

make

note: you can also use from top directory

make --directory=bazel

Example

For example to test inside an Ubuntu container:

make ubuntu_test

Docker Layers

Dockerfile is splitted in several stages.

docker