mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-07 20:35:33 -04:00

* fixes * fixes * fixes * fixes * fixes * check for startup message in workflows * check for startup message in workflows * check for startup message in workflows * check for startup message in workflows * check for startup message in workflows * check for startup message in workflows * Update cloud-runner-ci-pipeline.yml * Update cloud-runner-ci-pipeline.yml * no storage class specified * log file path * log file path * log file path * log file path * log file path * log file path * log file path * log file path * updates * log file path * latest develop * log file path * log file path * Update package.json * log file path * log file path * log file path * log file path * log file path * log file path * log file path * log file path * log file path * log file path * log file path * log file path * log file path * log file path * stream logs through standard input and new remote client cli command * stream logs through standard input and new remote client cli command * stream logs through standard input and new remote client cli command * stream logs through standard input and new remote client cli command * stream logs through standard input and new remote client cli command * stream logs through standard input and new remote client cli command * stream logs through standard input and new remote client cli command * stream logs through standard input and new remote client cli command * stream logs through standard input and new remote client cli command * stream logs through standard input and new remote client cli command * stream logs through standard input and new remote client cli command * stream logs through standard input and new remote client cli command * stream logs through standard input and new remote client cli command * stream logs through standard input and new remote client cli command * stream logs through standard input and new remote client cli command * update pipeline to use k3s * version: 'latest' * fixes * disable aws pipe for now * disable aws pipe for now * disable aws pipe for now * disable aws pipe for now * disable aws pipe for now * disable aws pipe for now * disable aws pipe for now * disable aws pipe for now * disable aws pipe for now * disable aws pipe for now * push k8s logs to LOG SERVICE IP * push k8s logs to LOG SERVICE IP * push k8s logs to LOG SERVICE IP * push k8s logs to LOG SERVICE IP * push k8s logs to LOG SERVICE IP * push k8s logs to LOG SERVICE IP * push k8s logs to LOG SERVICE IP * push k8s logs to LOG SERVICE IP * tests * tests * tests * tests * tests * tests * tests * tests * tests * tests * tests * tests * tests * tests * tests * tests * tests * podname logs for log service * podname logs for log service * podname logs for log service * podname logs for log service * podname logs for log service * podname logs for log service * podname logs for log service * podname logs for log service * podname logs for log service * hashed logs * hashed logs * hashed logs * hashed logs * hashed logs * hashed logs * no wait, just repeat logs * no wait, just repeat logs * remove typo - double await * test fix - kubernetes - name typo in github yaml * test fix - kubernetes - name typo in github yaml * check missing log file * check missing log file * Push to steam test * Push to steam test * Fix path * k8s reliable log hashing * k8s reliable log hashing * k8s reliable log hashing * hashed logging k8s * hashed logging k8s * hashed logging k8s * hashed logging k8s * hashed logging k8s * hashed logging k8s * Include log chunk when task runner sees log update, clarify if we can pull logs from same line or next line * Include log chunk when task runner sees log update, clarify if we can pull logs from same line or next line * Include log chunk when task runner sees log update, clarify if we can pull logs from same line or next line * Include log chunk when task runner sees log update, clarify if we can pull logs from same line or next line * Include log chunk when task runner sees log update, clarify if we can pull logs from same line or next line * Fix exit flow for k8s job * hash comparison logging for log complete in k8s flow * Interrupt k8s logs when logs found * cleanup async parameter * cleanup async parameter * cleanup async parameter * fixes * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix
54 lines
1.5 KiB
TypeScript
54 lines
1.5 KiB
TypeScript
import * as core from '@actions/core';
|
|
import { Action, BuildParameters, Cache, CloudRunner, Docker, ImageTag, Output } from './model';
|
|
import { Cli } from './model/cli/cli';
|
|
import MacBuilder from './model/mac-builder';
|
|
import PlatformSetup from './model/platform-setup';
|
|
|
|
async function runMain() {
|
|
try {
|
|
if (Cli.InitCliMode()) {
|
|
await Cli.RunCli();
|
|
|
|
return;
|
|
}
|
|
Action.checkCompatibility();
|
|
Cache.verify();
|
|
|
|
const { workspace, actionFolder } = Action;
|
|
|
|
const buildParameters = await BuildParameters.create();
|
|
const baseImage = new ImageTag(buildParameters);
|
|
|
|
let exitCode = -1;
|
|
|
|
if (buildParameters.providerStrategy === 'local') {
|
|
core.info('Building locally');
|
|
await PlatformSetup.setup(buildParameters, actionFolder);
|
|
exitCode =
|
|
process.platform === 'darwin'
|
|
? await MacBuilder.run(actionFolder)
|
|
: await Docker.run(baseImage.toString(), {
|
|
workspace,
|
|
actionFolder,
|
|
...buildParameters,
|
|
});
|
|
} else {
|
|
await CloudRunner.run(buildParameters, baseImage.toString());
|
|
exitCode = 0;
|
|
}
|
|
|
|
// Set output
|
|
await Output.setBuildVersion(buildParameters.buildVersion);
|
|
await Output.setAndroidVersionCode(buildParameters.androidVersionCode);
|
|
await Output.setEngineExitCode(exitCode);
|
|
|
|
if (exitCode !== 0) {
|
|
core.setFailed(`Build failed with exit code ${exitCode}`);
|
|
}
|
|
} catch (error) {
|
|
core.setFailed((error as Error).message);
|
|
}
|
|
}
|
|
|
|
runMain();
|