Skip to content

Commit

Permalink
Use make in scripts instead of cargo-build
Browse files Browse the repository at this point in the history
Signed-off-by: Alberto Faria <[email protected]>
  • Loading branch information
albertofaria committed Jul 18, 2024
1 parent d9b31ee commit 3d65c4d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
12 changes: 6 additions & 6 deletions tests/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ __rel() {

__build_runtime() {
__big_log 33 'Building crun-vm...'
__log_and_run cargo build
runtime=$repo_root/target/debug/crun-vm
__log_and_run make -C "$repo_root"
runtime=$repo_root/out/crun-vm
}

__extra_cleanup() { :; }
Expand Down Expand Up @@ -201,7 +201,7 @@ build)
virtiofsd
__exec sudo dnf clean all

daemon_json='{ "runtimes": { "crun-vm": { "path": "/home/fedora/target/debug/crun-vm" } } }'
daemon_json='{ "runtimes": { "crun-vm": { "path": "/home/fedora/bin/crun-vm" } } }'
__exec sudo mkdir -p /etc/docker
__exec "echo ${daemon_json@Q} | sudo tee /etc/docker/daemon.json"

Expand Down Expand Up @@ -246,7 +246,7 @@ start)
--memory 8g \
--rm -dit \
-v "$temp_dir":/home/fedora/images:z \
-v "$repo_root/target":/home/fedora/target:z \
-v "$repo_root/out":/home/fedora/bin:z \
"$env_image"

# shellcheck disable=SC2317
Expand Down Expand Up @@ -331,11 +331,11 @@ run)
case "$engine" in
podman)
engine_cmd=( podman )
runtime_in_env=/home/fedora/target/debug/crun-vm
runtime_in_env=/home/fedora/bin/crun-vm
;;
rootful-podman)
engine_cmd=( sudo podman )
runtime_in_env=/home/fedora/target/debug/crun-vm
runtime_in_env=/home/fedora/bin/crun-vm
;;
docker)
engine_cmd=( sudo docker )
Expand Down
5 changes: 3 additions & 2 deletions util/minikube-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
set -o errexit -o pipefail -o nounset

script_dir="$( dirname "$0" | xargs readlink -e )"
repo_root=$script_dir/../..

__minikube() {
minikube -p=crun-vm-example "$@"
Expand All @@ -25,7 +26,7 @@ __apt_get() {

# build runtime

cargo build
make -C "$repo_root"

# create minikube cluster

Expand Down Expand Up @@ -57,7 +58,7 @@ __ssh 'tee --append /etc/crio/crio.conf <<EOF
runtime_path = "/usr/local/bin/crun-vm"
EOF'

__cp "${script_dir}/../../target/debug/crun-vm" /usr/local/bin/crun-vm
__cp "$repo_root/out/crun-vm" /usr/local/bin/crun-vm
__ssh chmod +x /usr/local/bin/crun-vm

# reload cluster so that the new runtime is picked up
Expand Down

0 comments on commit 3d65c4d

Please sign in to comment.