We investigate the influence of streamwise-elongated and spanwise-periodic roughness arrays on the supersonic boundary-layer instability under the assumption of a high Reynolds number. The main focus is on the lower-branch viscous instability modes, and the spanwise spacing of the roughness arrays is taken to be comparable to the characteristic wavelength of the modes (which is on the triple-deck scale), so that most significant effects can be generated. The streamwise length scale of the elements is much greater than the spanwise length scale. The roughness height is determined by requiring the change of the wall shear to be O(1). The equations governing the nonlinear roughness-induced streaky flow are deduced from the standard triple-deck theory. These equations are parabolic in the streamwise direction and are solved using a streamwise marching method to characterize the evolution of streaky structures. The linear stability of the streaky flow is analyzed. By exploiting the asymptotic structure, the bi-global eigenvalue problem is reduced to a one-dimensional one, where the stability is found to be controlled by the spanwise-dependent wall shear. The reduced eigenvalue problem is solved numerically. The results show that roughness arrays inhibit instability modes with moderate frequencies but promote high-frequency modes. Roughness elements of greater height have stronger effects on the linear stability. The shape of roughness elements plays an important role. A significant feature, different from the subsonic case, is that fundamental and superharmonic resonance modes radiate sound waves spontaneously into the far field.