Skip to content

Commit

Permalink
ci: Consolidate "Install WABT" commands
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast committed Sep 2, 2020
1 parent e3ac7cf commit 70a3bb2
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@ commands:
name: "Install system dependencies"
command: HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_CLEANUP=1 brew install cmake ninja

install_wabt:
description: "Install WABT tools"
steps:
- run:
name: "Install WABT tools"
command: |
if type wast2json; then
wast2json --version
else
[[ $OSTYPE = darwin* ]] && os=macos || os=ubuntu
cd /usr/local
curl -L https://github.com/WebAssembly/wabt/releases/download/1.0.19/wabt-1.0.19-$os.tar.gz | sudo tar xz --strip 1
fi
build:
description: "Build"
parameters:
Expand Down Expand Up @@ -149,16 +163,7 @@ commands:
default: 477

steps:
- run:
name: "Install WABT"
command: |
if type wast2json; then
wast2json --version
else
[[ $OSTYPE = darwin* ]] && os=macos || os=ubuntu
cd /usr/local
curl -L https://github.com/WebAssembly/wabt/releases/download/1.0.19/wabt-1.0.19-$os.tar.gz | sudo tar xz --strip 1
fi
- install_wabt
- run:
name: "Download spectest files"
working_directory: ~/build
Expand All @@ -168,7 +173,6 @@ commands:
mkdir json && cd json
find ../wasm-spec/test/core -name '*.wast' -exec wast2json {} \;
fi
- run:
name: "Run spectest<<#parameters.skip_validation>> (skip validation)<</parameters.skip_validation>>"
working_directory: ~/build
Expand All @@ -195,14 +199,10 @@ jobs:
name: "Run codespell"
command: |
codespell --quiet-level=4 -I .codespell-whitelist
- run:
name: "Install wabt"
working_directory: ~/bin
command: curl -L https://github.com/WebAssembly/wabt/releases/download/1.0.15/wabt-1.0.15-linux.tar.gz | tar xz --strip=1
- install_wabt
- run:
name: "Check wat2wasm4cpp"
command: |
export PATH=$PATH:~/bin
./wat2wasm4cpp.py test/unittests/api_test.cpp
./wat2wasm4cpp.py test/unittests/end_to_end_test.cpp
./wat2wasm4cpp.py test/unittests/execute_call_test.cpp
Expand Down

0 comments on commit 70a3bb2

Please sign in to comment.