  Binary systems are a well-established subclass of gamma-ray sources. The high
mass X-ray binary pulsar 1A~0535+262 has been considered to be a possible
gamma-ray emitter for a long time, although former gamma-ray searches using
\textit{Fermi}-LAT and VERITAS data resulted in upper limits only. We aim at a
deep search for gamma-ray emission and pulsations from 1A~0535+262 using more
than 13 years of \textit{Fermi}-LAT data. The analysis was performed for both
the whole \textit{Fermi}-LAT data set, as well as for the X-ray outbursts that
1A~0535+262 has experienced since the launch of \textit{Fermi}. Various X-ray
observations have been used to generate the ephemeris for the pulsation search.
We also investigate the long-term gamma-ray flux variability and perform
orbital phase-resolved analysis for the outbursts. We did not detect any steady
or pulsed gamma-ray emission from 1A~0535+262 during the whole
\textit{Fermi}-LAT mission span or its X-ray outbursts. We thus derived the
deepest gamma-ray luminosity upper limits to date at the 95\% confidence level
to be around (2.3$-$4.7)$\times 10^{32}\, \rm erg \, s^{-1}$ depending on
different spectral indices assumed, which results in a ratio of $L_{\rm
\gamma}$ to $L_{\rm X}$ (2$-$150 keV) being (1.9$-$3.9)$\times10^{-6}$.
