mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-10 14:48:27 +00:00
Merge pull request #201 from wasmerio/test-benchmark-branch
Add benchmark Github action
This commit is contained in:
67
.github/workflows/benchmark.yaml
vendored
Normal file
67
.github/workflows/benchmark.yaml
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
name: Run Benchmarks and upload results
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
run_benchmark:
|
||||
name: Benchmark on ${{ matrix.build }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
build: [linux]
|
||||
include:
|
||||
- build: linux
|
||||
os: ubuntu-latest
|
||||
rust: 1.45.0
|
||||
env:
|
||||
CARGO_SCCACHE_VERSION: 0.2.13
|
||||
SCCACHE_AZURE_BLOB_CONTAINER: wasmerstoragesccacheblob
|
||||
SCCACHE_AZURE_CONNECTION_STRING: ${{ secrets.SCCACHE_AZURE_CONNECTION_STRING }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install Rust ${{ matrix.rust }}
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: ${{ matrix.rust }}
|
||||
override: true
|
||||
- name: Configure cargo data directory
|
||||
# After this point, all cargo registry and crate data is stored in
|
||||
# $GITHUB_WORKSPACE/.cargo_home. This allows us to cache only the files
|
||||
# that are needed during the build process. Additionally, this works
|
||||
# around a bug in the 'cache' action that causes directories outside of
|
||||
# the workspace dir to be saved/restored incorrectly.
|
||||
run: echo "::set-env name=CARGO_HOME::$(pwd)/.cargo_home"
|
||||
- name: Cache
|
||||
uses: actions/cache@master
|
||||
with:
|
||||
# Note: crates from the git repo always get rebuilt
|
||||
# so we cache only those subdirectories of target/{debug|release} that
|
||||
# contain the build output for crates that come from the registry.
|
||||
path: |-
|
||||
.cargo_home
|
||||
target/*/.*
|
||||
target/*/build
|
||||
target/*/deps
|
||||
key: ${{ matrix.os }}-${{ hashFiles('Cargo.lock') }}
|
||||
restore-keys: |
|
||||
${{ matrix.os }}-
|
||||
- name: Install Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.8
|
||||
- name: Install Python dependencies
|
||||
run: |
|
||||
pip install codespeed-client
|
||||
pip install toml
|
||||
- name: Run Benchmark
|
||||
run: |
|
||||
make bench
|
||||
git clone https://github.com/wasmerio/wasmer-bench
|
||||
|
||||
python3 wasmer-bench/send_metrics.py
|
||||
|
||||
2
.github/workflows/main.yaml
vendored
2
.github/workflows/main.yaml
vendored
@@ -35,7 +35,7 @@ jobs:
|
||||
# - run: make doc-local
|
||||
|
||||
test:
|
||||
name: Test in ${{ matrix.build }}
|
||||
name: Test on ${{ matrix.build }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
Reference in New Issue
Block a user