fixing cache folder
parent
6a1b8387cb
commit
1c8c5e59b6
|
|
@ -79,6 +79,8 @@ jobs:
|
|||
TARGET_PLATFORM: ${{ matrix.targetPlatform }}
|
||||
- uses: ./
|
||||
id: aws-fargate-unity-build
|
||||
env:
|
||||
INIT_HOOK: touch $GCP_LOG_FILE && tail -f $GCP_LOG_FILE | xargs -d '\n' -I{} gcloud logging write game-ci "{}" &
|
||||
with:
|
||||
cloudRunnerCluster: aws
|
||||
versioning: None
|
||||
|
|
@ -86,7 +88,6 @@ jobs:
|
|||
unityVersion: ${{ matrix.unityVersion }}
|
||||
targetPlatform: ${{ matrix.targetPlatform }}
|
||||
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||
INIT_HOOK: touch $GCP_LOG_FILE && tail -f $GCP_LOG_FILE | xargs -d '\n' -I{} gcloud logging write game-ci "{}" &
|
||||
postBuildSteps: |
|
||||
- name: upload
|
||||
image: amazon/aws-cli
|
||||
|
|
|
|||
|
|
@ -538,6 +538,7 @@ const remote_client_logger_1 = __webpack_require__(28082);
|
|||
class Caching {
|
||||
static PushToCache(cacheFolder, sourceFolder, cacheKey) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const startPath = process.cwd();
|
||||
try {
|
||||
if (!fs_1.default.existsSync(cacheFolder)) {
|
||||
yield cloud_runner_system_1.CloudRunnerSystem.Run(`mkdir -p ${cacheFolder}`);
|
||||
|
|
@ -565,12 +566,15 @@ class Caching {
|
|||
}
|
||||
}
|
||||
catch (error) {
|
||||
process.chdir(`${startPath}`);
|
||||
throw error;
|
||||
}
|
||||
process.chdir(`${startPath}`);
|
||||
});
|
||||
}
|
||||
static PullFromCache(cacheFolder, destinationFolder, cacheKey = ``) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const startPath = process.cwd();
|
||||
remote_client_logger_1.RemoteClientLogger.log(`Caching for ${path_1.default.basename(destinationFolder)}`);
|
||||
try {
|
||||
if (!fs_1.default.existsSync(cacheFolder)) {
|
||||
|
|
@ -607,8 +611,10 @@ class Caching {
|
|||
}
|
||||
}
|
||||
catch (error) {
|
||||
process.chdir(`${startPath}`);
|
||||
throw error;
|
||||
}
|
||||
process.chdir(`${startPath}`);
|
||||
});
|
||||
}
|
||||
static handleCachePurging() {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -10,6 +10,7 @@ import { RemoteClientLogger } from './remote-client-logger';
|
|||
|
||||
export class Caching {
|
||||
public static async PushToCache(cacheFolder: string, sourceFolder: string, cacheKey: string) {
|
||||
const startPath = process.cwd();
|
||||
try {
|
||||
if (!fs.existsSync(cacheFolder)) {
|
||||
await CloudRunnerSystem.Run(`mkdir -p ${cacheFolder}`);
|
||||
|
|
@ -47,10 +48,13 @@ export class Caching {
|
|||
await Caching.printFullCacheHierarchySize();
|
||||
}
|
||||
} catch (error) {
|
||||
process.chdir(`${startPath}`);
|
||||
throw error;
|
||||
}
|
||||
process.chdir(`${startPath}`);
|
||||
}
|
||||
public static async PullFromCache(cacheFolder: string, destinationFolder: string, cacheKey: string = ``) {
|
||||
const startPath = process.cwd();
|
||||
RemoteClientLogger.log(`Caching for ${path.basename(destinationFolder)}`);
|
||||
try {
|
||||
if (!fs.existsSync(cacheFolder)) {
|
||||
|
|
@ -90,8 +94,10 @@ export class Caching {
|
|||
}
|
||||
}
|
||||
} catch (error) {
|
||||
process.chdir(`${startPath}`);
|
||||
throw error;
|
||||
}
|
||||
process.chdir(`${startPath}`);
|
||||
}
|
||||
|
||||
public static handleCachePurging() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue