Solid helium (3He and 4He) in the hcp and fcc phases has been studied by path-integral Monte Carlo. Simulations were carried out in the isothermal-isobaric (NPT) ensemble at pressures up to 52 GPa. This allows one to study the temperature and pressure dependences of isotopic effects on the crystal volume and vibrational energy in a wide parameter range. The obtained equation of state at room temperature agrees with available experimental data. The kinetic energy, E_k, of solid helium is found to be larger than the vibrational potential energy, E_p. The ratio E_k/E_p amounts to about 1.4 at low pressures, and decreases as the applied pressure is raised, converging to 1, as in a harmonic solid. Results of these simulations have been compared with those yielded by previous path integral simulations in the NVT ensemble. The validity range of earlier approximations is discussed.