disable lz4 compression by default
parent
78a1e42e0a
commit
6339c854bd
|
|
@ -83,7 +83,7 @@ jobs:
|
||||||
targetPlatform: ${{ matrix.targetPlatform }}
|
targetPlatform: ${{ matrix.targetPlatform }}
|
||||||
cloudRunnerCluster: ${{ matrix.cloudRunnerCluster }}
|
cloudRunnerCluster: ${{ matrix.cloudRunnerCluster }}
|
||||||
- run: |
|
- run: |
|
||||||
mv ./cloud-runner-cache/${{ steps.unity-build.outputs.CACHE_KEY }}/build/build-${{ steps.unity-build.outputs.BUILD_GUID }}.tar.lz4 build-${{ steps.unity-build.outputs.BUILD_GUID }}.tar.lz4
|
mv ./cloud-runner-cache/${{ steps.unity-build.outputs.CACHE_KEY }}/build/${{ steps.unity-build.outputs.BUILD_ARTIFACT }} ${{ steps.unity-build.outputs.BUILD_ARTIFACT }}
|
||||||
ls
|
ls
|
||||||
###########################
|
###########################
|
||||||
# Upload #
|
# Upload #
|
||||||
|
|
@ -91,5 +91,5 @@ jobs:
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: Local Build (${{ matrix.targetPlatform }})
|
name: Local Build (${{ matrix.targetPlatform }})
|
||||||
path: build-${{ steps.unity-build.outputs.BUILD_GUID }}.tar.lz4
|
path: ${{ steps.unity-build.outputs.BUILD_ARTIFACT }}
|
||||||
retention-days: 14
|
retention-days: 14
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,7 @@ jobs:
|
||||||
customStepFiles: aws-s3-upload-build,aws-s3-pull-cache,aws-s3-upload-cache
|
customStepFiles: aws-s3-upload-build,aws-s3-pull-cache,aws-s3-upload-cache
|
||||||
githubChecks: true
|
githubChecks: true
|
||||||
- run: |
|
- run: |
|
||||||
aws s3 cp s3://game-ci-test-storage/cloud-runner-cache/${{ steps.unity-build.outputs.CACHE_KEY }}/build/build-${{ steps.unity-build.outputs.BUILD_GUID }}.tar.lz4 build-${{ steps.unity-build.outputs.BUILD_GUID }}.tar.lz4
|
aws s3 cp s3://game-ci-test-storage/cloud-runner-cache/${{ steps.unity-build.outputs.CACHE_KEY }}/build/${{ steps.unity-build.outputs.BUILD_ARTIFACT }} ${{ steps.unity-build.outputs.BUILD_ARTIFACT }}
|
||||||
ls
|
ls
|
||||||
- run: yarn run cli -m list-resources
|
- run: yarn run cli -m list-resources
|
||||||
env:
|
env:
|
||||||
|
|
@ -149,7 +149,7 @@ jobs:
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.cloudRunnerCluster }} Build (${{ matrix.targetPlatform }})
|
name: ${{ matrix.cloudRunnerCluster }} Build (${{ matrix.targetPlatform }})
|
||||||
path: build-${{ steps.unity-build.outputs.BUILD_GUID }}.tar.lz4
|
path: ${{ steps.unity-build.outputs.BUILD_ARTIFACT }}
|
||||||
retention-days: 14
|
retention-days: 14
|
||||||
buildTests:
|
buildTests:
|
||||||
name: Build Tests - Providers
|
name: Build Tests - Providers
|
||||||
|
|
@ -204,7 +204,7 @@ jobs:
|
||||||
customStepFiles: aws-s3-upload-build,aws-s3-pull-cache,aws-s3-upload-cache
|
customStepFiles: aws-s3-upload-build,aws-s3-pull-cache,aws-s3-upload-cache
|
||||||
githubChecks: true
|
githubChecks: true
|
||||||
- run: |
|
- run: |
|
||||||
aws s3 cp s3://game-ci-test-storage/cloud-runner-cache/${{ steps.unity-build.outputs.CACHE_KEY }}/build/build-${{ steps.unity-build.outputs.BUILD_GUID }}.tar.lz4 build-${{ steps.unity-build.outputs.BUILD_GUID }}.tar.lz4
|
aws s3 cp s3://game-ci-test-storage/cloud-runner-cache/${{ steps.unity-build.outputs.CACHE_KEY }}/build/${{ steps.unity-build.outputs.BUILD_ARTIFACT }} ${{ steps.unity-build.outputs.BUILD_ARTIFACT }}
|
||||||
ls
|
ls
|
||||||
- run: yarn run cli -m list-resources
|
- run: yarn run cli -m list-resources
|
||||||
if: always()
|
if: always()
|
||||||
|
|
@ -214,5 +214,5 @@ jobs:
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.cloudRunnerCluster }} Build (${{ matrix.targetPlatform }})
|
name: ${{ matrix.cloudRunnerCluster }} Build (${{ matrix.targetPlatform }})
|
||||||
path: build-${{ steps.unity-build.outputs.BUILD_GUID }}.tar.lz4
|
path: ${{ steps.unity-build.outputs.BUILD_ARTIFACT }}
|
||||||
retention-days: 14
|
retention-days: 14
|
||||||
|
|
|
||||||
|
|
@ -871,10 +871,10 @@ class CloudRunnerOptions {
|
||||||
return (CloudRunnerOptions.getInput(`useSharedLargePackages`) || 'false') !== 'false';
|
return (CloudRunnerOptions.getInput(`useSharedLargePackages`) || 'false') !== 'false';
|
||||||
}
|
}
|
||||||
static get useSharedBuilder() {
|
static get useSharedBuilder() {
|
||||||
return (CloudRunnerOptions.getInput(`useSharedBuilder`) || true) !== 'false';
|
return (CloudRunnerOptions.getInput(`useSharedBuilder`) || 'true') !== 'false';
|
||||||
}
|
}
|
||||||
static get useLz4Compression() {
|
static get useLz4Compression() {
|
||||||
return (CloudRunnerOptions.getInput(`useLz4Compression`) || true) !== false;
|
return (CloudRunnerOptions.getInput(`useLz4Compression`) || 'false') !== 'false';
|
||||||
}
|
}
|
||||||
// ### ### ###
|
// ### ### ###
|
||||||
// Retained Workspace
|
// Retained Workspace
|
||||||
|
|
@ -1005,6 +1005,7 @@ class CloudRunner {
|
||||||
// CloudRunnerLogger.log(`Cloud Runner output ${Input.ToEnvVarFormat(element)} = ${buildParameters[element]}`);
|
// CloudRunnerLogger.log(`Cloud Runner output ${Input.ToEnvVarFormat(element)} = ${buildParameters[element]}`);
|
||||||
core.setOutput(__1.Input.ToEnvVarFormat(element), buildParameters[element]);
|
core.setOutput(__1.Input.ToEnvVarFormat(element), buildParameters[element]);
|
||||||
}
|
}
|
||||||
|
core.setOutput(__1.Input.ToEnvVarFormat(`buildArtifact`), `build-${CloudRunner.buildParameters.buildGuid}.tar${CloudRunner.buildParameters.useLz4Compression ? '.lz4' : ''}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static setupSelectedBuildPlatform() {
|
static setupSelectedBuildPlatform() {
|
||||||
|
|
@ -2820,9 +2821,9 @@ class LocalDockerCloudRunner {
|
||||||
defaultSecretsArray) {
|
defaultSecretsArray) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const { workspace } = __1.Action;
|
const { workspace } = __1.Action;
|
||||||
if (fs.existsSync(`${workspace}/cloud-runner-cache/cache/build/build-${buildParameters.buildGuid}.tar.lz4`)) {
|
if (fs.existsSync(`${workspace}/cloud-runner-cache/cache/build/build-${buildParameters.buildGuid}.tar${cloud_runner_1.default.buildParameters.useLz4Compression ? '.lz4' : ''}`)) {
|
||||||
yield cloud_runner_system_1.CloudRunnerSystem.Run(`ls ${workspace}/cloud-runner-cache/cache/build/`);
|
yield cloud_runner_system_1.CloudRunnerSystem.Run(`ls ${workspace}/cloud-runner-cache/cache/build/`);
|
||||||
yield cloud_runner_system_1.CloudRunnerSystem.Run(`rm -r ${workspace}/cloud-runner-cache/cache/build/build-${buildParameters.buildGuid}.tar.lz4`);
|
yield cloud_runner_system_1.CloudRunnerSystem.Run(`rm -r ${workspace}/cloud-runner-cache/cache/build/build-${buildParameters.buildGuid}.tar${cloud_runner_1.default.buildParameters.useLz4Compression ? '.lz4' : ''}`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -4525,8 +4526,8 @@ class CloudRunnerCustomSteps {
|
||||||
aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID --profile default
|
aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID --profile default
|
||||||
aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY --profile default
|
aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY --profile default
|
||||||
aws configure set region $AWS_DEFAULT_REGION --profile default
|
aws configure set region $AWS_DEFAULT_REGION --profile default
|
||||||
aws s3 cp /data/cache/$CACHE_KEY/build/build-$BUILD_GUID.tar.lz4 s3://game-ci-test-storage/cloud-runner-cache/$CACHE_KEY/build/build-$BUILD_GUID.tar.lz4
|
aws s3 cp /data/cache/$CACHE_KEY/build/build-${cloud_runner_1.default.buildParameters.buildGuid}.tar${cloud_runner_1.default.buildParameters.useLz4Compression ? '.lz4' : ''} s3://game-ci-test-storage/cloud-runner-cache/$CACHE_KEY/build/build-$BUILD_GUID.tar${cloud_runner_1.default.buildParameters.useLz4Compression ? '.lz4' : ''}
|
||||||
rm /data/cache/$CACHE_KEY/build/build-$BUILD_GUID.tar.lz4
|
rm /data/cache/$CACHE_KEY/build/build-$BUILD_GUID.tar${cloud_runner_1.default.buildParameters.useLz4Compression ? '.lz4' : ''}
|
||||||
secrets:
|
secrets:
|
||||||
- name: awsAccessKeyId
|
- name: awsAccessKeyId
|
||||||
value: ${process.env.AWS_ACCESS_KEY_ID || ``}
|
value: ${process.env.AWS_ACCESS_KEY_ID || ``}
|
||||||
|
|
@ -4542,12 +4543,12 @@ class CloudRunnerCustomSteps {
|
||||||
aws configure set region $AWS_DEFAULT_REGION --profile default
|
aws configure set region $AWS_DEFAULT_REGION --profile default
|
||||||
aws s3 ls game-ci-test-storage/cloud-runner-cache/ || true
|
aws s3 ls game-ci-test-storage/cloud-runner-cache/ || true
|
||||||
aws s3 ls game-ci-test-storage/cloud-runner-cache/$CACHE_KEY/build || true
|
aws s3 ls game-ci-test-storage/cloud-runner-cache/$CACHE_KEY/build || true
|
||||||
aws s3 cp s3://game-ci-test-storage/cloud-runner-cache/$CACHE_KEY/build/$BUILD_GUID_2.tar.lz4 /data/cache/$CACHE_KEY/build/$BUILD_GUID_2.tar.lz4
|
aws s3 cp s3://game-ci-test-storage/cloud-runner-cache/$CACHE_KEY/build/build-$BUILD_GUID_TARGET.tar${cloud_runner_1.default.buildParameters.useLz4Compression ? '.lz4' : ''} /data/cache/$CACHE_KEY/build/build-$BUILD_GUID_TARGET.tar${cloud_runner_1.default.buildParameters.useLz4Compression ? '.lz4' : ''}
|
||||||
secrets:
|
secrets:
|
||||||
- name: awsAccessKeyId
|
- name: awsAccessKeyId
|
||||||
- name: awsSecretAccessKey
|
- name: awsSecretAccessKey
|
||||||
- name: awsDefaultRegion
|
- name: awsDefaultRegion
|
||||||
- name: BUILD_GUID_2
|
- name: BUILD_GUID_TARGET
|
||||||
- name: steam-deploy-client
|
- name: steam-deploy-client
|
||||||
image: steamcmd/steamcmd
|
image: steamcmd/steamcmd
|
||||||
commands: |
|
commands: |
|
||||||
|
|
@ -4564,7 +4565,7 @@ class CloudRunnerCustomSteps {
|
||||||
- name: STEAM_CONFIG_VDF_2
|
- name: STEAM_CONFIG_VDF_2
|
||||||
- name: STEAM_CONFIG_VDF_3
|
- name: STEAM_CONFIG_VDF_3
|
||||||
- name: STEAM_CONFIG_VDF_4
|
- name: STEAM_CONFIG_VDF_4
|
||||||
- name: BUILD_GUID_2
|
- name: BUILD_GUID_TARGET
|
||||||
- name: RELEASE_BRANCH
|
- name: RELEASE_BRANCH
|
||||||
- name: steam-deploy-project
|
- name: steam-deploy-project
|
||||||
image: steamcmd/steamcmd
|
image: steamcmd/steamcmd
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -247,11 +247,11 @@ class CloudRunnerOptions {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static get useSharedBuilder(): boolean {
|
public static get useSharedBuilder(): boolean {
|
||||||
return (CloudRunnerOptions.getInput(`useSharedBuilder`) || true) !== 'false';
|
return (CloudRunnerOptions.getInput(`useSharedBuilder`) || 'true') !== 'false';
|
||||||
}
|
}
|
||||||
|
|
||||||
public static get useLz4Compression(): boolean {
|
public static get useLz4Compression(): boolean {
|
||||||
return (CloudRunnerOptions.getInput(`useLz4Compression`) || true) !== false;
|
return (CloudRunnerOptions.getInput(`useLz4Compression`) || 'false') !== 'false';
|
||||||
}
|
}
|
||||||
|
|
||||||
// ### ### ###
|
// ### ### ###
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,12 @@ class CloudRunner {
|
||||||
// CloudRunnerLogger.log(`Cloud Runner output ${Input.ToEnvVarFormat(element)} = ${buildParameters[element]}`);
|
// CloudRunnerLogger.log(`Cloud Runner output ${Input.ToEnvVarFormat(element)} = ${buildParameters[element]}`);
|
||||||
core.setOutput(Input.ToEnvVarFormat(element), buildParameters[element]);
|
core.setOutput(Input.ToEnvVarFormat(element), buildParameters[element]);
|
||||||
}
|
}
|
||||||
|
core.setOutput(
|
||||||
|
Input.ToEnvVarFormat(`buildArtifact`),
|
||||||
|
`build-${CloudRunner.buildParameters.buildGuid}.tar${
|
||||||
|
CloudRunner.buildParameters.useLz4Compression ? '.lz4' : ''
|
||||||
|
}`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,10 +47,18 @@ class LocalDockerCloudRunner implements ProviderInterface {
|
||||||
defaultSecretsArray: { ParameterKey: string; EnvironmentVariable: string; ParameterValue: string }[],
|
defaultSecretsArray: { ParameterKey: string; EnvironmentVariable: string; ParameterValue: string }[],
|
||||||
) {
|
) {
|
||||||
const { workspace } = Action;
|
const { workspace } = Action;
|
||||||
if (fs.existsSync(`${workspace}/cloud-runner-cache/cache/build/build-${buildParameters.buildGuid}.tar.lz4`)) {
|
if (
|
||||||
|
fs.existsSync(
|
||||||
|
`${workspace}/cloud-runner-cache/cache/build/build-${buildParameters.buildGuid}.tar${
|
||||||
|
CloudRunner.buildParameters.useLz4Compression ? '.lz4' : ''
|
||||||
|
}`,
|
||||||
|
)
|
||||||
|
) {
|
||||||
await CloudRunnerSystem.Run(`ls ${workspace}/cloud-runner-cache/cache/build/`);
|
await CloudRunnerSystem.Run(`ls ${workspace}/cloud-runner-cache/cache/build/`);
|
||||||
await CloudRunnerSystem.Run(
|
await CloudRunnerSystem.Run(
|
||||||
`rm -r ${workspace}/cloud-runner-cache/cache/build/build-${buildParameters.buildGuid}.tar.lz4`,
|
`rm -r ${workspace}/cloud-runner-cache/cache/build/build-${buildParameters.buildGuid}.tar${
|
||||||
|
CloudRunner.buildParameters.useLz4Compression ? '.lz4' : ''
|
||||||
|
}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,8 +43,12 @@ export class CloudRunnerCustomSteps {
|
||||||
aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID --profile default
|
aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID --profile default
|
||||||
aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY --profile default
|
aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY --profile default
|
||||||
aws configure set region $AWS_DEFAULT_REGION --profile default
|
aws configure set region $AWS_DEFAULT_REGION --profile default
|
||||||
aws s3 cp /data/cache/$CACHE_KEY/build/build-$BUILD_GUID.tar.lz4 s3://game-ci-test-storage/cloud-runner-cache/$CACHE_KEY/build/build-$BUILD_GUID.tar.lz4
|
aws s3 cp /data/cache/$CACHE_KEY/build/build-${CloudRunner.buildParameters.buildGuid}.tar${
|
||||||
rm /data/cache/$CACHE_KEY/build/build-$BUILD_GUID.tar.lz4
|
CloudRunner.buildParameters.useLz4Compression ? '.lz4' : ''
|
||||||
|
} s3://game-ci-test-storage/cloud-runner-cache/$CACHE_KEY/build/build-$BUILD_GUID.tar${
|
||||||
|
CloudRunner.buildParameters.useLz4Compression ? '.lz4' : ''
|
||||||
|
}
|
||||||
|
rm /data/cache/$CACHE_KEY/build/build-$BUILD_GUID.tar${CloudRunner.buildParameters.useLz4Compression ? '.lz4' : ''}
|
||||||
secrets:
|
secrets:
|
||||||
- name: awsAccessKeyId
|
- name: awsAccessKeyId
|
||||||
value: ${process.env.AWS_ACCESS_KEY_ID || ``}
|
value: ${process.env.AWS_ACCESS_KEY_ID || ``}
|
||||||
|
|
@ -60,12 +64,16 @@ export class CloudRunnerCustomSteps {
|
||||||
aws configure set region $AWS_DEFAULT_REGION --profile default
|
aws configure set region $AWS_DEFAULT_REGION --profile default
|
||||||
aws s3 ls game-ci-test-storage/cloud-runner-cache/ || true
|
aws s3 ls game-ci-test-storage/cloud-runner-cache/ || true
|
||||||
aws s3 ls game-ci-test-storage/cloud-runner-cache/$CACHE_KEY/build || true
|
aws s3 ls game-ci-test-storage/cloud-runner-cache/$CACHE_KEY/build || true
|
||||||
aws s3 cp s3://game-ci-test-storage/cloud-runner-cache/$CACHE_KEY/build/$BUILD_GUID_2.tar.lz4 /data/cache/$CACHE_KEY/build/$BUILD_GUID_2.tar.lz4
|
aws s3 cp s3://game-ci-test-storage/cloud-runner-cache/$CACHE_KEY/build/build-$BUILD_GUID_TARGET.tar${
|
||||||
|
CloudRunner.buildParameters.useLz4Compression ? '.lz4' : ''
|
||||||
|
} /data/cache/$CACHE_KEY/build/build-$BUILD_GUID_TARGET.tar${
|
||||||
|
CloudRunner.buildParameters.useLz4Compression ? '.lz4' : ''
|
||||||
|
}
|
||||||
secrets:
|
secrets:
|
||||||
- name: awsAccessKeyId
|
- name: awsAccessKeyId
|
||||||
- name: awsSecretAccessKey
|
- name: awsSecretAccessKey
|
||||||
- name: awsDefaultRegion
|
- name: awsDefaultRegion
|
||||||
- name: BUILD_GUID_2
|
- name: BUILD_GUID_TARGET
|
||||||
- name: steam-deploy-client
|
- name: steam-deploy-client
|
||||||
image: steamcmd/steamcmd
|
image: steamcmd/steamcmd
|
||||||
commands: |
|
commands: |
|
||||||
|
|
@ -82,7 +90,7 @@ export class CloudRunnerCustomSteps {
|
||||||
- name: STEAM_CONFIG_VDF_2
|
- name: STEAM_CONFIG_VDF_2
|
||||||
- name: STEAM_CONFIG_VDF_3
|
- name: STEAM_CONFIG_VDF_3
|
||||||
- name: STEAM_CONFIG_VDF_4
|
- name: STEAM_CONFIG_VDF_4
|
||||||
- name: BUILD_GUID_2
|
- name: BUILD_GUID_TARGET
|
||||||
- name: RELEASE_BRANCH
|
- name: RELEASE_BRANCH
|
||||||
- name: steam-deploy-project
|
- name: steam-deploy-project
|
||||||
image: steamcmd/steamcmd
|
image: steamcmd/steamcmd
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,14 @@ describe('Cloud Runner Custom Hooks And Steps', () => {
|
||||||
commands: echo "test"`;
|
commands: echo "test"`;
|
||||||
const yamlString2 = `- hook: before
|
const yamlString2 = `- hook: before
|
||||||
commands: echo "test"`;
|
commands: echo "test"`;
|
||||||
|
const overrides = {
|
||||||
|
versioning: 'None',
|
||||||
|
projectPath: 'test-project',
|
||||||
|
unityVersion: UnityVersioning.determineUnityVersion('test-project', UnityVersioning.read('test-project')),
|
||||||
|
targetPlatform: 'StandaloneLinux64',
|
||||||
|
cacheKey: `test-case-${uuidv4()}`,
|
||||||
|
};
|
||||||
|
CloudRunner.setup(await CreateParameters(overrides));
|
||||||
const stringObject = CloudRunnerCustomSteps.ParseSteps(yamlString);
|
const stringObject = CloudRunnerCustomSteps.ParseSteps(yamlString);
|
||||||
const stringObject2 = CloudRunnerCustomSteps.ParseSteps(yamlString2);
|
const stringObject2 = CloudRunnerCustomSteps.ParseSteps(yamlString2);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue