In dark-matter searches using axion haloscopes, the search sensitivity depends on the quality factors (${Q}_{0}$) of radio-frequency cavities immersed in multitesla magnetic fields. Increasing ${Q}_{0}$ would increase the scan rate through the parameter space of interest. Researchers developing superconducting radio-frequency cavities for particle accelerators have developed methods for obtaining extremely high ${Q}_{0}$ of approximately ${10}^{11}$ in microteslascale magnetic fields. In this paper, we describe efforts to develop high-$Q$ cavities made from ${\mathrm{Nb}}_{3}\mathrm{Sn}$ films using a technique developed for particle-accelerator cavities. Geometry optimization for this application is explored, and two cavities are tested: an existing particle-accelerator-style cavity and a geometry developed and fabricated for use in high fields. A quality factor of $(5.3\ifmmode\pm\else\textpm\fi{}0.3)\ifmmode\times\else\texttimes\fi{}{10}^{5}$ is obtained at 3.9 GHz and 6 T at 4.2 K.