Skip to content

Commit

Permalink
add github actions to compile and test x64 benchmarks (#1)
Browse files Browse the repository at this point in the history
* Add github actions to compile and test x64 benchmarks

* Refactor driver to match refactored sightglass

* Continue refactor and cleanup. Better use of df

* Prints out efficiency and wasm scores

* Remove unneeded comments

* Add printing of results to a file and the screen

* Improve quiet printing

* Add simdscore placeholder and validate runall

* Update tag for docker images

* Update workflow to include running of all available benchmarks
  • Loading branch information
jlb6740 authored Aug 8, 2023
1 parent a50ef82 commit f4580eb
Show file tree
Hide file tree
Showing 4 changed files with 809 additions and 200 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/compile-and-run-x64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 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
docker run -i wasmscore /bin/bash wasmscore.sh -t quickrun_all
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
7 changes: 4 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#!/bin/bash
. "$(dirname ${BASH_SOURCE:-$0})/config.inc"
IMAGE_NAME="wasmscore"
ARCH=$(uname -m)
ARCH=$(uname -m | awk '{print tolower($0)}')
KERNEL=$(uname -s | awk '{print tolower($0)}')
echo "Building ${IMAGE_NAME} for $ARCH based on wasmtime@${WASMTIME_BUILD}"

# Create Docker Image
docker build -t ${IMAGE_NAME} --build-arg ARCH=$(uname -m) .

docker tag ${IMAGE_NAME} ${IMAGE_NAME}_${ARCH}:latest
docker tag ${IMAGE_NAME} ${IMAGE_NAME}_${ARCH}:${IMAGE_VER}
docker tag ${IMAGE_NAME} ${IMAGE_NAME}_${ARCH}_${KERNEL}:latest
docker tag ${IMAGE_NAME} ${IMAGE_NAME}_${ARCH}_${KERNEL}:${IMAGE_VER}

echo ""
echo "To run from this local build use command:"
Expand Down
Loading

0 comments on commit f4580eb

Please sign in to comment.