  To understand the chemistry of sulphur (S) in the interstellar medium, models
need to be tested by observations of S-bearing molecules in different physical
conditions. We analyse observations obtained with the IRAM 30m telescope
towards 15 well-known cores classified in the three main evolutionary stages of
the high-mass star-formation process: high-mass starless cores,high-mass
protostellar objects, and ultracompact HII regions. We detected rotational
lines of SO, SO+, NS, C34S, 13CS, SO2, CCS, H2S, HCS+, OCS, H2CS, and CCCS. We
also analyse for the first time lines of the NO molecule to complement the
analysis. From a local thermodynamic equilibrium approach, we have derived
column densities of each species and excitation temperatures. Based on a
statistical analysis on the line widths and the excitation temperatures, we
find that: NS, C34S, 13CS, CCS, and HCS+ trace cold, quiescent, and likely
extended material; OCS, and SO2 trace warmer, more turbulent, and likely denser
and more compact material; SO and perhaps SO+ trace both quiescent and
turbulent material depending on the target. The abundances of SO, SO2, and H2S
show the strongest positive correlations with the kinetic temperature, believed
to be an evolutionary indicator. Moreover, the sum of all molecular abundances
show an enhancement of gaseous S from the less evolved to the more evolved
stages. These trends could be due to the increasing amount of S sputtered from
dust grains owing to the increasing protostellar activity with evolution. The
average abundances in each evolutionary group increase especially in the
oxygen-bearing molecules, perhaps due to the increasing abundance of atomic
oxygen with evolution owing to photodissociation of water in gas phase. Our
observational work represents a test-bed for theoretical studies aimed at
modelling the chemistry of sulphur during the evolution of high-mass
star-forming cores
