  We describe a one-dimensional self-gravitating system derived from the
problem of large-scale structure formation in cosmology. Considering small
times so that the expansion can be neglected we present a thermodynamical
analysis of this system. We find a second-order phase transition at $T_{c1}$
from an homogeneous equilibrium at high temperature to a clustered phase (with
a density peak at one of the boundaries of the system) at low temperature.
There also exists an infinite series of unstable equilibria which appear at
lower temperatures $T_{cn}$, reflecting the scale-free nature of the
gravitational interaction and the usual Jeans instability. We find that, as for
the similar HMF (Hamiltonian mean field) model, all three micro-canonical,
canonical and grand-canonical ensembles agree with each other, as well as with
the stability properties associated with a hydrodynamical approach. On the
other hand, the collisionless dynamics governed by the Vlasov equation yields
the same results except that at low $T$ the equilibrium associated with two
density peaks (one at each boundary) becomes stable.
