-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
66 lines (53 loc) · 2.31 KB
/
justfile
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
DEVELOPMENT_ODRA_BRANCH := "release/1.2.0"
BINARYEN_VERSION := "version_116"
BINARYEN_CHECKSUM := "c55b74f3109cdae97490faf089b0286d3bba926bb6ea5ed00c8c784fc53718fd"
default:
just --list
install:
cargo install --path . --locked
prepare:
rustup target add wasm32-unknown-unknown
rustup toolchain install nightly
rustup component add --toolchain nightly-x86_64-unknown-linux-gnu clippy
rustup component add --toolchain nightly-x86_64-unknown-linux-gnu rustfmt
sudo apt install wabt
wget https://github.com/WebAssembly/binaryen/releases/download/{{BINARYEN_VERSION}}/binaryen-{{BINARYEN_VERSION}}-x86_64-linux.tar.gz || { echo "Download failed"; exit 1; }
sha256sum binaryen-{{BINARYEN_VERSION}}-x86_64-linux.tar.gz | grep {{BINARYEN_CHECKSUM}} || { echo "Checksum verification failed"; exit 1; }
tar -xzf binaryen-{{BINARYEN_VERSION}}-x86_64-linux.tar.gz || { echo "Extraction failed"; exit 1; }
sudo cp binaryen-{{BINARYEN_VERSION}}/bin/wasm-opt /usr/local/bin/wasm-opt
test-project-generation-on-stable-odra:
rm -rf testproject
cargo odra new --name testproject
just test-testproject
test-project-generation-on-future-odra:
rm -rf testproject
cargo odra new --name testproject --source {{DEVELOPMENT_ODRA_BRANCH}}
just test-testproject
test-workspace-generation-on-stable-odra:
rm -rf testproject
cargo odra new --name testproject --template workspace
just test-workspace-project
test-workspace-generation-on-future-odra:
rm -rf testproject
cargo odra new --name testproject --template workspace --source {{DEVELOPMENT_ODRA_BRANCH}}
just test-workspace-project
test-testproject:
cd testproject && rustup target add wasm32-unknown-unknown
cd testproject && cargo odra generate -c plascoin
cd testproject && cargo odra test
cd testproject && cargo odra test -b casper
cd testproject && cargo odra clean
test-workspace-project:
cd testproject && rustup target add wasm32-unknown-unknown
cd testproject && cargo odra generate -c plascoin -m flipper
cd testproject && cargo odra test
cd testproject && cargo odra test -b casper
cd testproject && cargo odra clean
clippy:
cargo +nightly clippy --all-targets -- -D warnings
check-lint: clippy
cargo +nightly fmt -- --check
lint: clippy
cargo +nightly fmt
clean:
cargo clean