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

Use make in scripts instead of cargo-build #104

Merged
merged 1 commit into from
Jul 18, 2024
Merged
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
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