This paper presents an optimal control co-design framework of a parallel electric-hydraulic hybrid powertrain specifically tailored for heavy-duty vehicles. A pure electric powertrain, comprising a rechargeable lithium-ion battery, a highly efficient electric motor, and a single or double-speed gearbox, has garnered significant attention in the automotive sector due to the increasing demand for clean and efficient mobility. However, the state-of-the-art has demonstrated limited capabilities and has struggled to meet the design requirements of heavy-duty vehicles with high power demands, such as a class 8 semi-trailer truck. This is especially evident in terms of a driving range on one battery charge, battery charging time, and load-carrying capacity. These challenges primarily stem from the low power density of lithium-ion batteries and the low energy conversion efficiency of electric motors at low speeds. To address these issues, a recent development is the electric-hydraulic hybrid powertrain. This system includes a hydro-pneumatic accumulator (i.e. a hydraulic energy storage system) and a hydraulic pump/motor (i.e. a hydraulic-mechanical energy conversion system) in addition to all the components of the electric powertrain. The high-level energy control methods of this hybrid powertrain have been extensively studied. In this work, an optimal control co-design framework involving hardware sizing and high-level energy control for a parallel electric-hydraulic hybrid powertrain is addressed. The objective is to maximize overall energy efficiency using a bi-level optimization method. The outer loop seeks optimal sizes for two energy storage systems: the rechargeable lithium-ion battery capacity and the hydro-pneumatic accumulator volume, determining the maximum electric and hydraulic storable energies. Meanwhile, the inner loop aims for optimal energy control with a set of energy storage system sizes using dynamic programming. Numerical studies demonstrate considerable benefits of the proposed control co-design method by applying it to real-world heavy-duty driving cycles. These benefits include reduced electric energy consumption of the lithium-ion battery, potentially allowing for a smaller battery size. Consequently, this increases load-carrying capacity and subjects the rechargeable battery to milder electric stress, thus extending the lifespan. These improvements are achieved through an aggressive use of hydraulic components during regenerative braking and high torque conditions at low vehicle speeds.