Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

benchmark worker updates #125

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 77 additions & 42 deletions Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

julia_version = "1.8.2"
manifest_format = "2.0"
project_hash = "d5fd0cd13d3b5e6693862222e1b443e5d109c4c0"
project_hash = "316906d3151e20225dad1f935a43799720e8a1e3"

[[deps.AWS]]
deps = ["Base64", "Compat", "Dates", "Downloads", "GitHub", "HTTP", "IniFile", "JSON", "MbedTLS", "Mocking", "OrderedCollections", "Random", "Sockets", "URIs", "UUIDs", "XMLDict"]
git-tree-sha1 = "378e85b1354746ea613f4a3f388d105168cc4248"
git-tree-sha1 = "93f3cffcb1fd90548b13cf21a28a898e1ca8c58f"
uuid = "fbe9abb3-538b-5e4e-ba9e-bc94f4f92ebc"
version = "1.75.1"
version = "1.79.0"

[[deps.ArgTools]]
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"
Expand All @@ -28,9 +28,14 @@ uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[deps.BenchmarkTools]]
deps = ["JSON", "Logging", "Printf", "Profile", "Statistics", "UUIDs"]
git-tree-sha1 = "4c10eee4af024676200bc7752e536f858c6b8f93"
git-tree-sha1 = "d9a9701b899b30332bbcb3e1679c41cce81fb0e8"
uuid = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
version = "1.3.1"
version = "1.3.2"

[[deps.BitFlags]]
git-tree-sha1 = "84259bb6172806304b9101094a7cc4bc6f56dbc6"
uuid = "d1d4a3ce-64b1-5f1a-9ba4-7e7e69966f35"
version = "0.1.5"

[[deps.CEnum]]
git-tree-sha1 = "eb4cb44a499229b3b8426dcfb5dd85333951ff90"
Expand All @@ -39,9 +44,15 @@ version = "0.4.2"

[[deps.CategoricalArrays]]
deps = ["DataAPI", "Future", "Missings", "Printf", "Requires", "Statistics", "Unicode"]
git-tree-sha1 = "5f5a975d996026a8dd877c35fe26a7b8179c02ba"
git-tree-sha1 = "5084cc1a28976dd1642c9f337b28a3cb03e0f7d2"
uuid = "324d7699-5711-5eae-9e2f-1d82baa6b597"
version = "0.10.6"
version = "0.10.7"

[[deps.CodecZlib]]
deps = ["TranscodingStreams", "Zlib_jll"]
git-tree-sha1 = "ded953804d019afa9a3f98981d99b33e3db7b6da"
uuid = "944b1d66-785c-5afd-91f1-9de20f533193"
version = "0.7.0"

[[deps.CodecZstd]]
deps = ["CEnum", "TranscodingStreams", "Zstd_jll"]
Expand All @@ -56,10 +67,10 @@ uuid = "a80b9123-70ca-4bc0-993e-6e3bcb318db6"
version = "0.8.6"

[[deps.Compat]]
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
git-tree-sha1 = "9be8be1d8a6f44b96482c8af52238ea7987da3e3"
deps = ["Dates", "LinearAlgebra", "UUIDs"]
git-tree-sha1 = "3ca828fe1b75fa84b021a7860bd039eaea84d2f2"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "3.45.0"
version = "4.3.0"

[[deps.CompilerSupportLibraries_jll]]
deps = ["Artifacts", "Libdl"]
Expand All @@ -72,15 +83,15 @@ uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f"
version = "4.1.1"

[[deps.DataAPI]]
git-tree-sha1 = "fb5f5316dd3fd4c5e7c30a24d50643b73e37cd40"
git-tree-sha1 = "46d2680e618f8abd007bce0c3026cb0c4a8f2032"
uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
version = "1.10.0"
version = "1.12.0"

[[deps.DataFrames]]
deps = ["Compat", "DataAPI", "Future", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrettyTables", "Printf", "REPL", "Reexport", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"]
git-tree-sha1 = "daa21eb85147f72e41f6352a57fccea377e310a9"
deps = ["Compat", "DataAPI", "Future", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrettyTables", "Printf", "REPL", "Random", "Reexport", "SnoopPrecompile", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"]
git-tree-sha1 = "5b93f1b47eec9b7194814e40542752418546679f"
uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
version = "1.3.4"
version = "1.4.2"

[[deps.DataStructures]]
deps = ["Compat", "InteractiveUtils", "OrderedCollections"]
Expand All @@ -97,10 +108,6 @@ version = "1.0.0"
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"

[[deps.DelimitedFiles]]
deps = ["Mmap"]
uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab"

