forked from thought-machine/please
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds CI for remote execution (thought-machine#882)
* Move wrapper script to the root as we would normally have it * Adding test setup for remote execution * Add test script for remote execution * make dir configurable * Make it not interactive * Quieter output * Filegroups don't need TmpOutput * Simpler killing protocol * Add ability to detach when targets have spawned * create the symlink * Detach processes better. * use exec instead of ForkExec which is inexplicably not working * Tweak script a bit * Fix test * gofmt * buildify * Fix up script a bit * Remove sandbox from remote testing * Add psmisc to Docker container
- Loading branch information
1 parent
4c410d1
commit 6f3348c
Showing
16 changed files
with
149 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eu | ||
|
||
trap 'killall elan mettle zeal' SIGINT SIGTERM EXIT | ||
|
||
DIR="${1:-/tmp/please}" | ||
|
||
# Extract the plz installation from earlier step | ||
rm -rf "$DIR" | ||
mkdir "$DIR" | ||
tar -xzf /tmp/workspace/linux_amd64/please_*.tar.gz --strip-components=1 -C "$DIR" | ||
ln -s "${DIR}/please" "${DIR}/plz" | ||
export PATH="$DIR:$PATH" | ||
|
||
# Start the servers in the background | ||
plz run parallel -p -v notice --colour --detach //test/remote:run_elan //test/remote:run_zeal //test/remote:run_mettle | ||
|
||
# Test we can rebuild plz itself. | ||
plz build --profile ci_remote -p -v notice --colour //src:please | ||
# Check we can actually run some tests | ||
plz test --profile ci_remote -p -v notice --colour //src/core:all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
; This is used for CI of the remote execution code. | ||
[remote] | ||
url = localhost:7778 | ||
casurl = localhost:7777 | ||
asseturl = localhost:7776 | ||
instance = mettle | ||
secure = false | ||
numexecutors = 10 | ||
|
||
[build] | ||
hashfunction = sha256 | ||
|
||
[please] | ||
location = ~/.please |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Various helpers for testing remote execution. | ||
remote_file( | ||
name = "elan", | ||
binary = True, | ||
hashes = ["ac113612e582055302fc732512a31aeb548f6c8837da39f03067419862fb7c14"], | ||
url = "https://github.com/thought-machine/please-servers/releases/download/v2.3.0/elan", | ||
) | ||
|
||
remote_file( | ||
name = "mettle", | ||
binary = True, | ||
hashes = ["0f65f009a3dd71e120ec9cba233f3a756a7a17b21b53e8297fd49ea1c38886ad"], | ||
url = "https://github.com/thought-machine/please-servers/releases/download/v2.3.0/mettle", | ||
) | ||
|
||
remote_file( | ||
name = "zeal", | ||
binary = True, | ||
hashes = ["b61f5f23b1c82e9aac4f5b9ad282e03112eeff8fe1441c7bf2e960fefd3c6c1b"], | ||
url = "https://github.com/thought-machine/please-servers/releases/download/v2.3.0/zeal", | ||
) | ||
|
||
sh_cmd( | ||
name = "run_elan", | ||
srcs = [":elan"], | ||
cmd = "mkdir -p plz-out/elan && exec $(out_location :elan) -s file://\\\\$PWD/plz-out/elan -v warning --log_file plz-out/log/elan.log", | ||
) | ||
|
||
sh_cmd( | ||
name = "run_mettle", | ||
srcs = [":mettle"], | ||
cmd = "exec $(out_location :mettle) dual -s 127.0.0.1:7777 -q mem://requests -r mem://responses -m 13434 -d plz-out/mettle -v warning --log_file plz-out/log/mettle.log --browser http://127.0.0.1:7779 --num_workers 8", | ||
) | ||
|
||
sh_cmd( | ||
name = "run_zeal", | ||
srcs = [":zeal"], | ||
cmd = "exec $(out_location :zeal) -v warning -s 127.0.0.1:7777 --log_file plz-out/log/zeal.log", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters