For this scenario, where the build pipeline requires a self-hosted agent and needs to run once daily for a period of 30 minutes, the most cost-effective compute type to recommend would be an Azure virtual machine.
Azure virtual machines (VMs) can be created and configured with the required build tools and dependencies, and can be used as self-hosted agents for Azure Pipelines. They offer the flexibility to choose the appropriate size and configuration based on the workload requirements. Additionally, they can be started and stopped on-demand to save costs when not in use.
Azure Kubernetes Service (AKS) cluster and Azure Container Instances (ACI) are container-based compute options, which are more suitable for running long-running, highly-scalable applications. They may not be the most cost-effective option for this scenario.
An Azure virtual machine scale set (VMSS) can automatically scale up or down based on the workload demand, but it may be overkill for a build pipeline that runs only once daily.