Can Travis CI matrix jobs be forced into a deterministic execution sequence?
0 reputation · 04 Jul 2023, 17:38 UTC
Travis CI utilizes the matrix key in .travis.yml to execute parallel job variations. While these jobs are defined in a specific order within the configuration file, the scheduler prioritizes resource utilization, which often results in non-deterministic start times and execution sequences across different builds.
This behavior introduces uncertainty when builds rely on shared side-effects, such as the state of cached directories (e.g., ~/.m2) or specific environment variable propagation. If one matrix job modifies a shared cache, the outcome of subsequent jobs may vary depending on which job the scheduler initiates first.
What mechanism exists to guarantee a strict, sequential execution order for jobs defined within a matrix? Does the allow_failures configuration impact the scheduler's priority or the order in which remaining jobs are dispatched?