Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add github actions to compile and test x64 benchmarks #1

Merged
merged 10 commits into from
Aug 8, 2023
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