Many additive manufacturing (AM) processes are driven by a moving heat source. Thermal field evolution during the manufacturing process plays an important role in determining both geometric and mechanical properties of the fabricated parts. Thermal simulation of AM processes is challenging due to the geometric complexity of the manufacturing process and inherent computational complexity that requires a numerical solution at every time increment of the process. We propose a new general computational framework that supports scalable thermal simulation at path scale of any AM process driven by a moving heat source. The proposed framework has three novel ingredients. First, the path-level discretization is process-aware, which is based on the manufacturing primitives described by the scan path and the thermal model is formulated directly in terms of manufacturing primitives. Second, a spatial data structure, called contact graph, is used to represent the discretized domain and capture all possible thermal interactions during the simulation. Finally, the simulation is localized based on specific physical parameters of the manufacturing process, requiring at most a constant number of updates at each time step. The latter implies that the constructed simulation not only scales to handle three-dimensional (3D) printed components of arbitrary complexity but also can achieve real-time performance. To demonstrate the efficacy and generality of the framework, it has been successfully applied to build thermal simulations of two different AM processes, fused deposition modeling (FDM) and powder bed fusion (PBF).