log to posix

This commit is contained in:
Alex Rodionov 2024-05-31 08:29:21 -07:00
parent d683b61ff3
commit a36fde6111
6 changed files with 15 additions and 8 deletions

View file

@ -19,10 +19,14 @@ jobs:
- ubuntu
- windows
steps:
- run: rm $(which bazel)
- uses: actions/checkout@v4
- uses: ./
with:
bazelisk-cache: true
bazelisk-version: 1.x
remote-cache: true
repository-cache: true
- uses: actions/checkout@v4
with:
repository: bazelbuild/examples

View file

@ -46,10 +46,11 @@ if (diskCacheEnabled) {
}
}
const remoteCacheLogPath = core.toPosixPath(`${os.tmpdir()}/remote-cache-server.log`)
const remoteCacheServerUrl = 'http://localhost:9889/cache'
const remoteCacheEnabled = core.getBooleanInput('remote-cache')
if (remoteCacheEnabled) {
bazelrc.push(`build --remote_cache=${remoteCacheServerUrl}\n`)
bazelrc.push(`build --remote_cache=${remoteCacheServerUrl}`)
if (diskCacheEnabled) {
core.error('Disk cache and remote cache cannot be enabled at the same time')
}
@ -162,7 +163,7 @@ module.exports = {
},
remoteCache: {
enabled: remoteCacheEnabled,
logPath: `${os.tmpdir()}/remote-cache-server.log`,
logPath: remoteCacheLogPath,
url: remoteCacheServerUrl,
}
}

5
dist/main/index.js vendored
View file

@ -52,10 +52,11 @@ if (diskCacheEnabled) {
}
}
const remoteCacheLogPath = core.toPosixPath(`${os.tmpdir()}/remote-cache-server.log`)
const remoteCacheServerUrl = 'http://localhost:9889/cache'
const remoteCacheEnabled = core.getBooleanInput('remote-cache')
if (remoteCacheEnabled) {
bazelrc.push(`build --remote_cache=${remoteCacheServerUrl}\n`)
bazelrc.push(`build --remote_cache=${remoteCacheServerUrl}`)
if (diskCacheEnabled) {
core.error('Disk cache and remote cache cannot be enabled at the same time')
}
@ -168,7 +169,7 @@ module.exports = {
},
remoteCache: {
enabled: remoteCacheEnabled,
logPath: `${os.tmpdir()}/remote-cache-server.log`,
logPath: remoteCacheLogPath,
url: remoteCacheServerUrl,
}
}

File diff suppressed because one or more lines are too long

5
dist/post/index.js vendored
View file

@ -52,10 +52,11 @@ if (diskCacheEnabled) {
}
}
const remoteCacheLogPath = core.toPosixPath(`${os.tmpdir()}/remote-cache-server.log`)
const remoteCacheServerUrl = 'http://localhost:9889/cache'
const remoteCacheEnabled = core.getBooleanInput('remote-cache')
if (remoteCacheEnabled) {
bazelrc.push(`build --remote_cache=${remoteCacheServerUrl}\n`)
bazelrc.push(`build --remote_cache=${remoteCacheServerUrl}`)
if (diskCacheEnabled) {
core.error('Disk cache and remote cache cannot be enabled at the same time')
}
@ -168,7 +169,7 @@ module.exports = {
},
remoteCache: {
enabled: remoteCacheEnabled,
logPath: `${os.tmpdir()}/remote-cache-server.log`,
logPath: remoteCacheLogPath,
url: remoteCacheServerUrl,
}
}

File diff suppressed because one or more lines are too long