From fac98053f736a07d68c7cfcc82ca83959c368df6 Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Sun, 17 Sep 2023 15:37:09 -0700 Subject: [PATCH] use mops for all motoko benchmarks (#87) * use mops for all motoko benchmarks * bump sha2 --- crypto/motoko/mops.template.toml | 2 +- dapps/Makefile | 2 +- dapps/motoko/dfx.json | 6 ++++++ dapps/motoko/mops.template.toml | 2 ++ pub-sub/Makefile | 2 +- pub-sub/motoko/dfx.json | 8 +++++++- pub-sub/motoko/mops.template.toml | 2 ++ 7 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 dapps/motoko/mops.template.toml create mode 100644 pub-sub/motoko/mops.template.toml diff --git a/crypto/motoko/mops.template.toml b/crypto/motoko/mops.template.toml index 25c4f345..f9532163 100644 --- a/crypto/motoko/mops.template.toml +++ b/crypto/motoko/mops.template.toml @@ -1,4 +1,4 @@ [dependencies] base = "https://github.com/dfinity/motoko-base#moc-$MOC_VERSION" -sha2 = "0.0.2" +sha2 = "0.0.4" ic-certification = "https://github.com/nomeata/ic-certification#main" diff --git a/dapps/Makefile b/dapps/Makefile index 9c920ddf..ad2edcc5 100644 --- a/dapps/Makefile +++ b/dapps/Makefile @@ -4,7 +4,7 @@ include ../*.mk all: build perf motoko: - $(call build,motoko) + $(call build_with_mops,motoko) rust: $(call build,rust) diff --git a/dapps/motoko/dfx.json b/dapps/motoko/dfx.json index 6db884dd..c3efa2db 100644 --- a/dapps/motoko/dfx.json +++ b/dapps/motoko/dfx.json @@ -6,5 +6,11 @@ "basic_dao": { "main": "basic_dao/Main.mo" } + }, + "defaults": { + "build": { + "packtool": "mops sources", + "args": "" + } } } diff --git a/dapps/motoko/mops.template.toml b/dapps/motoko/mops.template.toml new file mode 100644 index 00000000..976184ae --- /dev/null +++ b/dapps/motoko/mops.template.toml @@ -0,0 +1,2 @@ +[dependencies] +base = "https://github.com/dfinity/motoko-base#moc-$MOC_VERSION" diff --git a/pub-sub/Makefile b/pub-sub/Makefile index a4bbdeed..11adbb74 100644 --- a/pub-sub/Makefile +++ b/pub-sub/Makefile @@ -4,7 +4,7 @@ include ../*.mk all: build perf motoko: - $(call build,motoko) + $(call build_with_mops,motoko) rust: $(call build,rust) diff --git a/pub-sub/motoko/dfx.json b/pub-sub/motoko/dfx.json index fbccd05a..43bef3b6 100644 --- a/pub-sub/motoko/dfx.json +++ b/pub-sub/motoko/dfx.json @@ -6,5 +6,11 @@ "sub": { "main": "src/sub/Main.mo" } + }, + "defaults": { + "build": { + "packtool": "mops sources", + "args": "" + } } -} \ No newline at end of file +} diff --git a/pub-sub/motoko/mops.template.toml b/pub-sub/motoko/mops.template.toml new file mode 100644 index 00000000..976184ae --- /dev/null +++ b/pub-sub/motoko/mops.template.toml @@ -0,0 +1,2 @@ +[dependencies] +base = "https://github.com/dfinity/motoko-base#moc-$MOC_VERSION"