mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-07 20:35:33 -04:00
Switch to process isolation mode by default and give an option to use hyperv isolation to improve performance
This commit is contained in:
parent
d47dc754af
commit
974b785700
@ -117,6 +117,11 @@ inputs:
|
|||||||
'Amount of memory to assign the docker container. Defaults to 95% of total system memory rounded down to the
|
'Amount of memory to assign the docker container. Defaults to 95% of total system memory rounded down to the
|
||||||
nearest megabyte on Linux and 80% on Windows. On unrecognized platforms, defaults to 75% of total system memory.
|
nearest megabyte on Linux and 80% on Windows. On unrecognized platforms, defaults to 75% of total system memory.
|
||||||
To manually specify a value, use the format <number><unit>, where unit is either m or g. ie: 512m = 512 megabytes'
|
To manually specify a value, use the format <number><unit>, where unit is either m or g. ie: 512m = 512 megabytes'
|
||||||
|
dockerIsolationMode:
|
||||||
|
required: false
|
||||||
|
default: 'process'
|
||||||
|
description:
|
||||||
|
'Isolation mode to use for the docker container. Can be either process or hyperv. Only applicable on Windows'
|
||||||
allowDirtyBuild:
|
allowDirtyBuild:
|
||||||
required: false
|
required: false
|
||||||
default: ''
|
default: ''
|
||||||
|
BIN
dist/index.js
generated
vendored
BIN
dist/index.js
generated
vendored
Binary file not shown.
BIN
dist/index.js.map
generated
vendored
BIN
dist/index.js.map
generated
vendored
Binary file not shown.
@ -98,6 +98,7 @@ class Docker {
|
|||||||
dockerWorkspacePath,
|
dockerWorkspacePath,
|
||||||
dockerCpuLimit,
|
dockerCpuLimit,
|
||||||
dockerMemoryLimit,
|
dockerMemoryLimit,
|
||||||
|
dockerIsolationMode,
|
||||||
} = parameters;
|
} = parameters;
|
||||||
|
|
||||||
return `docker run \
|
return `docker run \
|
||||||
@ -118,6 +119,7 @@ class Docker {
|
|||||||
--volume "${actionFolder}/BlankProject":"c:/BlankProject" \
|
--volume "${actionFolder}/BlankProject":"c:/BlankProject" \
|
||||||
--cpus=${dockerCpuLimit} \
|
--cpus=${dockerCpuLimit} \
|
||||||
--memory=${dockerMemoryLimit} \
|
--memory=${dockerMemoryLimit} \
|
||||||
|
--isolation=${dockerIsolationMode} \
|
||||||
${image} \
|
${image} \
|
||||||
powershell c:/steps/entrypoint.ps1`;
|
powershell c:/steps/entrypoint.ps1`;
|
||||||
}
|
}
|
||||||
|
@ -252,6 +252,10 @@ class Input {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static get dockerIsolationMode(): string {
|
||||||
|
return Input.getInput('dockerIsolationMode') || 'process';
|
||||||
|
}
|
||||||
|
|
||||||
public static ToEnvVarFormat(input: string) {
|
public static ToEnvVarFormat(input: string) {
|
||||||
if (input.toUpperCase() === input) {
|
if (input.toUpperCase() === input) {
|
||||||
return input;
|
return input;
|
||||||
|
Loading…
Reference in New Issue
Block a user