Asteroseismology from the main sequence to giant stars