diff --git a/justfile b/justfile index 01912ac..d17bf52 100644 --- a/justfile +++ b/justfile @@ -1,6 +1,13 @@ update-submodules: git submodule update --recursive --init +clean-emulator: + make -C machine/emulator clean depclean distclean + +setup: update-submodules clean-emulator + just -f ./test/programs/justfile download-deps + just -f ./test/programs/justfile build-programs + build-consensus: just -f ./cartesi-rollups/contracts/justfile build clean-consensus-bindings: @@ -32,8 +39,6 @@ build-release-rust-workspace *ARGS: bind build: build-smart-contracts bind build-rust-workspace -clean-emulator: - make -C machine/emulator clean depclean distclean build-docker-image TAG="dave:dev": diff --git a/test/programs/justfile b/test/programs/justfile index 63cf06f..ea5dfb4 100644 --- a/test/programs/justfile +++ b/test/programs/justfile @@ -1,21 +1,26 @@ -download-deps: - wget https://github.com/cartesi/image-kernel/releases/download/v0.20.0/linux-6.5.13-ctsi-1-v0.20.0.bin \ - -O ./linux.bin - wget https://github.com/cartesi/machine-emulator-tools/releases/download/v0.16.1/rootfs-tools-v0.16.1.ext2 \ - -O ./rootfs.ext2 +download-deps: clean-deps + wget https://github.com/cartesi/image-kernel/releases/download/v0.20.0/linux-6.5.13-ctsi-1-v0.20.0.bin \ + -O ./linux.bin + wget https://github.com/cartesi/machine-emulator-tools/releases/download/v0.16.1/rootfs-tools-v0.16.1.ext2 \ + -O ./rootfs.ext2 clean-deps: - rm rootfs.ext2 - rm linux.bin + rm -f rootfs.ext2 + rm -f linux.bin +clean-programs: clean-echo +build-programs: build-echo build-echo: clean-echo - cartesi-machine --ram-image=./linux.bin \ - --flash-drive=label:root,filename:./rootfs.ext2 \ - --no-rollback --store=./echo/machine-image \ - -- "ioctl-echo-loop --vouchers=1 --notices=1 --reports=1 --verbose=1" - ./build_anvil_state.sh "echo" + cartesi-machine --ram-image=./linux.bin \ + --flash-drive=label:root,filename:./rootfs.ext2 \ + --no-rollback --store=./echo/machine-image \ + -- "ioctl-echo-loop --vouchers=1 --notices=1 --reports=1 --verbose=1" + ./build_anvil_state.sh "echo" -clean-echo: - rm -f echo/_anvil.log echo/addresses echo/anvil_state.json - rm -rf echo/machine-image + +clean-program prog: + rm -f {{prog}}/_anvil.log echo/addresses echo/anvil_state.json + rm -rf {{prog}}/machine-image + +clean-echo: (clean-program "echo")