[[deps.Distributed]]
deps = ["Random", "Serialization", "Sockets"]
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"
Expand Down Expand Up @@ -177,10 +184,10 @@ uuid = "f8c6e375-362e-5223-8a59-34ff63f689eb"
version = "2.34.1+0"

[[deps.HTTP]]
deps = ["Base64", "Dates", "IniFile", "Logging", "MbedTLS", "NetworkOptions", "Sockets", "URIs"]
git-tree-sha1 = "0fa77022fe4b511826b39c894c90daf5fce3334a"
deps = ["Base64", "CodecZlib", "Dates", "IniFile", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"]
git-tree-sha1 = "8556f4b387fcd1d9b3013d798eecbcfa0d985e66"
uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3"
version = "0.9.17"
version = "1.5.2"

[[deps.IniFile]]
git-tree-sha1 = "f550e6e32074c939295eb5ea6de31849ac2c9625"
Expand Down Expand Up @@ -218,6 +225,11 @@ git-tree-sha1 = "3c837543ddb02250ef42f4738347454f95079d4e"
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
version = "0.21.3"

[[deps.LaTeXStrings]]
git-tree-sha1 = "f2355693d6778a178ade15952b7ac47a4ff97996"
uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
version = "1.3.0"

[[deps.LazyArtifacts]]
deps = ["Artifacts", "Pkg"]
uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3"
Expand Down Expand Up @@ -257,15 +269,21 @@ uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
[[deps.Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"

[[deps.LoggingExtras]]
deps = ["Dates", "Logging"]
git-tree-sha1 = "5d4d2d9904227b8bd66386c1138cf4d5ffa826bf"
uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36"
version = "0.4.9"

[[deps.Markdown]]
deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"

[[deps.MbedTLS]]
deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "Random", "Sockets"]
git-tree-sha1 = "14cb991ee7ccc6dabda93d310400575c3cae435b"
git-tree-sha1 = "03a9b9718f5682ecb107ac9f7308991db4ce395b"
uuid = "739be429-bea8-5141-9913-cc70e7f3736d"
version = "1.1.2"
version = "1.1.7"

[[deps.MbedTLS_jll]]
deps = ["Artifacts", "Libdl"]
Expand All @@ -282,10 +300,10 @@ version = "1.0.2"
uuid = "a63ad114-7e13-5084-954f-fe012c677804"

[[deps.Mocking]]
deps = ["Compat", "ExprTools"]
git-tree-sha1 = "29714d0a7a8083bba8427a4fbfb00a540c681ce7"
deps = ["ExprTools"]
git-tree-sha1 = "748f6e1e4de814b101911e64cc12d83a6af66782"
uuid = "78c3b35d-d492-501b-9361-3d52fe80e533"
version = "0.7.3"
version = "0.7.2"

[[deps.MozillaCACerts_jll]]
uuid = "14a3606d-f60d-562e-9121-12d972cd8159"
Expand All @@ -300,11 +318,17 @@ deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"]
uuid = "4536629a-c528-5b80-bd46-f80d51c5b363"
version = "0.3.20+0"

[[deps.OpenSSL]]
deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"]
git-tree-sha1 = "5628f092c6186a80484bfefdf89ff64efdaec552"
uuid = "4d8831e6-92b7-49fb-bdf8-b643e874388c"
version = "1.3.1"

[[deps.OpenSSL_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "e60321e3f2616584ff98f0a4f18d98ae6f89bbb3"
git-tree-sha1 = "f6e9dba33f9f2c44e08a020b0caf6903be540004"
uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95"
version = "1.1.17+0"
version = "1.1.19+0"

[[deps.OrderedCollections]]
git-tree-sha1 = "85f8e6578bf1f9ee0d11e7bb1b1456435479d47c"
Expand All @@ -323,10 +347,10 @@ uuid = "d96e819e-fc66-5662-9728-84c9c7592b0a"
version = "0.12.3"

[[deps.Parsers]]
deps = ["Dates"]
git-tree-sha1 = "0044b23da09b5608b4ecacb4e5e6c6332f833a7e"
deps = ["Dates", "SnoopPrecompile"]
git-tree-sha1 = "cceb0257b662528ecdf0b4b4302eb00e767b38e7"
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
version = "2.3.2"
version = "2.5.0"

[[deps.Pidfile]]
deps = ["FileWatching", "Test"]
Expand Down Expand Up @@ -360,10 +384,10 @@ uuid = "21216c6a-2e73-6563-6e65-726566657250"
version = "1.3.0"

[[deps.PrettyTables]]
deps = ["Crayons", "Formatting", "Markdown", "Reexport", "Tables"]
git-tree-sha1 = "dfb54c4e414caa595a1f2ed759b160f5a3ddcba5"
deps = ["Crayons", "Formatting", "LaTeXStrings", "Markdown", "Reexport", "StringManipulation", "Tables"]
git-tree-sha1 = "98ac42c9127667c2731072464fcfef9b819ce2fa"
uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"
version = "1.3.1"
version = "2.2.0"

[[deps.Printf]]
deps = ["Unicode"]
Expand Down Expand Up @@ -417,9 +441,15 @@ version = "1.1.1"
[[deps.Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"

[[deps.SharedArrays]]
deps = ["Distributed", "Mmap", "Random", "Serialization"]
uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383"
[[deps.SimpleBufferStream]]
git-tree-sha1 = "874e8867b33a00e784c8a7e4b60afe9e037b74e1"
uuid = "777ac1f9-54b0-4bf8-805c-2214025038e7"
version = "1.1.0"

[[deps.SnoopPrecompile]]
git-tree-sha1 = "f604441450a3c0569830946e5b33b78c928e1a85"
uuid = "66db9d55-30c0-4569-8b51-7e840670fc0c"
version = "1.0.1"

[[deps.Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"
Expand All @@ -444,6 +474,11 @@ uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
deps = ["LinearAlgebra", "SparseArrays"]
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[[deps.StringManipulation]]
git-tree-sha1 = "46da2434b41f41ac3594ee9816ce5541c6096123"
uuid = "892a3eda-7b42-436c-8928-eab12a02cf0e"
version = "0.3.0"

[[deps.TOML]]
deps = ["Dates"]
uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
Expand All @@ -457,9 +492,9 @@ version = "1.0.1"

[[deps.Tables]]
deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "TableTraits", "Test"]
git-tree-sha1 = "5ce79ce186cc678bbb5c5681ca3379d1ddae11a1"
git-tree-sha1 = "c79322d36826aa2f4fd8ecfa96ddb47b174ac78d"
uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
version = "1.7.0"
version = "1.10.0"

[[deps.Tar]]
deps = ["ArgTools", "SHA"]
Expand Down Expand Up @@ -501,9 +536,9 @@ uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"

[[deps.UserNSSandbox_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "651b582371b815cdd193df12806463550f60666b"
git-tree-sha1 = "b725bb7f5bbe7623b569b9dc224cf8c0589abec8"
uuid = "b88861f7-1d72-59dd-91e7-a8cc876a4984"
version = "2022.8.1+1"
version = "2022.10.3+0"

[[deps.XML2_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "Zlib_jll"]
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,9 @@ byobu
```
cd /nanosoldier/Nanosoldier.jl
git pull
sed -i -e 's/\<1\.6\.6\>/1.8.2/' provision-server.sh run_base_ci README.md
chmod 666 *.toml
sudo -u nanosoldier ../julia-1.6.6/bin/julia --project=. -e 'using Pkg; Pkg.update()'
sudo -u nanosoldier ../julia-1.8.2/bin/julia --project=. -e 'using Pkg; Pkg.update()'
chmod 664 *.toml
./provision-server.sh
git add -u
Expand Down
2 changes: 1 addition & 1 deletion bin/run_base_ci.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Distributed
import Nanosoldier, GitHub, Sockets

nodes = Dict(Any => addprocs(1))
nodes = Dict(Any => addprocs(1; exeflags="--project=$(ENV["JULIA_PROJECT"])"))
@everywhere import Nanosoldier

auth = GitHub.authenticate("GITHUB_AUTH00000000000000000000000000000")
Expand Down
20 changes: 11 additions & 9 deletions provision-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@ set -euv -o pipefail
HERE=`realpath $(dirname $0)`
cd "$HERE/.."

VERSION=1.6.6
VERSION=1.8.2

MAJOR=`echo $VERSION | cut -d . -f 1`
MINOR=`echo $VERSION | cut -d . -f 2`
PATCH=`echo $VERSION | cut -d . -f 3`

sudo apt update

# create a (non-privileged) user to run the server:
sudo useradd nanosoldier || true
sudo useradd -m nanosoldier || true
sudo usermod -aG nanosoldier `whoami`
echo "`whoami` ALL= (nanosoldier) NOPASSWD: ALL
Defaults> nanosoldier umask=0777" | sudo tee -a /etc/sudoers.d/99-nanosoldier

sudo -u nanosoldier [ -f ~nanosoldier/.ssh/id_rsa.pub ] || sudo -u nanosoldier ssh-keygen -N '' -f ~nanosoldier/.ssh/id_rsa
sudo -u nanosoldier [ -f ~nanosoldier/.ssh/id_ed25519.pub ] || sudo -u nanosoldier ssh-keygen -N '' -f ~nanosoldier/.ssh/id_ed25519 -t ed25519
sudo -u nanosoldier git config --global user.name "nanosoldier"
sudo -u nanosoldier git config --global user.email "[email protected]"
sudo -u nanosoldier ssh -T [email protected] || true
Expand All @@ -34,8 +36,8 @@ echo "-------------"
echo
echo "install this ssh key in github for user @nanosoldier at"
echo " https://github.com/settings/ssh/new"
echo " and on all worker machines at ~nanosoldier/.ssh/authorized_keys"
sudo -u nanosoldier cat ~nanosoldier/.ssh/id_rsa.pub
echo "and on all worker machines at ~nanosoldier/.ssh/authorized_keys"
sudo -u nanosoldier cat ~nanosoldier/.ssh/id_ed25519.pub
echo
echo "and generate an auth-token for later at"
echo " https://github.com/settings/tokens/new"
Expand Down Expand Up @@ -64,8 +66,8 @@ echo " . ../cset/bin/activate"
echo " setarch -R ../julia-$VERSION/bin/julia -L bin/setup_test_ci.jl -e 'using Sockets; run(server, IPv4(0), ENV[\"GITHUB_PORT\"])'"
echo
echo "or with a helper script:"
echo " cp bin/run_base_ci.jl .."
echo " chgrp nanosoldier ../run_base_ci.jl"
echo " chmod 660 ../run_base_ci.jl"
echo " (umask 007 && cp bin/run_base_ci.jl ..)"
echo " (umask 007 && touch ../run_base_ci.stdout ../run_base_ci.stderr)"
echo " sudo chgrp nanosoldier ../run_base_ci.jl ../run_base_ci.stdout ../run_base_ci.stderr"
echo " \${EDITOR:-vim} ../run_base_ci.jl"
echo " sudo -u nanosoldier nohup ./run_base_ci"
echo " ./run_base_ci"
8 changes: 5 additions & 3 deletions provision-worker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ set +v
# See https://juliaci.github.io/BenchmarkTools.jl/stable/linuxtips/
# for an explanation of these configuration options

sudo apt update
sudo apt install build-essential libatomic1 python3 gfortran perl wget m4 cmake pkg-config curl ninja-build ccache
sudo apt install virtualenv
virtualenv cset
Expand Down Expand Up @@ -43,7 +42,7 @@ cat /proc/interrupts
# irqbalance

# create a (non-privileged) user to run the build and test:
sudo useradd nanosoldier-worker || true
sudo useradd -m nanosoldier-worker || true
sudo usermod -aG nanosoldier-worker `whoami`
sudo usermod -aG nanosoldier-worker nanosoldier

Expand All @@ -66,4 +65,7 @@ echo "-------------"
echo "manual steps (for each worker)"
echo "-------------"
echo
echo "replace ~nanosoldier/.ssh/id_rsa* with those files from the master"
echo "install ssh key from master server to this worker"
echo "sudo -u nanosoldier vim ~nanosoldier/.ssh/authorized_keys"
echo "sudo -u nanosoldier chmod 600 ~nanosoldier/.ssh/authorized_keys"
echo " # on server # sudo -u nanosoldier scp /home/nanosoldier/.ssh/id_ed25519 /home/nanosoldier/.ssh/id_ed25519.pub `hostname`:.ssh"
7 changes: 4 additions & 3 deletions run_base_ci
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export JULIA_PROJECT=~+
cd ..
echo $JULIA_PROJECT
exec sudo -u nanosoldier --preserve-env=JULIA_PROJECT \
setarch -R julia-1.6.6/bin/julia run_base_ci.jl \
2> >(umask 007 && exec sudo -u nanosoldier setsid -w tee -a run_base_ci.stderr) \
1> >(umask 007 && exec sudo -u nanosoldier setsid -w tee -a run_base_ci.stdout)
tmux new bash -c " \
setarch -R julia-1.8.2/bin/julia run_base_ci.jl \
2> >(umask 007 && exec setsid -w tee -a run_base_ci.stderr) \
1> >(umask 007 && exec setsid -w tee -a run_base_ci.stdout)"
2 changes: 1 addition & 1 deletion src/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function build_julia!(config::Config, build::BuildRef, logpath, prnumber::Union{
mirrordir = joinpath(workdir, "mirrors", split(config.trackrepo, "/")...)
mkpath(dirname(mirrordir), mode=0o755)
mkpidlock(mirrordir * ".lock") do
if ispath(mirrordir, ".git")
if ispath(mirrordir, "config")
maleadt marked this conversation as resolved.
Show resolved Hide resolved
run(`$(git()) -C $mirrordir fetch --quiet --all`)
else
mkpath(mirrordir)
Expand Down
Loading