From e626e1d78cf46dd1896ef98aa9d643f109977ad9 Mon Sep 17 00:00:00 2001 From: Iban Eguia Moraza Date: Fri, 21 Oct 2022 08:05:27 +0200 Subject: [PATCH] Started with DigitalOcean based benchmarking --- .github/workflows/benches_do.yml | 0 .github/workflows/pull_request.yml | 31 ++++++++---------------------- benchmark-setup.yml | 11 +++++++++++ prepare-benchmark-userdata.sh | 4 ++++ test262 | 2 +- 5 files changed, 24 insertions(+), 24 deletions(-) create mode 100644 .github/workflows/benches_do.yml create mode 100644 benchmark-setup.yml create mode 100644 prepare-benchmark-userdata.sh diff --git a/.github/workflows/benches_do.yml b/.github/workflows/benches_do.yml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 2f008df658..47723280b0 100644 --- a/.github/workflows/pull_request.yml +++ b/.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 diff --git a/benchmark-setup.yml b/benchmark-setup.yml new file mode 100644 index 0000000000..d7308aa4ed --- /dev/null +++ b/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 diff --git a/prepare-benchmark-userdata.sh b/prepare-benchmark-userdata.sh new file mode 100644 index 0000000000..e6c4115900 --- /dev/null +++ b/prepare-benchmark-userdata.sh @@ -0,0 +1,4 @@ +#/bin/sh + +repo_url = "https://github.com/$GITHUB_REPOSITORY.git" +commit = \ No newline at end of file diff --git a/test262 b/test262 index eb67a7689f..58b7a23582 160000 --- a/test262 +++ b/test262 @@ -1 +1 @@ -Subproject commit eb67a7689f422cf14776f78191650d0d78c2d2e4 +Subproject commit 58b7a2358286b918efd38eac4b2facbc8ada1206