Skip to content

Commit

Permalink
Add github actions to compile and test x64 benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
jlb6740 committed Jul 28, 2023
1 parent a50ef82 commit e545782
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 12 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/compile-and-run-x64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This is a workflow triggered by PR or triggered manually
# Runs quick performance tests and reports the comparison against HEAD
# Test should take less than 10 minutes to run on current self-hosted devices
name: "Compile and Run on x64"

# Controls when the action will run.
on:
push:

# Env variables
env:
SG_COMMIT: 2ab01ac
GITHUB_CONTEXT: ${{ toJson(github) }}

jobs:
Compile_and_Run_All:
name: Compile and run wasm-score benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: echo "$GITHUB_CONTEXT"
- run: |
# Create and Push Branch
./build.sh
docker run -i wasmscore /bin/bash wasmscore.sh
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ CMD ["/bin/bash"]
ENV DEBIAN_FRONTEND="noninteractive" TZ="America"
ARG RUST_VERSION="nightly-2023-04-01"
ARG WASMTIME_REPO="https://github.com/bytecodealliance/wasmtime/"
ARG WASMTIME_COMMIT="b306368" #v0.38.0
ARG SIGHTGLASS_REPO="https://github.com/jlb6740/sightglass.git"
ARG SIGHTGLASS_BRANCH="add-native-engine"
ARG SIGHTGLASS_COMMIT="35cccc2"
ARG WASMTIME_COMMIT="acd0a9e" #v11.0.1
ARG SIGHTGLASS_REPO="https://github.com/bytecodealliance/sightglass.git"
ARG SIGHTGLASS_BRANCH="main"
ARG SIGHTGLASS_COMMIT="e89fce0"

# Get some prerequisites
RUN apt-get update \
Expand Down Expand Up @@ -71,7 +71,7 @@ RUN mkdir results

# Build wasmtime engine for sightglass
WORKDIR /
RUN git clone --single-branch --recurse-submodule ${WASMTIME_REPO} wasmtime
RUN git clone --recurse-submodule ${WASMTIME_REPO} wasmtime
WORKDIR /wasmtime
RUN git checkout ${WASMTIME_COMMIT} -b ${WASMTIME_COMMIT}
RUN cargo build -p wasmtime-bench-api --release
Expand Down
15 changes: 8 additions & 7 deletions wasmscore.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
"bzip2": "bz2",
"meshoptimizer": "meshoptimizer",
"ackermann": "shootout-ackermann",
#
# https://base64.guru/learn/base64-algorithm/encode
"base64": "shootout-base64",
"ctype": "shootout-ctype",
"ed25519": "shootout-ed25519",
Expand All @@ -84,16 +86,15 @@
}

perf_suites = {
"applications": ["meshoptimizer", "spidermonkey"],
"crtyptographic": ["blake3-simd"],
"machine-learning": [],
"core": ["base64", "blake3-scalar", "ctype", "fibonacci", "bzip2"],
"shootout": ["ackermann", "base64", "ctype", "fibonacci", "gimli", "heapsort", "keccak", "matrix", "memmove", "minicsv", "nested-loop", "random", "ratelimit", "seqhash", "sieve", "switch", "xblahblah20", "xchacha20"],
"simd": ["blake3-simd"],
"applications": ["meshoptimizer"],
"applications-score": ["meshoptimizer"],
"core-score": ["base64", "blake3-scalar", "ctype", "fibonacci", "bzip2"],
"shootout": ["base64", "ctype", "fibonacci", "gimli", "heapsort", "keccak", "matrix", "memmove", "minicsv", "nested-loop", "random", "ratelimit", "seqhash", "sieve", "switch", "xblahblah20", "xchacha20"],
"simd-score": ["blake3-simd", "hex-simd", "intgemm-simd"],
}

perf_tests = {
"wasmscore": ["applications", "core", "simd"]
"wasmscore": ["applications-score", "core-score", "simd-score"]
}

# Appended by build_dics()
Expand Down

0 comments on commit e545782

Please sign in to comment.