Browse Source

Started with DigitalOcean based benchmarking

benchmarks
Iban Eguia Moraza 2 years ago
parent
commit
e626e1d78c
No known key found for this signature in database
GPG Key ID: 777B7481C7DE661A
  1. 0
      .github/workflows/benches_do.yml
  2. 31
      .github/workflows/pull_request.yml
  3. 11
      benchmark-setup.yml
  4. 4
      prepare-benchmark-userdata.sh
  5. 2
      test262

0
.github/workflows/benches_do.yml

31
.github/workflows/pull_request.yml

@ -6,29 +6,14 @@ on:
- main
jobs:
runBenchmark:
if: contains(github.event.pull_request.labels.*.name, 'run-benchmark')
name: run benchmark
create_droplet:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
fetch-depth: 0
- uses: actions-rs/toolchain@v1.0.7
with:
toolchain: stable
override: true
profile: minimal
- name: Cache cargo
uses: actions/cache@v3
with:
path: |
target
~/.cargo/git
~/.cargo/registry
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: boa-dev/criterion-compare-action@v3.2.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
branchName: ${{ github.base_ref }}
cwd: ./boa_engine
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Prepare user-data file
run: ./prepare-benchmark-userdata.sh
- name: Create droplet
run: doctl compute droplet create $GITHUB_SHA --size g-2vcpu-8gb --image rockylinux-9-x64 --user-data-file ./benchmark-setup.yml

11
benchmark-setup.yml

@ -0,0 +1,11 @@
#cloud-config
cloud_config_modules:
- runcmd
cloud_final_modules:
- scripts-user
runcmd:
- dnf upgrade --refresh -y
- dnf install --refresh git -y
- git clone

4
prepare-benchmark-userdata.sh

@ -0,0 +1,4 @@
#/bin/sh
repo_url = "https://github.com/$GITHUB_REPOSITORY.git"
commit =

2
test262

@ -1 +1 @@
Subproject commit eb67a7689f422cf14776f78191650d0d78c2d2e4
Subproject commit 58b7a2358286b918efd38eac4b2facbc8ada1206
Loading…
Cancel
Save