Skip to content

Commit

Permalink
Add file size to benchmark script (#496)
Browse files Browse the repository at this point in the history
* * Add file size to benchmark script
* Reenable macOS TokamakDemo build in CI

* Update benchmark.sh

* Add Wasm size annotation

* Make sizes more readable
  • Loading branch information
ezraberch authored Jun 24, 2022
1 parent 546b9e5 commit 0b182d9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ jobs:
- uses: swiftwasm/swiftwasm-action@v5.6
with:
shell-action: carton bundle --product TokamakDemo
- name: Check binary size
shell: bash
run: |
ls -la Bundle
ls -lh Bundle/*.wasm | awk '{printf "::warning file=Sources/TokamakDemo/main.swift,line=1,col=1::TokamakDemo Wasm is %s.",$5}'
swiftwasm_test_5_6:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -44,10 +49,9 @@ jobs:
xcodebuild -version
# Make sure Tokamak can be built on macOS so that Xcode autocomplete works.
# Disable macOS builds until Monterey is available on GHA.
# xcodebuild -scheme TokamakDemo -destination 'generic/platform=macOS' \
# CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO | \
# xcpretty --color
xcodebuild -scheme TokamakDemo -destination 'generic/platform=macOS' \
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO | \
xcpretty --color
cd "NativeDemo"
xcodebuild -scheme iOS -destination 'generic/platform=iOS' \
Expand Down
2 changes: 2 additions & 0 deletions benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
set -eux

swift build -c release --product TokamakCoreBenchmark
ls -lh ./.build/release/TokamakCoreBenchmark | awk '{printf "::warning file=Sources/TokamakCoreBenchmark/main.swift,line=1,col=1::TokamakCoreBenchmark is %s.",$5}'
./.build/release/TokamakCoreBenchmark
swift build -c release --product TokamakStaticHTMLBenchmark
ls -lh ./.build/release/TokamakStaticHTMLBenchmark | awk '{printf "::warning file=Sources/TokamakStaticHTMLBenchmark/main.swift,line=1,col=1::TokamakStaticHTMLBenchmark is %s.",$5}'
./.build/release/TokamakStaticHTMLBenchmark

0 comments on commit 0b182d9

Please sign in to comment.