Skip to content

Commit f4580eb

Browse files
authored
add github actions to compile and test x64 benchmarks (#1)
* 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
1 parent a50ef82 commit f4580eb

4 files changed

Lines changed: 809 additions & 200 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# This is a workflow triggered by PR or triggered manually
2+
# Runs quick performance tests and reports the comparison against HEAD
3+
# Test should take less than 10 minutes to run on current self-hosted devices
4+
name: "Compile and Run on x64"
5+
6+
# Controls when the action will run.
7+
on:
8+
push:
9+
10+
# Env variables
11+
env:
12+
SG_COMMIT: 2ab01ac
13+
GITHUB_CONTEXT: ${{ toJson(github) }}
14+
15+
jobs:
16+
Compile_and_Run_All:
17+
name: Compile and run wasm-score benchmarks
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v3
21+
- run: echo "$GITHUB_CONTEXT"
22+
- run: |
23+
# Create and Push Branch
24+
./build.sh
25+
docker run -i wasmscore /bin/bash wasmscore.sh
26+
docker run -i wasmscore /bin/bash wasmscore.sh -t quickrun_all

Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ CMD ["/bin/bash"]
66
ENV DEBIAN_FRONTEND="noninteractive" TZ="America"
77
ARG RUST_VERSION="nightly-2023-04-01"
88
ARG WASMTIME_REPO="https://github.com/bytecodealliance/wasmtime/"
9-
ARG WASMTIME_COMMIT="b306368" #v0.38.0
10-
ARG SIGHTGLASS_REPO="https://github.com/jlb6740/sightglass.git"
11-
ARG SIGHTGLASS_BRANCH="add-native-engine"
12-
ARG SIGHTGLASS_COMMIT="35cccc2"
9+
ARG WASMTIME_COMMIT="acd0a9e" #v11.0.1
10+
ARG SIGHTGLASS_REPO="https://github.com/bytecodealliance/sightglass.git"
11+
ARG SIGHTGLASS_BRANCH="main"
12+
ARG SIGHTGLASS_COMMIT="e89fce0"
1313

1414
# Get some prerequisites
1515
RUN apt-get update \
@@ -71,7 +71,7 @@ RUN mkdir results
7171

7272
# Build wasmtime engine for sightglass
7373
WORKDIR /
74-
RUN git clone --single-branch --recurse-submodule ${WASMTIME_REPO} wasmtime
74+
RUN git clone --recurse-submodule ${WASMTIME_REPO} wasmtime
7575
WORKDIR /wasmtime
7676
RUN git checkout ${WASMTIME_COMMIT} -b ${WASMTIME_COMMIT}
7777
RUN cargo build -p wasmtime-bench-api --release

build.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
#!/bin/bash
22
. "$(dirname ${BASH_SOURCE:-$0})/config.inc"
33
IMAGE_NAME="wasmscore"
4-
ARCH=$(uname -m)
4+
ARCH=$(uname -m | awk '{print tolower($0)}')
5+
KERNEL=$(uname -s | awk '{print tolower($0)}')
56
echo "Building ${IMAGE_NAME} for $ARCH based on wasmtime@${WASMTIME_BUILD}"
67

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

10-
docker tag ${IMAGE_NAME} ${IMAGE_NAME}_${ARCH}:latest
11-
docker tag ${IMAGE_NAME} ${IMAGE_NAME}_${ARCH}:${IMAGE_VER}
11+
docker tag ${IMAGE_NAME} ${IMAGE_NAME}_${ARCH}_${KERNEL}:latest
12+
docker tag ${IMAGE_NAME} ${IMAGE_NAME}_${ARCH}_${KERNEL}:${IMAGE_VER}
1213

1314
echo ""
1415
echo "To run from this local build use command:"

0 commit comments

Comments
 (0)