Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,95 @@ inputs:
description:
'[Orchestrator] Specifies the repo for the unity builder. Useful if you forked the repo for testing, features, or
fixes.'
gcpProject:
required: false
default: ''
description:
'[Orchestrator] [Experimental] Google Cloud project ID for Cloud Run Jobs provider.
Falls back to GOOGLE_CLOUD_PROJECT env var.'
gcpRegion:
required: false
default: ''
description:
'[Orchestrator] [Experimental] Google Cloud region for Cloud Run Jobs (e.g. us-central1).
Defaults to the region input if empty.'
gcpBucket:
required: false
default: ''
description:
'[Orchestrator] [Experimental] GCS bucket name for build artifact storage.
Mounted via GCS FUSE for large filesystem support.'
gcpMachineType:
required: false
default: 'e2-standard-4'
description:
'[Orchestrator] [Experimental] Machine type for Cloud Run Jobs (e.g. e2-standard-4, e2-highmem-8).'
gcpDiskSizeGb:
required: false
default: '100'
description:
'[Orchestrator] [Experimental] Disk size in GB for Cloud Run Jobs. Supports up to 32GB
in-memory or unlimited via GCS FUSE bucket mount.'
gcpServiceAccount:
required: false
default: ''
description:
'[Orchestrator] [Experimental] Google Cloud service account email for Cloud Run Jobs execution.'
gcpVpcConnector:
required: false
default: ''
description:
'[Orchestrator] [Experimental] VPC connector name for Cloud Run Jobs private networking.'
azureResourceGroup:
required: false
default: ''
description:
'[Orchestrator] [Experimental] Azure resource group for Container Instances provider.
Falls back to AZURE_RESOURCE_GROUP env var.'
azureLocation:
required: false
default: ''
description:
'[Orchestrator] [Experimental] Azure region for Container Instances (e.g. eastus, westeurope).
Defaults to the region input if empty.'
azureStorageAccount:
required: false
default: ''
description:
'[Orchestrator] [Experimental] Azure Storage Account name for file share mounting.
Uses Premium FileStorage for high-throughput large artifact I/O.'
azureFileShareName:
required: false
default: 'unity-builds'
description:
'[Orchestrator] [Experimental] Azure File Share name within the storage account.
Supports up to 100 TiB per share.'
azureSubscriptionId:
required: false
default: ''
description:
'[Orchestrator] [Experimental] Azure subscription ID. Falls back to AZURE_SUBSCRIPTION_ID env var.'
azureCpu:
required: false
default: '4'
description:
'[Orchestrator] [Experimental] CPU cores for Azure Container Instances (1-16).'
azureMemoryGb:
required: false
default: '16'
description:
'[Orchestrator] [Experimental] Memory in GB for Azure Container Instances (1-16).'
azureDiskSizeGb:
required: false
default: '100'
description:
'[Orchestrator] [Experimental] File share quota in GB for Azure Container Instances.
Premium shares support up to 102400 GB (100 TiB).'
azureSubnetId:
required: false
default: ''
description:
'[Orchestrator] [Experimental] Azure subnet resource ID for VNet-integrated Container Instances.'

