forked from moonbitlang/minimoonbit-public
-
Notifications
You must be signed in to change notification settings - Fork 1
/
easy.sh
41 lines (33 loc) · 1.35 KB
/
easy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# install third packages
# moon login # 登陆你的账户
# 安装依赖
moon update # 更新包注册表索引
moon add package_name # from moon.mod.json
moon install
git submodule update --init --recursive
# local compiler test
moon test # 扫描整个模块,识别并运行所有内联测试以及以_test.mbt结尾的文件
moon test -v
moon run src/bin/main.mbt some_file.mbt
# moon run src/bin/main.mbt test/test_src/ack.mbt
# local language debug
moon run test_language/main.mbt
# dev
# 解析
moon run src/bin/main.mbt -- --end-stage parse test/test_src/ack.mbt
# test simple src
moon run src/bin/main.mbt -- --end-stage parse test/test_simple_src/expression.mbt
moon run src/bin/main.mbt -- --end-stage parse test/test_simple_src/if_else.mbt
# test cases(auto test all on local machine)
# 语法解析
moon run src/bin/main.mbt -- --end-stage parse test/test_cases/parsing/arith.mbt
# 类型检查
moon run src/bin/main.mbt -- --end-stage typecheck test/test_cases/typing/arith.mbt
# knf
moon run src/bin/main.mbt -- --knf-interpreter test/test_cases/knf/id.mbt
# 等效于 moonrun target/wasm-gc/release/build/bin/bin.wasm -- --knf-interpreter test/test_cases/knf/id.mb
# 快速测试&提交
./test/scripts/faster_test.sh test/test_cases/typing/
./test/scripts/faster_test_all.sh
# remote compiler test(仅仅打包Head提交)
git archive -o submit.zip HEAD