*preprint*

**Inserted:** 20 sep 2024

**Last Updated:** 20 sep 2024

**Year:** 2024

**Abstract:**

For every non-vanishing spinor field on a Riemannian $7$-manifold, Crowley, Goette, and Nordstr\"om introduced the so-called $\nu$-invariant. This is an integer modulo $48$, and can be defined in terms of Mathai--Quillen currents, harmonic spinors, and $\eta$-invariants of spin Dirac and odd-signature operator. We compute these data for the compact two-step nilmanifolds admitting invariant closed $\mathrm G_2$-structures, in particular determining the harmonic spinors and relevant symmetries of the spectrum of the spin Dirac operator. We then deduce the vanishing of the $\nu$-invariants.