outputs:
volume:
Expand Down
36 changes: 36 additions & 0 deletions src/model/build-parameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,26 @@ class BuildParameters {
public unityHubVersionOnMac!: string;
public dockerWorkspacePath!: string;

// GCP Cloud Run (Experimental)
public gcpProject!: string;
public gcpRegion!: string;
public gcpBucket!: string;
public gcpMachineType!: string;
public gcpDiskSizeGb!: string;
public gcpServiceAccount!: string;
public gcpVpcConnector!: string;

// Azure Container Instances (Experimental)
public azureResourceGroup!: string;
public azureLocation!: string;
public azureStorageAccount!: string;
public azureFileShareName!: string;
public azureSubscriptionId!: string;
public azureCpu!: string;
public azureMemoryGb!: string;
public azureDiskSizeGb!: string;
public azureSubnetId!: string;

public static shouldUseRetainedWorkspaceMode(buildParameters: BuildParameters) {
return buildParameters.maxRetainedWorkspaces > 0 && Orchestrator.lockedWorkspace !== ``;
}
Expand Down Expand Up @@ -228,6 +248,22 @@ class BuildParameters {
inputPullCommand: OrchestratorOptions.inputPullCommand,
pullInputList: OrchestratorOptions.pullInputList,
kubeStorageClass: OrchestratorOptions.kubeStorageClass,
gcpProject: Input.gcpProject,
gcpRegion: Input.gcpRegion,
gcpBucket: Input.gcpBucket,
gcpMachineType: Input.gcpMachineType,
gcpDiskSizeGb: Input.gcpDiskSizeGb,
gcpServiceAccount: Input.gcpServiceAccount,
gcpVpcConnector: Input.gcpVpcConnector,
azureResourceGroup: Input.azureResourceGroup,
azureLocation: Input.azureLocation,
azureStorageAccount: Input.azureStorageAccount,
azureFileShareName: Input.azureFileShareName,
azureSubscriptionId: Input.azureSubscriptionId,
azureCpu: Input.azureCpu,
azureMemoryGb: Input.azureMemoryGb,
azureDiskSizeGb: Input.azureDiskSizeGb,
azureSubnetId: Input.azureSubnetId,
cacheKey: OrchestratorOptions.cacheKey,
maxRetainedWorkspaces: Number.parseInt(OrchestratorOptions.maxRetainedWorkspaces),
useLargePackages: OrchestratorOptions.useLargePackages,
Expand Down
66 changes: 66 additions & 0 deletions src/model/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,72 @@ class Input {
return Input.getInput('skipActivation')?.toLowerCase() ?? 'false';
}

// GCP Cloud Run (Experimental)
static get gcpProject(): string {
return Input.getInput('gcpProject') ?? '';
}

static get gcpRegion(): string {
return Input.getInput('gcpRegion') ?? '';
}

static get gcpBucket(): string {
return Input.getInput('gcpBucket') ?? '';
}

static get gcpMachineType(): string {
return Input.getInput('gcpMachineType') ?? 'e2-standard-4';
}

static get gcpDiskSizeGb(): string {
return Input.getInput('gcpDiskSizeGb') ?? '100';
}

static get gcpServiceAccount(): string {
return Input.getInput('gcpServiceAccount') ?? '';
}

static get gcpVpcConnector(): string {
return Input.getInput('gcpVpcConnector') ?? '';
}

// Azure Container Instances (Experimental)
static get azureResourceGroup(): string {
return Input.getInput('azureResourceGroup') ?? '';
}

static get azureLocation(): string {
return Input.getInput('azureLocation') ?? '';
}

static get azureStorageAccount(): string {
return Input.getInput('azureStorageAccount') ?? '';
}

static get azureFileShareName(): string {
return Input.getInput('azureFileShareName') ?? 'unity-builds';
}

static get azureSubscriptionId(): string {
return Input.getInput('azureSubscriptionId') ?? '';
}

static get azureCpu(): string {
return Input.getInput('azureCpu') ?? '4';
}

static get azureMemoryGb(): string {
return Input.getInput('azureMemoryGb') ?? '16';
}

static get azureDiskSizeGb(): string {
return Input.getInput('azureDiskSizeGb') ?? '100';
}

static get azureSubnetId(): string {
return Input.getInput('azureSubnetId') ?? '';
}

public static ToEnvVarFormat(input: string) {
if (input.toUpperCase() === input) {
return input;
Expand Down
10 changes: 10 additions & 0 deletions src/model/orchestrator/orchestrator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import OrchestratorEnvironmentVariable from './options/orchestrator-environment-
import TestOrchestrator from './providers/test';
import LocalOrchestrator from './providers/local';
import LocalDockerOrchestrator from './providers/docker';
import GcpCloudRunProvider from './providers/gcp-cloud-run';
import AzureAciProvider from './providers/azure-aci';
import loadProvider from './providers/provider-loader';
import GitHub from '../github';
import SharedWorkspaceLocking from './services/core/shared-workspace-locking';
Expand Down Expand Up @@ -158,6 +160,14 @@ class Orchestrator {
case 'local':
Orchestrator.Provider = new LocalOrchestrator();
break;
case 'gcp-cloud-run':
OrchestratorLogger.log('⚠ EXPERIMENTAL: GCP Cloud Run Jobs provider');
Orchestrator.Provider = new GcpCloudRunProvider(Orchestrator.buildParameters);
break;
case 'azure-aci':
OrchestratorLogger.log('⚠ EXPERIMENTAL: Azure Container Instances provider');
Orchestrator.Provider = new AzureAciProvider(Orchestrator.buildParameters);
break;
default:
// Try to load provider using the dynamic loader for unknown providers
try {
Expand Down
Loading
Loading