Compare commits
10 commits
cbd802719f
...
fd6cff5f63
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd6cff5f63 | ||
|
|
09a6cf3bb7 | ||
|
|
e7b8b2e8f2 | ||
|
|
699a0fb94e | ||
|
|
4e82452fc6 | ||
|
|
5137014566 | ||
|
|
64039eff0a | ||
|
|
7ab7c614fe | ||
|
|
99b4749ac7 | ||
|
|
c14694b7be |
7 changed files with 38 additions and 17 deletions
19
.github/workflows/ci.yml
vendored
19
.github/workflows/ci.yml
vendored
|
|
@ -24,36 +24,41 @@ jobs:
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: bazelbuild/examples
|
repository: bazelbuild/examples
|
||||||
sparse-checkout: java-maven
|
sparse-checkout: frontend
|
||||||
sparse-checkout-cone-mode: false
|
sparse-checkout-cone-mode: false
|
||||||
- run: shopt -s dotglob && mv java-maven/* . && rmdir java-maven && ls -la
|
|
||||||
if: matrix.os != 'windows'
|
|
||||||
- name: Checkout setup-bazel
|
- name: Checkout setup-bazel
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: setup-bazel
|
path: setup-bazel
|
||||||
|
|
||||||
- name: Prepare environment (POSIX)
|
- name: Prepare environment (POSIX)
|
||||||
if: matrix.os != 'windows'
|
if: matrix.os != 'windows'
|
||||||
run: |
|
run: |
|
||||||
rm $(which bazel)
|
rm $(which bazel)
|
||||||
shopt -s dotglob
|
shopt -s dotglob
|
||||||
mv java-maven/* .
|
mv frontend/* .
|
||||||
rmdir java-maven
|
rmdir frontend
|
||||||
|
|
||||||
- name: Prepare environment (Windows)
|
- name: Prepare environment (Windows)
|
||||||
if: matrix.os == 'windows'
|
if: matrix.os == 'windows'
|
||||||
run: |
|
run: |
|
||||||
Remove-Item -Path (Get-Command bazel.exe).Source
|
Remove-Item -Path (Get-Command bazel.exe).Source
|
||||||
Get-ChildItem -Path java-maven -Recurse -File | Move-Item -Destination .
|
Get-ChildItem -Path frontend -Recurse -File | Move-Item -Destination .
|
||||||
Remove-Item -Path java-maven
|
Remove-Item -Path frontend -Recurse -Force
|
||||||
|
|
||||||
- name: Setup Bazel
|
- name: Setup Bazel
|
||||||
uses: ./setup-bazel/
|
uses: ./setup-bazel/
|
||||||
with:
|
with:
|
||||||
bazelisk-cache: true
|
bazelisk-cache: true
|
||||||
bazelisk-version: 1.x
|
bazelisk-version: 1.x
|
||||||
|
bazelrc: test --test_output=errors
|
||||||
remote-cache: true
|
remote-cache: true
|
||||||
repository-cache: true
|
repository-cache: true
|
||||||
|
|
||||||
- run: bazel build ...
|
- run: bazel build ...
|
||||||
- run: bazel test ...
|
- run: bazel test ...
|
||||||
|
|
||||||
- name: Start SSH session
|
- name: Start SSH session
|
||||||
if: failure() && runner.debug == '1'
|
if: failure() && runner.debug == '1'
|
||||||
uses: mxschmitt/action-tmate@v3
|
uses: mxschmitt/action-tmate@v3
|
||||||
|
|
|
||||||
14
dist/main/index.js
vendored
14
dist/main/index.js
vendored
|
|
@ -96973,7 +96973,15 @@ async function downloadBazelisk() {
|
||||||
|
|
||||||
core.debug('Adding to the cache...')
|
core.debug('Adding to the cache...')
|
||||||
fs.chmodSync(downloadPath, '755')
|
fs.chmodSync(downloadPath, '755')
|
||||||
const cachePath = await tc.cacheFile(downloadPath, 'bazel', 'bazelisk', version)
|
|
||||||
|
let bazelBinName = 'bazel'
|
||||||
|
let bazeliskBinName = 'bazelisk'
|
||||||
|
if (platform == 'windows') {
|
||||||
|
bazelBinName = `${bazelBinName}.exe`
|
||||||
|
bazeliskBinName = `${bazelBinName}.exe`
|
||||||
|
}
|
||||||
|
|
||||||
|
const cachePath = await tc.cacheFile(downloadPath, bazelBinName, bazeliskBinName, version)
|
||||||
core.info(`Successfully cached bazelisk to ${cachePath}`)
|
core.info(`Successfully cached bazelisk to ${cachePath}`)
|
||||||
|
|
||||||
return cachePath
|
return cachePath
|
||||||
|
|
@ -97058,7 +97066,7 @@ async function startRemoteCacheServer() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
core.startGroup("Remote cache server")
|
core.startGroup("Start remote cache server")
|
||||||
core.info(`Remote cache server log file path: ${config.remoteCache.logPath}`)
|
core.info(`Remote cache server log file path: ${config.remoteCache.logPath}`)
|
||||||
|
|
||||||
const log = fs.openSync(config.remoteCache.logPath, 'a')
|
const log = fs.openSync(config.remoteCache.logPath, 'a')
|
||||||
|
|
@ -97068,7 +97076,7 @@ async function startRemoteCacheServer() {
|
||||||
stdio: ['ignore', log, log]
|
stdio: ['ignore', log, log]
|
||||||
})
|
})
|
||||||
|
|
||||||
core.info(`Started remote cache server (${serverProcess.pid})`)
|
core.info(`Started remote cache server with PID: ${serverProcess.pid}`)
|
||||||
core.saveState('remote-cache-server-pid', serverProcess.pid.toString())
|
core.saveState('remote-cache-server-pid', serverProcess.pid.toString())
|
||||||
|
|
||||||
serverProcess.unref()
|
serverProcess.unref()
|
||||||
|
|
|
||||||
2
dist/main/index.js.map
vendored
2
dist/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/post/index.js
vendored
2
dist/post/index.js
vendored
|
|
@ -95961,7 +95961,7 @@ async function stopRemoteCacheServer() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
core.startGroup("Remote cache server")
|
core.startGroup("Stop remote cache server")
|
||||||
const pid = core.getState('remote-cache-server-pid')
|
const pid = core.getState('remote-cache-server-pid')
|
||||||
if (pid) {
|
if (pid) {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
2
dist/post/index.js.map
vendored
2
dist/post/index.js.map
vendored
File diff suppressed because one or more lines are too long
14
index.js
14
index.js
|
|
@ -97,7 +97,15 @@ async function downloadBazelisk() {
|
||||||
|
|
||||||
core.debug('Adding to the cache...')
|
core.debug('Adding to the cache...')
|
||||||
fs.chmodSync(downloadPath, '755')
|
fs.chmodSync(downloadPath, '755')
|
||||||
const cachePath = await tc.cacheFile(downloadPath, 'bazel', 'bazelisk', version)
|
|
||||||
|
let bazelBinName = 'bazel'
|
||||||
|
let bazeliskBinName = 'bazelisk'
|
||||||
|
if (platform == 'windows') {
|
||||||
|
bazelBinName = `${bazelBinName}.exe`
|
||||||
|
bazeliskBinName = `${bazelBinName}.exe`
|
||||||
|
}
|
||||||
|
|
||||||
|
const cachePath = await tc.cacheFile(downloadPath, bazelBinName, bazeliskBinName, version)
|
||||||
core.info(`Successfully cached bazelisk to ${cachePath}`)
|
core.info(`Successfully cached bazelisk to ${cachePath}`)
|
||||||
|
|
||||||
return cachePath
|
return cachePath
|
||||||
|
|
@ -182,7 +190,7 @@ async function startRemoteCacheServer() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
core.startGroup("Remote cache server")
|
core.startGroup("Start remote cache server")
|
||||||
core.info(`Remote cache server log file path: ${config.remoteCache.logPath}`)
|
core.info(`Remote cache server log file path: ${config.remoteCache.logPath}`)
|
||||||
|
|
||||||
const log = fs.openSync(config.remoteCache.logPath, 'a')
|
const log = fs.openSync(config.remoteCache.logPath, 'a')
|
||||||
|
|
@ -192,7 +200,7 @@ async function startRemoteCacheServer() {
|
||||||
stdio: ['ignore', log, log]
|
stdio: ['ignore', log, log]
|
||||||
})
|
})
|
||||||
|
|
||||||
core.info(`Started remote cache server (${serverProcess.pid})`)
|
core.info(`Started remote cache server with PID: ${serverProcess.pid}`)
|
||||||
core.saveState('remote-cache-server-pid', serverProcess.pid.toString())
|
core.saveState('remote-cache-server-pid', serverProcess.pid.toString())
|
||||||
|
|
||||||
serverProcess.unref()
|
serverProcess.unref()
|
||||||
|
|
|
||||||
2
post.js
2
post.js
|
|
@ -16,7 +16,7 @@ async function stopRemoteCacheServer() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
core.startGroup("Remote cache server")
|
core.startGroup("Stop remote cache server")
|
||||||
const pid = core.getState('remote-cache-server-pid')
|
const pid = core.getState('remote-cache-server-pid')
|
||||||
if (pid) {
|
if (pid) {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue