From 1fe54cca32c0de2d119ae4b19fbf6a1179c48439 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Thu, 4 May 2023 12:27:50 -0700 Subject: [PATCH 001/174] Add files via upload --- Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..3e7d3c0dfe --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM gradle:7.3.3-jdk11 + +COPY --chown=gradle:gradle . /benchmark +WORKDIR /benchmark + +RUN gradle clean build + +CMD ["gradle", "jmh"] From 63d30d71d9ae81a1c2dfa8e1cce541b6062cfa01 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Thu, 4 May 2023 12:29:21 -0700 Subject: [PATCH 002/174] Add files via upload --- cloudbuild.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 cloudbuild.yaml diff --git a/cloudbuild.yaml b/cloudbuild.yaml new file mode 100644 index 0000000000..6cce005125 --- /dev/null +++ b/cloudbuild.yaml @@ -0,0 +1,11 @@ +steps: +- name: 'gcr.io/cloud-builders/docker' + args: ['build', '-t', 'gcr.io/$PROJECT_ID/jmh-benchmark', '.'] +- name: 'gcr.io/$PROJECT_ID/jmh-benchmark' + id: 'run_benchmark' + waitFor: ['-'] + args: ['bash', '-c', 'echo "JMH benchmark is running..."'] +- name: 'gcr.io/cloud-builders/gsutil' + args: ['cp', '/benchmark/target/benchmarks.txt', 'gs:///benchmarks/$BRANCH_NAME/$SHORT_SHA.txt'] +options: + machineType: 'N1_HIGHCPU_8' From 3afb61f38a729e383693dcd390dfcda757c4363a Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Thu, 4 May 2023 12:30:50 -0700 Subject: [PATCH 003/174] Add files via upload --- .github/workflows/benchmark.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/benchmark.yml diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml new file mode 100644 index 0000000000..ffda8aae15 --- /dev/null +++ b/.github/workflows/benchmark.yml @@ -0,0 +1,25 @@ +name: JMH Benchmark + +on: + pull_request: + branches: + - main + +jobs: + benchmark: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Google Cloud SDK + uses: google-github-actions/setup-gcloud@master + with: + service_account_key: ${{ secrets.GCP_SA_KEY }} + project_id: + export_default_credentials: true + + - name: Run JMH Benchmark on GCP + run: | + gcloud builds submit --config cloudbuild.yaml --substitutions=BRANCH_NAME=${{ github.head_ref }},SHORT_SHA=${{ github.sha }} . + From a613e2a9b5f8f4165c5c08a2733b4f939d2ca7f3 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Thu, 4 May 2023 13:41:47 -0700 Subject: [PATCH 004/174] Delete Dockerfile --- Dockerfile | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 3e7d3c0dfe..0000000000 --- a/Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM gradle:7.3.3-jdk11 - -COPY --chown=gradle:gradle . /benchmark -WORKDIR /benchmark - -RUN gradle clean build - -CMD ["gradle", "jmh"] From e406cb617eab42f31787ccb66a88e038dc30376f Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Thu, 4 May 2023 13:42:10 -0700 Subject: [PATCH 005/174] Delete cloudbuild.yaml --- cloudbuild.yaml | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 cloudbuild.yaml diff --git a/cloudbuild.yaml b/cloudbuild.yaml deleted file mode 100644 index 6cce005125..0000000000 --- a/cloudbuild.yaml +++ /dev/null @@ -1,11 +0,0 @@ -steps: -- name: 'gcr.io/cloud-builders/docker' - args: ['build', '-t', 'gcr.io/$PROJECT_ID/jmh-benchmark', '.'] -- name: 'gcr.io/$PROJECT_ID/jmh-benchmark' - id: 'run_benchmark' - waitFor: ['-'] - args: ['bash', '-c', 'echo "JMH benchmark is running..."'] -- name: 'gcr.io/cloud-builders/gsutil' - args: ['cp', '/benchmark/target/benchmarks.txt', 'gs:///benchmarks/$BRANCH_NAME/$SHORT_SHA.txt'] -options: - machineType: 'N1_HIGHCPU_8' From a222600c3fab45bf5897daf425e29e8bac91e6f3 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Thu, 4 May 2023 14:08:45 -0700 Subject: [PATCH 006/174] Delete benchmark.yml --- .github/workflows/benchmark.yml | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 .github/workflows/benchmark.yml diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index ffda8aae15..0000000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: JMH Benchmark - -on: - pull_request: - branches: - - main - -jobs: - benchmark: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Set up Google Cloud SDK - uses: google-github-actions/setup-gcloud@master - with: - service_account_key: ${{ secrets.GCP_SA_KEY }} - project_id: - export_default_credentials: true - - - name: Run JMH Benchmark on GCP - run: | - gcloud builds submit --config cloudbuild.yaml --substitutions=BRANCH_NAME=${{ github.head_ref }},SHORT_SHA=${{ github.sha }} . - From 26b8048a9a550d3a3fe21645a2b45cb775862ba5 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Thu, 4 May 2023 14:09:10 -0700 Subject: [PATCH 007/174] Create jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/jmh-benchmark.yml diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml new file mode 100644 index 0000000000..c8a1d88897 --- /dev/null +++ b/.github/workflows/jmh-benchmark.yml @@ -0,0 +1,27 @@ +name: JMH Benchmark + +on: + pull_request: + branches: + - main + +jobs: + benchmark: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Google Cloud SDK + uses: google-github-actions/setup-gcloud@v0.3.0 + with: + service_account_key: ${{ secrets.GCP_SA_KEY }} + project_id: + export_default_credentials: true + + - name: Run JMH benchmarks on Compute Engine + run: | + gcloud compute ssh \ + --zone= \ + --command=" cd Nullway/ && ./gradlew jmh" From e5372ef5a34fa3fb6dd5185d31ab9f4327661a28 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Thu, 4 May 2023 14:15:20 -0700 Subject: [PATCH 008/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index c8a1d88897..b90eab1a9e 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -2,8 +2,7 @@ name: JMH Benchmark on: pull_request: - branches: - - main + jobs: benchmark: From 0736aaf8267b3725cce48750104d6b64ce3cda5a Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Thu, 4 May 2023 14:26:27 -0700 Subject: [PATCH 009/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index b90eab1a9e..86d268ad48 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -13,11 +13,20 @@ jobs: uses: actions/checkout@v2 - name: Set up Google Cloud SDK - uses: google-github-actions/setup-gcloud@v0.3.0 + uses: google-github-actions/setup-gcloud@v0.3.2 with: service_account_key: ${{ secrets.GCP_SA_KEY }} - project_id: + project_id: export_default_credentials: true + + - name: Check gcloud version and authentication + run: | + gcloud version + gcloud auth list + + + + - name: Run JMH benchmarks on Compute Engine run: | From ba562c0b8deb305c9a78960bd44cdfa10dcbf377 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Thu, 4 May 2023 16:51:25 -0700 Subject: [PATCH 010/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 86d268ad48..d8eaa1ce82 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -11,13 +11,16 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v2 + + - id: 'auth' + name: Authenticating + uses: 'google-github-actions/auth@v1' + with: + credentials_json: '${{ secrets.GCP_SA_KEY }}' - name: Set up Google Cloud SDK - uses: google-github-actions/setup-gcloud@v0.3.2 - with: - service_account_key: ${{ secrets.GCP_SA_KEY }} - project_id: - export_default_credentials: true + uses: google-github-actions/setup-gcloud@v1 + - name: Check gcloud version and authentication run: | From 9a435328f6f2c5138e134976d0f61ead21927dc3 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Thu, 4 May 2023 17:29:02 -0700 Subject: [PATCH 011/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index d8eaa1ce82..2593462907 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -35,4 +35,4 @@ jobs: run: | gcloud compute ssh \ --zone= \ - --command=" cd Nullway/ && ./gradlew jmh" + --command=" cd NullAway/ && ./gradlew jmh" From e48a6e40bb3a2ce03795853bb60b39cb6f3bc10f Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Thu, 4 May 2023 17:34:32 -0700 Subject: [PATCH 012/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 2593462907..80928fbcd9 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -26,8 +26,7 @@ jobs: run: | gcloud version gcloud auth list - - + gcloud compute instances list From 7b3aa417296f8e462374417c3f0a165c420b0331 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Thu, 4 May 2023 17:39:33 -0700 Subject: [PATCH 013/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 80928fbcd9..7fda27baf4 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -26,12 +26,10 @@ jobs: run: | gcloud version gcloud auth list - gcloud compute instances list - - name: Run JMH benchmarks on Compute Engine run: | - gcloud compute ssh \ - --zone= \ + gcloud compute ssh instance-1 \ + --zone=us-central1-a \ --command=" cd NullAway/ && ./gradlew jmh" From a35945b66294e9c7c5fb5c6034de6f736dd51aa7 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Thu, 4 May 2023 17:39:51 -0700 Subject: [PATCH 014/174] Add files via upload --- test.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 test.py diff --git a/test.py b/test.py new file mode 100644 index 0000000000..87b2a7338a --- /dev/null +++ b/test.py @@ -0,0 +1 @@ +#This is a testfile for checking pull requests \ No newline at end of file From d4524a0ff3df8b86757b06c6a75e4285ec7a8dec Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Thu, 4 May 2023 17:40:03 -0700 Subject: [PATCH 015/174] Delete test.py --- test.py | 1 - 1 file changed, 1 deletion(-) delete mode 100644 test.py diff --git a/test.py b/test.py deleted file mode 100644 index 87b2a7338a..0000000000 --- a/test.py +++ /dev/null @@ -1 +0,0 @@ -#This is a testfile for checking pull requests \ No newline at end of file From 53c4b81ce5a93f58db1e2fc705b1b81188dfe6fa Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Thu, 4 May 2023 17:46:14 -0700 Subject: [PATCH 016/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 7fda27baf4..cf4da86c5c 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -32,4 +32,4 @@ jobs: run: | gcloud compute ssh instance-1 \ --zone=us-central1-a \ - --command=" cd NullAway/ && ./gradlew jmh" + --command=" git clone git@github.com:armughan11/NullAway.git && cd NullAway/ && ./gradlew jmh" From 6bfdfac8ba8fbdfe01d54eeb33af17adfc823610 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Thu, 4 May 2023 18:30:06 -0700 Subject: [PATCH 017/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index cf4da86c5c..d782f02f86 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -26,7 +26,16 @@ jobs: run: | gcloud version gcloud auth list - + + + - name: Add SSH key to the agent + run: | + echo "${{ secrets.GH_KEY }}" > private_key + chmod 600 private_key + ssh-add private_key + rm private_key + env: + SSH_AUTH_SOCK: /tmp/ssh_agent.sock - name: Run JMH benchmarks on Compute Engine run: | From eb05c20ed45b3c8b79b6f249ae14a3d72d0a5817 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Thu, 4 May 2023 18:30:20 -0700 Subject: [PATCH 018/174] Add files via upload --- test.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 test.py diff --git a/test.py b/test.py new file mode 100644 index 0000000000..87b2a7338a --- /dev/null +++ b/test.py @@ -0,0 +1 @@ +#This is a testfile for checking pull requests \ No newline at end of file From 3afdb8211d4d3074b447def5827dd3068a039b04 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Thu, 4 May 2023 18:30:31 -0700 Subject: [PATCH 019/174] Delete test.py --- test.py | 1 - 1 file changed, 1 deletion(-) delete mode 100644 test.py diff --git a/test.py b/test.py deleted file mode 100644 index 87b2a7338a..0000000000 --- a/test.py +++ /dev/null @@ -1 +0,0 @@ -#This is a testfile for checking pull requests \ No newline at end of file From b6d16c8a7f25b37461a67144dc0660550aa5a1ef Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Thu, 4 May 2023 18:33:04 -0700 Subject: [PATCH 020/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index d782f02f86..961ffa98c9 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -26,7 +26,11 @@ jobs: run: | gcloud version gcloud auth list - + + - name: Start SSH agent + run: | + eval "$(ssh-agent -s)" + echo "SSH_AUTH_SOCK=${SSH_AUTH_SOCK}" >> $GITHUB_ENV - name: Add SSH key to the agent run: | From 04f34aba6354d49cb7e209ee3f3c156e82114af2 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Thu, 4 May 2023 18:43:47 -0700 Subject: [PATCH 021/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 961ffa98c9..aec629a106 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -27,22 +27,8 @@ jobs: gcloud version gcloud auth list - - name: Start SSH agent - run: | - eval "$(ssh-agent -s)" - echo "SSH_AUTH_SOCK=${SSH_AUTH_SOCK}" >> $GITHUB_ENV - - - name: Add SSH key to the agent - run: | - echo "${{ secrets.GH_KEY }}" > private_key - chmod 600 private_key - ssh-add private_key - rm private_key - env: - SSH_AUTH_SOCK: /tmp/ssh_agent.sock - - name: Run JMH benchmarks on Compute Engine run: | gcloud compute ssh instance-1 \ --zone=us-central1-a \ - --command=" git clone git@github.com:armughan11/NullAway.git && cd NullAway/ && ./gradlew jmh" + --command=" whoami " From f8ed394603d3b9fe8255e5da360f43324549c706 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Thu, 4 May 2023 19:33:55 -0700 Subject: [PATCH 022/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index aec629a106..9f2c92fb21 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -29,6 +29,8 @@ jobs: - name: Run JMH benchmarks on Compute Engine run: | - gcloud compute ssh instance-1 \ + gcloud compute ssh \ + --project=nullway-jmh \ --zone=us-central1-a \ - --command=" whoami " + root@instance-1 \ + --command=" ls " From 4f616e449b641399c85fcdda5f4aa2caaf29e3c4 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Thu, 4 May 2023 19:38:58 -0700 Subject: [PATCH 023/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 9f2c92fb21..41537da92a 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -33,4 +33,4 @@ jobs: --project=nullway-jmh \ --zone=us-central1-a \ root@instance-1 \ - --command=" ls " + --command=" git clone git@github.com:armughan11/NullAway.git && cd NullAway/ && ./gradlew jmh " From b8bdf4af4c9689f9bc74434c8dbdcfbd7a464dd8 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Sat, 6 May 2023 18:02:30 -0700 Subject: [PATCH 024/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 41537da92a..936f1bc220 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -33,4 +33,4 @@ jobs: --project=nullway-jmh \ --zone=us-central1-a \ root@instance-1 \ - --command=" git clone git@github.com:armughan11/NullAway.git && cd NullAway/ && ./gradlew jmh " + --command=" export BRANCH_NAME=${BRANCH_NAME} && echo BRANCH_NAME && git clone git@github.com:armughan11/NullAway.git && cd NullAway/ && ./gradlew jmh " From 500371ff1a0caffda34204bfd5e539af852d268c Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Sat, 6 May 2023 18:05:32 -0700 Subject: [PATCH 025/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 936f1bc220..2f1ee6601b 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -11,6 +11,14 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v2 + + - name: Get PR branch + uses: xt0rted/pull-request-comment-branch@v1 + id: comment-branch + + + - name: Set branch name + run: echo "BRANCH_NAME=${{ steps.comment-branch.outputs.head_ref }}" >> $GITHUB_ENV - id: 'auth' name: Authenticating From 4cbcf34509d590a385d8ab08cd429b02c5a38c66 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Sat, 6 May 2023 18:08:00 -0700 Subject: [PATCH 026/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 2f1ee6601b..5b5152a438 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -13,12 +13,12 @@ jobs: uses: actions/checkout@v2 - name: Get PR branch - uses: xt0rted/pull-request-comment-branch@v1 - id: comment-branch + uses: xt0rted/pull-request-comment-branch@v1 + id: comment-branch - name: Set branch name - run: echo "BRANCH_NAME=${{ steps.comment-branch.outputs.head_ref }}" >> $GITHUB_ENV + run: echo "BRANCH_NAME=${{ steps.comment-branch.outputs.head_ref }}" >> $GITHUB_ENV - id: 'auth' name: Authenticating @@ -41,4 +41,4 @@ jobs: --project=nullway-jmh \ --zone=us-central1-a \ root@instance-1 \ - --command=" export BRANCH_NAME=${BRANCH_NAME} && echo BRANCH_NAME && git clone git@github.com:armughan11/NullAway.git && cd NullAway/ && ./gradlew jmh " + --command=" export BRANCH_NAME=${BRANCH_NAME} && echo $BRANCH_NAME && git clone git@github.com:armughan11/NullAway.git && cd NullAway/ && ./gradlew jmh " From d58429e72253694fd23faefaf710c572a2d17db8 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Sat, 6 May 2023 18:10:10 -0700 Subject: [PATCH 027/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 5b5152a438..31871567ef 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -13,12 +13,12 @@ jobs: uses: actions/checkout@v2 - name: Get PR branch - uses: xt0rted/pull-request-comment-branch@v1 - id: comment-branch + uses: xt0rted/pull-request-comment-branch@v1 + id: comment-branch - name: Set branch name - run: echo "BRANCH_NAME=${{ steps.comment-branch.outputs.head_ref }}" >> $GITHUB_ENV + run: echo "BRANCH_NAME=${{ steps.comment-branch.outputs.head_ref }}" >> $GITHUB_ENV - id: 'auth' name: Authenticating From 7ed8ec3e2488e948c7bad51fd879c05cb3f01883 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Sat, 6 May 2023 18:10:54 -0700 Subject: [PATCH 028/174] Branch Test #4 fixed indentation for PR comment acition --- test.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 test.py diff --git a/test.py b/test.py new file mode 100644 index 0000000000..87b2a7338a --- /dev/null +++ b/test.py @@ -0,0 +1 @@ +#This is a testfile for checking pull requests \ No newline at end of file From f3ced35deb09a58fc7d3c8548c7e569d0f7e064d Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Sat, 6 May 2023 18:11:30 -0700 Subject: [PATCH 029/174] Delete test.py --- test.py | 1 - 1 file changed, 1 deletion(-) delete mode 100644 test.py diff --git a/test.py b/test.py deleted file mode 100644 index 87b2a7338a..0000000000 --- a/test.py +++ /dev/null @@ -1 +0,0 @@ -#This is a testfile for checking pull requests \ No newline at end of file From 813b9b243917965450befe0ff69e8fe843ea3e70 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Mon, 8 May 2023 17:56:57 -0700 Subject: [PATCH 030/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 31871567ef..704c610d42 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -41,4 +41,4 @@ jobs: --project=nullway-jmh \ --zone=us-central1-a \ root@instance-1 \ - --command=" export BRANCH_NAME=${BRANCH_NAME} && echo $BRANCH_NAME && git clone git@github.com:armughan11/NullAway.git && cd NullAway/ && ./gradlew jmh " + --command=" export BRANCH_NAME=${BRANCH_NAME} && echo $BRANCH_NAME && git clone --branch $BRANCH_NAME --single-branch git@github.com:armughan11/NullAway.git && cd NullAway/ && ./gradlew jmh " From 5ff6fe3f203f50f59e79a308235deccaee3a8008 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 17:10:16 -0700 Subject: [PATCH 031/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 704c610d42..d1a34929d0 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -35,6 +35,24 @@ jobs: gcloud version gcloud auth list + - name: Copy exported text file from Google Cloud Compute Engine + run: | + gcloud compute scp instance-1:exported_text.txt ./exported_text.txt --zone us-central1-a + + - name: Post exported text as a PR comment + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + pr_number=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }') + comment_body="**Exported Text:**\n\`\`\`\n$(cat exported_text.txt)\n\`\`\`" + api_url="https://api.github.com/repos/${{ github.repository }}/issues/${pr_number}/comments" + + curl -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: token ${GITHUB_TOKEN}" \ + -d "{\"body\": \"$comment_body\"}" \ + "$api_url" + - name: Run JMH benchmarks on Compute Engine run: | gcloud compute ssh \ From 3615ccf4237798cb86c2cfdea3a55f43019f34db Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 17:11:01 -0700 Subject: [PATCH 032/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index d1a34929d0..9bf72fb152 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -37,7 +37,7 @@ jobs: - name: Copy exported text file from Google Cloud Compute Engine run: | - gcloud compute scp instance-1:exported_text.txt ./exported_text.txt --zone us-central1-a + gcloud compute scp instance-1:1.txt ./exported_text.txt --zone us-central1-a - name: Post exported text as a PR comment env: From 5e15f523535b9f7f913cb5068e3c5c124f5f70e3 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 17:13:18 -0700 Subject: [PATCH 033/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 9bf72fb152..5ddee80d4b 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -37,7 +37,7 @@ jobs: - name: Copy exported text file from Google Cloud Compute Engine run: | - gcloud compute scp instance-1:1.txt ./exported_text.txt --zone us-central1-a + gcloud compute scp root@instance-1:1.txt ./exported_text.txt --zone us-central1-a - name: Post exported text as a PR comment env: From f3720f0be5d845f903894d8fe18f467450eae736 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 17:13:31 -0700 Subject: [PATCH 034/174] Add files via upload --- test.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 test.py diff --git a/test.py b/test.py new file mode 100644 index 0000000000..87b2a7338a --- /dev/null +++ b/test.py @@ -0,0 +1 @@ +#This is a testfile for checking pull requests \ No newline at end of file From 82590a72260d0d1125a74fa0af0897e5ecd7fdea Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 17:13:53 -0700 Subject: [PATCH 035/174] Delete test.py --- test.py | 1 - 1 file changed, 1 deletion(-) delete mode 100644 test.py diff --git a/test.py b/test.py deleted file mode 100644 index 87b2a7338a..0000000000 --- a/test.py +++ /dev/null @@ -1 +0,0 @@ -#This is a testfile for checking pull requests \ No newline at end of file From eccf9db14608b458dda3136e114379e2d5ec6fbf Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 17:18:59 -0700 Subject: [PATCH 036/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 5ddee80d4b..95a8f3abfe 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -7,6 +7,7 @@ on: jobs: benchmark: runs-on: ubuntu-latest + permissions: write-all steps: - name: Checkout repository From 652821ca61d5be3b8591d7292b326e0fae1d5eb5 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 17:19:10 -0700 Subject: [PATCH 037/174] dsadas --- test.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 test.py diff --git a/test.py b/test.py new file mode 100644 index 0000000000..87b2a7338a --- /dev/null +++ b/test.py @@ -0,0 +1 @@ +#This is a testfile for checking pull requests \ No newline at end of file From 358b2a12a26565b8e3025543e4cceb866d60fd53 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 17:28:19 -0700 Subject: [PATCH 038/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 95a8f3abfe..83e0dd1c82 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -38,7 +38,7 @@ jobs: - name: Copy exported text file from Google Cloud Compute Engine run: | - gcloud compute scp root@instance-1:1.txt ./exported_text.txt --zone us-central1-a + gcloud compute scp root@instance-1:/hi/1.txt ./exported_text.txt --zone us-central1-a - name: Post exported text as a PR comment env: From 21b0796808eb139c3aabc44ba77e5aaa257090f0 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 17:30:21 -0700 Subject: [PATCH 039/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 83e0dd1c82..b394e0c50e 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -38,7 +38,7 @@ jobs: - name: Copy exported text file from Google Cloud Compute Engine run: | - gcloud compute scp root@instance-1:/hi/1.txt ./exported_text.txt --zone us-central1-a + gcloud compute scp root@instance-1:hi/1.txt ./exported_text.txt --zone us-central1-a - name: Post exported text as a PR comment env: From 0609fd7e76e8866413a8fdc5a1315da199985dea Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 17:33:10 -0700 Subject: [PATCH 040/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index b394e0c50e..13e0623153 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -38,7 +38,7 @@ jobs: - name: Copy exported text file from Google Cloud Compute Engine run: | - gcloud compute scp root@instance-1:hi/1.txt ./exported_text.txt --zone us-central1-a + gcloud compute scp root@instance-1:hi///1.txt ./exported_text.txt --zone us-central1-a - name: Post exported text as a PR comment env: From 1bdc0134bbe5ebdf49630398ea338aad0bdb9832 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 17:45:47 -0700 Subject: [PATCH 041/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 13e0623153..281521066b 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -39,6 +39,12 @@ jobs: - name: Copy exported text file from Google Cloud Compute Engine run: | gcloud compute scp root@instance-1:hi///1.txt ./exported_text.txt --zone us-central1-a + - name: comment PR + uses: machine-learning-apps/pr-comment@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + path: exported_text.txt - name: Post exported text as a PR comment env: From 90dde3c50c78039ffb5695c074047ed02a4c2b6d Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 17:52:43 -0700 Subject: [PATCH 042/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 281521066b..0e9eb2fa37 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -45,13 +45,20 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: path: exported_text.txt + + - name: Install jq + run: sudo apt-get install jq + - name: Set exported text as an environment variable + run: | + escaped_text=$(jq -Rs . < exported_text.txt) + echo "exported_text=${escaped_text}" >> $GITHUB_ENV - name: Post exported text as a PR comment env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | pr_number=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }') - comment_body="**Exported Text:**\n\`\`\`\n$(cat exported_text.txt)\n\`\`\`" + comment_body="**Exported Text:**\n\`\`\`\n$(exported_text)\n\`\`\`" api_url="https://api.github.com/repos/${{ github.repository }}/issues/${pr_number}/comments" curl -X POST \ From 9fcbb536d63568853ec55dc36c9325292c831e6a Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 17:56:48 -0700 Subject: [PATCH 043/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 0e9eb2fa37..aae6cdfbc8 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -39,12 +39,7 @@ jobs: - name: Copy exported text file from Google Cloud Compute Engine run: | gcloud compute scp root@instance-1:hi///1.txt ./exported_text.txt --zone us-central1-a - - name: comment PR - uses: machine-learning-apps/pr-comment@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - path: exported_text.txt + - name: Install jq run: sudo apt-get install jq @@ -58,7 +53,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | pr_number=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }') - comment_body="**Exported Text:**\n\`\`\`\n$(exported_text)\n\`\`\`" + comment_body="**Exported Text:**\n\`\`\`\n$(escaped_text)\n\`\`\`" api_url="https://api.github.com/repos/${{ github.repository }}/issues/${pr_number}/comments" curl -X POST \ From e78df0b7b28db085512e3a73b29fbd4b9b22389f Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 18:00:39 -0700 Subject: [PATCH 044/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index aae6cdfbc8..6cb012ec88 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -51,9 +51,10 @@ jobs: - name: Post exported text as a PR comment env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + EXPORTED_TEXT: ${{ env.exported_text }} run: | pr_number=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }') - comment_body="**Exported Text:**\n\`\`\`\n$(escaped_text)\n\`\`\`" + comment_body="**Exported Text:**\n\`\`\`\n${EXPORTED_TEXT}\n\`\`\`" api_url="https://api.github.com/repos/${{ github.repository }}/issues/${pr_number}/comments" curl -X POST \ @@ -62,6 +63,7 @@ jobs: -d "{\"body\": \"$comment_body\"}" \ "$api_url" + - name: Run JMH benchmarks on Compute Engine run: | gcloud compute ssh \ From a9b007c0794bb2df18e80da212aeebb16eef9116 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 18:25:27 -0700 Subject: [PATCH 045/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 6cb012ec88..78a1472745 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -55,15 +55,17 @@ jobs: run: | pr_number=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }') comment_body="**Exported Text:**\n\`\`\`\n${EXPORTED_TEXT}\n\`\`\`" + json_payload=$(jq -n --arg body "$comment_body" '{"body": $body}') api_url="https://api.github.com/repos/${{ github.repository }}/issues/${pr_number}/comments" curl -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: token ${GITHUB_TOKEN}" \ - -d "{\"body\": \"$comment_body\"}" \ + -d "$json_payload" \ "$api_url" + - name: Run JMH benchmarks on Compute Engine run: | gcloud compute ssh \ From a1173ab22cc834c33c3ff0102c599b7657399e72 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 18:34:30 -0700 Subject: [PATCH 046/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 78a1472745..6c780eaea1 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -63,7 +63,13 @@ jobs: -H "Authorization: token ${GITHUB_TOKEN}" \ -d "$json_payload" \ "$api_url" - + - name: Comment 2 + uses: mshick/add-pr-comment@v2 + if: always() + with: + message-path: | + exported_text.txt + - name: Run JMH benchmarks on Compute Engine From 770a938611925e8f107abeb6e6d215a8440aad4d Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 18:38:33 -0700 Subject: [PATCH 047/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 6c780eaea1..27438ddb75 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -67,8 +67,10 @@ jobs: uses: mshick/add-pr-comment@v2 if: always() with: - message-path: | - exported_text.txt + preformatted: | + exported_text.txt + + From d101171540a0f5f84147c081725eedac7ce27a1c Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 18:39:02 -0700 Subject: [PATCH 048/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 27438ddb75..284cd4142b 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -40,29 +40,7 @@ jobs: run: | gcloud compute scp root@instance-1:hi///1.txt ./exported_text.txt --zone us-central1-a - - - name: Install jq - run: sudo apt-get install jq - - name: Set exported text as an environment variable - run: | - escaped_text=$(jq -Rs . < exported_text.txt) - echo "exported_text=${escaped_text}" >> $GITHUB_ENV - - - name: Post exported text as a PR comment - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - EXPORTED_TEXT: ${{ env.exported_text }} - run: | - pr_number=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }') - comment_body="**Exported Text:**\n\`\`\`\n${EXPORTED_TEXT}\n\`\`\`" - json_payload=$(jq -n --arg body "$comment_body" '{"body": $body}') - api_url="https://api.github.com/repos/${{ github.repository }}/issues/${pr_number}/comments" - - curl -X POST \ - -H "Accept: application/vnd.github+json" \ - -H "Authorization: token ${GITHUB_TOKEN}" \ - -d "$json_payload" \ - "$api_url" + - name: Comment 2 uses: mshick/add-pr-comment@v2 if: always() From 72343110961e53324d9b1fd2a697c11d7114ad9e Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 18:43:52 -0700 Subject: [PATCH 049/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 284cd4142b..1b6edc53b6 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -38,19 +38,15 @@ jobs: - name: Copy exported text file from Google Cloud Compute Engine run: | - gcloud compute scp root@instance-1:hi///1.txt ./exported_text.txt --zone us-central1-a + gcloud compute scp root@instance-1:hi/1.txt ./exported_text.txt --zone us-central1-a - name: Comment 2 uses: mshick/add-pr-comment@v2 if: always() with: - preformatted: | + message-path: | exported_text.txt - - - - - name: Run JMH benchmarks on Compute Engine run: | From 517d3b475303fde3a58f823b7a4bd30c95719ab8 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 18:44:18 -0700 Subject: [PATCH 050/174] Add files via upload From 4164312f94d0068efee34b06c4eca96a7adf00d6 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 18:50:36 -0700 Subject: [PATCH 051/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 1b6edc53b6..a9b4ba51b9 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -39,14 +39,16 @@ jobs: - name: Copy exported text file from Google Cloud Compute Engine run: | gcloud compute scp root@instance-1:hi/1.txt ./exported_text.txt --zone us-central1-a - + - name: Set exported text as an environment variable + run: | + echo "exported_text=$(cat exported_text.txt)" >> $GITHUB_ENV + - name: Comment 2 uses: mshick/add-pr-comment@v2 if: always() with: - message-path: | - exported_text.txt + message: ${exported_text} - name: Run JMH benchmarks on Compute Engine run: | From 5b549881639e2c508c96bcee5d6747b89f353f87 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 18:50:52 -0700 Subject: [PATCH 052/174] Add files via upload From c86f3543cc0019e876be0b916fe43308cd71cc4d Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 18:51:06 -0700 Subject: [PATCH 053/174] Add files via upload From 3d1d4b085b40529d71ef9b5de235e0dbf6231f00 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 18:58:03 -0700 Subject: [PATCH 054/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index a9b4ba51b9..263820308d 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -47,8 +47,10 @@ jobs: - name: Comment 2 uses: mshick/add-pr-comment@v2 if: always() + env: + MAIN: ${{ env.exported_text }} with: - message: ${exported_text} + preformatted: ${{ env.MAIN }} - name: Run JMH benchmarks on Compute Engine run: | From 998bf7a89142cc1b1a075f0377ffda56962dd52b Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 19:05:59 -0700 Subject: [PATCH 055/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 263820308d..8a33b86f53 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -39,18 +39,19 @@ jobs: - name: Copy exported text file from Google Cloud Compute Engine run: | gcloud compute scp root@instance-1:hi/1.txt ./exported_text.txt --zone us-central1-a - - name: Set exported text as an environment variable + + + - name: Read file content + id: read_file run: | - echo "exported_text=$(cat exported_text.txt)" >> $GITHUB_ENV + file_content=$(cat your_file.txt) + echo "::set-output name=file_content::$file_content" - - name: Comment 2 uses: mshick/add-pr-comment@v2 if: always() - env: - MAIN: ${{ env.exported_text }} with: - preformatted: ${{ env.MAIN }} + preformatted: ${{ steps.read_file.outputs.file_content }} - name: Run JMH benchmarks on Compute Engine run: | From f6a37531ef940f34c8c770710d6e3834f73f0f86 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 19:07:31 -0700 Subject: [PATCH 056/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 8a33b86f53..7c636cf1af 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -44,7 +44,7 @@ jobs: - name: Read file content id: read_file run: | - file_content=$(cat your_file.txt) + file_content=$(cat exported_text.txt) echo "::set-output name=file_content::$file_content" - name: Comment 2 From e9cb3c634ab38360815b600155bd4bd37a0219ed Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 19:22:45 -0700 Subject: [PATCH 057/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 7c636cf1af..65774c6476 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -40,18 +40,14 @@ jobs: run: | gcloud compute scp root@instance-1:hi/1.txt ./exported_text.txt --zone us-central1-a - - - name: Read file content - id: read_file - run: | - file_content=$(cat exported_text.txt) - echo "::set-output name=file_content::$file_content" - - name: Comment 2 uses: mshick/add-pr-comment@v2 if: always() with: - preformatted: ${{ steps.read_file.outputs.file_content }} + message: Main Benchmark + + + message-path: exported_text.txt - name: Run JMH benchmarks on Compute Engine run: | From 712c96f3d986f07813d9cf9fbbf4173b3094fa7b Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 19:23:11 -0700 Subject: [PATCH 058/174] Add files via upload From 5125f9f5ee756e0c1adccd9d6d917c2678549bab Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 19:28:23 -0700 Subject: [PATCH 059/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 65774c6476..6233346cf1 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -39,15 +39,17 @@ jobs: - name: Copy exported text file from Google Cloud Compute Engine run: | gcloud compute scp root@instance-1:hi/1.txt ./exported_text.txt --zone us-central1-a + + - name: Identifier + run: | + (echo 'Main Benchmark: + ' | cat exported_text.txt) > main.txt - name: Comment 2 uses: mshick/add-pr-comment@v2 if: always() - with: - message: Main Benchmark - - - message-path: exported_text.txt + with: + message-path: main.txt - name: Run JMH benchmarks on Compute Engine run: | From 35c9fde42667a6a48e363fcaf01fef4f102ef6c9 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 19:40:56 -0700 Subject: [PATCH 060/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 6233346cf1..eb5b9c302f 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -43,7 +43,7 @@ jobs: - name: Identifier run: | (echo 'Main Benchmark: - ' | cat exported_text.txt) > main.txt + ' ; cat exported_text.txt) > main.txt - name: Comment 2 uses: mshick/add-pr-comment@v2 From 21a79638b40f053590e65a9509ccc6c1ba765eeb Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 19:41:15 -0700 Subject: [PATCH 061/174] Add files via upload From 7abaf9b05f82f8f37490147cc381b2d9bc256cd1 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 10 May 2023 19:53:23 -0700 Subject: [PATCH 062/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 30 ++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index eb5b9c302f..d735b0f945 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -31,14 +31,18 @@ jobs: uses: google-github-actions/setup-gcloud@v1 - - name: Check gcloud version and authentication + + - name: Run JMH benchmarks on Compute Engine run: | - gcloud version - gcloud auth list - + gcloud compute ssh \ + --project=nullway-jmh \ + --zone=us-central1-a \ + root@instance-1 \ + --command=" export BRANCH_NAME=${BRANCH_NAME} && echo $BRANCH_NAME && mkdir main && cd main && git clone --branch $BRANCH_NAME --single-branch git@github.com:armughan11/NullAway.git && cd NullAway/ && ./gradlew jmh " + - name: Copy exported text file from Google Cloud Compute Engine run: | - gcloud compute scp root@instance-1:hi/1.txt ./exported_text.txt --zone us-central1-a + gcloud compute scp root@instance-1:main/NullAway/jmh/build/results/jmh/results.txt ./exported_text.txt --zone us-central1-a - name: Identifier run: | @@ -49,12 +53,12 @@ jobs: uses: mshick/add-pr-comment@v2 if: always() with: - message-path: main.txt - - - name: Run JMH benchmarks on Compute Engine + message-path: main.txt + - name: Cleanup run: | - gcloud compute ssh \ - --project=nullway-jmh \ - --zone=us-central1-a \ - root@instance-1 \ - --command=" export BRANCH_NAME=${BRANCH_NAME} && echo $BRANCH_NAME && git clone --branch $BRANCH_NAME --single-branch git@github.com:armughan11/NullAway.git && cd NullAway/ && ./gradlew jmh " + gcloud compute ssh \ + --project=nullway-jmh \ + --zone=us-central1-a \ + root@instance-1 \ + --command=" rm -r -f main" + From 69f45d3ae1c651190255107fef43a95da7d924ca Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 26 May 2023 19:08:03 -0700 Subject: [PATCH 063/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index d735b0f945..605ae23e67 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -54,11 +54,5 @@ jobs: if: always() with: message-path: main.txt - - name: Cleanup - run: | - gcloud compute ssh \ - --project=nullway-jmh \ - --zone=us-central1-a \ - root@instance-1 \ - --command=" rm -r -f main" + From 2acc459f8318ad4e7408ac51a15c86c3f65420c7 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 26 May 2023 19:11:35 -0700 Subject: [PATCH 064/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 605ae23e67..c7bf1f6e9c 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -46,8 +46,8 @@ jobs: - name: Identifier run: | - (echo 'Main Benchmark: - ' ; cat exported_text.txt) > main.txt + (echo '```Main Benchmark: + ' ; cat exported_text.txt; '```') > main.txt - name: Comment 2 uses: mshick/add-pr-comment@v2 From 319ae4c23c537bafbc4f6a4c671f144234137410 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 26 May 2023 20:13:31 -0700 Subject: [PATCH 065/174] Create comment.yml --- .github/workflows/comment.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/comment.yml diff --git a/.github/workflows/comment.yml b/.github/workflows/comment.yml new file mode 100644 index 0000000000..1e19119b67 --- /dev/null +++ b/.github/workflows/comment.yml @@ -0,0 +1,27 @@ +name: Comment test + +on: + pull_request: + + +jobs: + comment: + runs-on: ubuntu-latest + permissions: write-all + + steps: + + - name: Copy exported text file from Google Cloud Compute Engine + run: | + gcloud compute scp root@instance-1:main/NullAway/jmh/build/results/jmh/results.txt ./exported_text.txt --zone us-central1-a + + - name: Identifier + run: | + (echo '```Main Benchmark: + ' ; cat exported_text.txt; echo '```') > main.txt + + - name: Comment 2 + uses: mshick/add-pr-comment@v2 + if: always() + with: + message-path: main.txt From da7fa8d16ff0fa3963a11f203fcb96ac43563ec2 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 26 May 2023 20:14:55 -0700 Subject: [PATCH 066/174] Delete comment.yml --- .github/workflows/comment.yml | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 .github/workflows/comment.yml diff --git a/.github/workflows/comment.yml b/.github/workflows/comment.yml deleted file mode 100644 index 1e19119b67..0000000000 --- a/.github/workflows/comment.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Comment test - -on: - pull_request: - - -jobs: - comment: - runs-on: ubuntu-latest - permissions: write-all - - steps: - - - name: Copy exported text file from Google Cloud Compute Engine - run: | - gcloud compute scp root@instance-1:main/NullAway/jmh/build/results/jmh/results.txt ./exported_text.txt --zone us-central1-a - - - name: Identifier - run: | - (echo '```Main Benchmark: - ' ; cat exported_text.txt; echo '```') > main.txt - - - name: Comment 2 - uses: mshick/add-pr-comment@v2 - if: always() - with: - message-path: main.txt From 12903745f4cd157a722a456195b94ed83dbc0b97 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 26 May 2023 20:15:31 -0700 Subject: [PATCH 067/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index c7bf1f6e9c..437f1c5295 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -30,6 +30,21 @@ jobs: - name: Set up Google Cloud SDK uses: google-github-actions/setup-gcloud@v1 + + - name: Copy exported text file from Google Cloud Compute Engine + run: | + gcloud compute scp root@instance-1:main/NullAway/jmh/build/results/jmh/results.txt ./exported_text.txt --zone us-central1-a + + - name: Identifier + run: | + (echo '```Main Benchmark: + ' ; cat exported_text.txt; '```') > main.txt + + - name: Comment 2 + uses: mshick/add-pr-comment@v2 + if: always() + with: + message-path: main.txt - name: Run JMH benchmarks on Compute Engine From 0c95cb5aa67695825e6ab80b5139615b8d0e2c19 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 26 May 2023 20:17:40 -0700 Subject: [PATCH 068/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 437f1c5295..971c402b6a 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -38,7 +38,7 @@ jobs: - name: Identifier run: | (echo '```Main Benchmark: - ' ; cat exported_text.txt; '```') > main.txt + ' ; cat exported_text.txt; echo '```') > main.txt - name: Comment 2 uses: mshick/add-pr-comment@v2 From 84c84c6f3ebe8a2ebed486c65c71c68d8a8dd129 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 26 May 2023 20:20:38 -0700 Subject: [PATCH 069/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 971c402b6a..152a318045 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -61,7 +61,8 @@ jobs: - name: Identifier run: | - (echo '```Main Benchmark: + (echo'Main Benchmark: + '; echo '``` ' ; cat exported_text.txt; '```') > main.txt - name: Comment 2 From b12ff25e80c8add85e1e06db3cde563f986d8aeb Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 26 May 2023 20:26:26 -0700 Subject: [PATCH 070/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 152a318045..3395c44a21 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -61,9 +61,9 @@ jobs: - name: Identifier run: | - (echo'Main Benchmark: + (echo 'Main Benchmark: '; echo '``` - ' ; cat exported_text.txt; '```') > main.txt + ' ; cat exported_text.txt; echo '```') > main.txt - name: Comment 2 uses: mshick/add-pr-comment@v2 From 162a88f2280d184b55484da3946b1dd043bff72d Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 26 May 2023 20:31:14 -0700 Subject: [PATCH 071/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 3395c44a21..481e548257 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -61,8 +61,7 @@ jobs: - name: Identifier run: | - (echo 'Main Benchmark: - '; echo '``` + (echo '``` Main: ' ; cat exported_text.txt; echo '```') > main.txt - name: Comment 2 From b8aec1e317901002f81376204b1844518a257b94 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 26 May 2023 20:33:22 -0700 Subject: [PATCH 072/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 481e548257..5fcd12c18d 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -62,7 +62,7 @@ jobs: - name: Identifier run: | (echo '``` Main: - ' ; cat exported_text.txt; echo '```') > main.txt + ' ; cat exported_text.txt) > main.txt - name: Comment 2 uses: mshick/add-pr-comment@v2 From c70309e5c46ae80f1f6130ac14baa32fc149920d Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 26 May 2023 20:35:22 -0700 Subject: [PATCH 073/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 5fcd12c18d..f9ff0bd39b 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -61,7 +61,7 @@ jobs: - name: Identifier run: | - (echo '``` Main: + (echo ' Main: ' ; cat exported_text.txt) > main.txt - name: Comment 2 From 3a2f46dd2806fc7ae9115ebb32aa239456b6e8b8 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 26 May 2023 20:39:46 -0700 Subject: [PATCH 074/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index f9ff0bd39b..7989c21a4a 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -37,8 +37,7 @@ jobs: - name: Identifier run: | - (echo '```Main Benchmark: - ' ; cat exported_text.txt; echo '```') > main.txt + (echo 'Main Benchmark: ' ; cat exported_text.txt; echo '```') > main.txt - name: Comment 2 uses: mshick/add-pr-comment@v2 From db5142a9bd05c14d977b28718f644737605f410a Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 26 May 2023 20:42:20 -0700 Subject: [PATCH 075/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 7989c21a4a..59b12dfce1 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -37,7 +37,7 @@ jobs: - name: Identifier run: | - (echo 'Main Benchmark: ' ; cat exported_text.txt; echo '```') > main.txt + (echo 'Main Benchmark: ```' ; cat exported_text.txt) > main.txt - name: Comment 2 uses: mshick/add-pr-comment@v2 From d259743f0da487571c6a18b8e05539230d563b07 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 26 May 2023 20:44:46 -0700 Subject: [PATCH 076/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 59b12dfce1..109b540729 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -37,7 +37,7 @@ jobs: - name: Identifier run: | - (echo 'Main Benchmark: ```' ; cat exported_text.txt) > main.txt + (echo 'Main Benchmark:'; echo '```' ; cat exported_text.txt; echo '```') > main.txt - name: Comment 2 uses: mshick/add-pr-comment@v2 From f7152192c05d0814b32078ab31c6830c63ce0681 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 26 May 2023 20:44:56 -0700 Subject: [PATCH 077/174] Add files via upload --- test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.py b/test.py index 87b2a7338a..6d95fe97a1 100644 --- a/test.py +++ b/test.py @@ -1 +1 @@ -#This is a testfile for checking pull requests \ No newline at end of file +print("Hello world") \ No newline at end of file From f60a648af511effe73068be059c8ec68d717f773 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Mon, 29 May 2023 22:19:14 -0700 Subject: [PATCH 078/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 125 +++++++++++++++++++++++++--- 1 file changed, 115 insertions(+), 10 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 109b540729..b3941a573e 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -1,11 +1,13 @@ name: JMH Benchmark on: - pull_request: + issue_comment: + types: [created] jobs: - benchmark: + setup: + if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') runs-on: ubuntu-latest permissions: write-all @@ -18,6 +20,41 @@ jobs: id: comment-branch + - name: Set branch name + run: echo "BRANCH_NAME=${{ steps.comment-branch.outputs.head_ref }}" >> $GITHUB_ENV + + - id: 'auth' + name: Authenticating + uses: 'google-github-actions/auth@v1' + with: + credentials_json: '${{ secrets.GCP_SA_KEY }}' + + - name: Set up Google Cloud SDK + uses: google-github-actions/setup-gcloud@v1 + + - name: Run JMH benchmarks on Compute Engine + run: | + gcloud compute ssh \ + --project=nullway-jmh \ + --zone=us-central1-a \ + root@instance-1 \ + --command=" export BRANCH_NAME=${BRANCH_NAME} && mkdir $BRANCH_NAME " + + benchmark-pr: + needs: [setup] + runs-on: ubuntu-latest + permissions: write-all + + steps: + + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Get PR branch + uses: xt0rted/pull-request-comment-branch@v1 + id: comment-branch + + - name: Set branch name run: echo "BRANCH_NAME=${{ steps.comment-branch.outputs.head_ref }}" >> $GITHUB_ENV @@ -31,42 +68,110 @@ jobs: uses: google-github-actions/setup-gcloud@v1 + - name: Run JMH benchmarks on Compute Engine + run: | + gcloud compute ssh \ + --project=nullway-jmh \ + --zone=us-central1-a \ + root@instance-1 \ + --command=" export BRANCH_NAME=${BRANCH_NAME} && cd $BRANCH_NAME/ && mkdir pr && cd pr/ && git clone --branch $BRANCH_NAME --single-branch git@github.com:armughan11/NullAway.git && cd NullAway/ && ./gradlew jmh " + - name: Copy exported text file from Google Cloud Compute Engine run: | - gcloud compute scp root@instance-1:main/NullAway/jmh/build/results/jmh/results.txt ./exported_text.txt --zone us-central1-a + gcloud compute scp root@instance-1:main/NullAway/jmh/build/results/jmh/results.txt ./pr_text.txt --zone us-central1-a - name: Identifier run: | - (echo 'Main Benchmark:'; echo '```' ; cat exported_text.txt; echo '```') > main.txt + (echo 'PR Benchmark:'; echo '```' ; cat pr_text.txt; echo '```') > pr.txt - name: Comment 2 uses: mshick/add-pr-comment@v2 if: always() with: message-path: main.txt - + + benchmark-main: + needs: [setup] + runs-on: ubuntu-latest + permissions: write-all + + steps: + + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Get PR branch + uses: xt0rted/pull-request-comment-branch@v1 + id: comment-branch + + - name: Set branch name + run: echo "BRANCH_NAME=${{ steps.comment-branch.outputs.head_ref }}" >> $GITHUB_ENV + + - id: 'auth' + name: Authenticating + uses: 'google-github-actions/auth@v1' + with: + credentials_json: '${{ secrets.GCP_SA_KEY }}' + + - name: Set up Google Cloud SDK + uses: google-github-actions/setup-gcloud@v1 + + - name: Run JMH benchmarks on Compute Engine run: | gcloud compute ssh \ --project=nullway-jmh \ --zone=us-central1-a \ root@instance-1 \ - --command=" export BRANCH_NAME=${BRANCH_NAME} && echo $BRANCH_NAME && mkdir main && cd main && git clone --branch $BRANCH_NAME --single-branch git@github.com:armughan11/NullAway.git && cd NullAway/ && ./gradlew jmh " + --command=" export BRANCH_NAME=${BRANCH_NAME} && cd $BRANCH_NAME/ && mkdir main && cd main/ && git clone git@github.com:armughan11/NullAway.git && cd NullAway/ && ./gradlew jmh " - name: Copy exported text file from Google Cloud Compute Engine run: | - gcloud compute scp root@instance-1:main/NullAway/jmh/build/results/jmh/results.txt ./exported_text.txt --zone us-central1-a + gcloud compute scp root@instance-1:main/NullAway/jmh/build/results/jmh/results.txt ./main_text.txt --zone us-central1-a - name: Identifier run: | - (echo ' Main: - ' ; cat exported_text.txt) > main.txt + (echo 'Main Benchmark:'; echo '```' ; cat main_text.txt; echo '```') > main.txt - name: Comment 2 uses: mshick/add-pr-comment@v2 if: always() with: - message-path: main.txt + message-path: main.txt + cleanup: + needs: [benchmark-main,benchmark-pr] + runs-on: ubuntu-latest + permissions: write-all + + steps: + + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Get PR branch + uses: xt0rted/pull-request-comment-branch@v1 + id: comment-branch + + + - name: Set branch name + run: echo "BRANCH_NAME=${{ steps.comment-branch.outputs.head_ref }}" >> $GITHUB_ENV + + - id: 'auth' + name: Authenticating + uses: 'google-github-actions/auth@v1' + with: + credentials_json: '${{ secrets.GCP_SA_KEY }}' + + - name: Set up Google Cloud SDK + uses: google-github-actions/setup-gcloud@v1 + + - name: Cleanup + run: | + gcloud compute ssh \ + --project=nullway-jmh \ + --zone=us-central1-a \ + root@instance-1 \ + --command=" rm -r -f $BRANCH_NAME" From 2e6527925d0a7e2514560b0f617ace0c8a4cb57d Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Mon, 29 May 2023 23:18:48 -0700 Subject: [PATCH 079/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index b3941a573e..c9469e925e 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -78,7 +78,7 @@ jobs: - name: Copy exported text file from Google Cloud Compute Engine run: | - gcloud compute scp root@instance-1:main/NullAway/jmh/build/results/jmh/results.txt ./pr_text.txt --zone us-central1-a + gcloud compute scp root@instance-1: $BRANCH_NAME/pr/NullAway/jmh/build/results/jmh/results.txt ./pr_text.txt --zone us-central1-a - name: Identifier run: | @@ -128,7 +128,7 @@ jobs: - name: Copy exported text file from Google Cloud Compute Engine run: | - gcloud compute scp root@instance-1:main/NullAway/jmh/build/results/jmh/results.txt ./main_text.txt --zone us-central1-a + gcloud compute scp root@instance-1:$BRANCH_NAME/main/NullAway/jmh/build/results/jmh/results.txt ./main_text.txt --zone us-central1-a - name: Identifier run: | From 72f59972108d5935183448a5d5779e6e8011fdfa Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Tue, 30 May 2023 01:09:20 -0700 Subject: [PATCH 080/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index c9469e925e..4a1504a3cc 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -78,7 +78,7 @@ jobs: - name: Copy exported text file from Google Cloud Compute Engine run: | - gcloud compute scp root@instance-1: $BRANCH_NAME/pr/NullAway/jmh/build/results/jmh/results.txt ./pr_text.txt --zone us-central1-a + gcloud compute scp root@instance-1:$BRANCH_NAME/pr/NullAway/jmh/build/results/jmh/results.txt ./pr_text.txt --zone us-central1-a - name: Identifier run: | From 500ec84506ee2c76e5820a8ca6899474be28c635 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Tue, 30 May 2023 02:12:31 -0700 Subject: [PATCH 081/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 4a1504a3cc..4fcd8a8a18 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -88,7 +88,7 @@ jobs: uses: mshick/add-pr-comment@v2 if: always() with: - message-path: main.txt + message-path: pr.txt benchmark-main: needs: [setup] From 410a576a4196b368201f2f0598a9daef89ecda50 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Tue, 30 May 2023 02:14:12 -0700 Subject: [PATCH 082/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 4fcd8a8a18..5e92aafede 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -32,6 +32,20 @@ jobs: - name: Set up Google Cloud SDK uses: google-github-actions/setup-gcloud@v1 + - name: Copy exported text file from Google Cloud Compute Engine + run: | + gcloud compute scp root@instance-1:$BRANCH_NAME/pr/NullAway/jmh/build/results/jmh/results.txt ./pr_text.txt --zone us-central1-a + + - name: Identifier + run: | + (echo 'PR Benchmark:'; echo '```' ; cat pr_text.txt; echo '```') > pr.txt + + - name: Comment 2 + uses: mshick/add-pr-comment@v2 + if: always() + with: + message-path: pr.txt + - name: Run JMH benchmarks on Compute Engine run: | gcloud compute ssh \ From 2e104d2e0bcf854ddccc47c781def431970e972f Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Tue, 30 May 2023 02:19:58 -0700 Subject: [PATCH 083/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 5e92aafede..7f753b0f1e 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -34,17 +34,18 @@ jobs: - name: Copy exported text file from Google Cloud Compute Engine run: | - gcloud compute scp root@instance-1:$BRANCH_NAME/pr/NullAway/jmh/build/results/jmh/results.txt ./pr_text.txt --zone us-central1-a + gcloud compute scp root@instance-1:$BRANCH_NAME/main/NullAway/jmh/build/results/jmh/results.txt ./pr_text.txt --zone us-central1-a - name: Identifier run: | - (echo 'PR Benchmark:'; echo '```' ; cat pr_text.txt; echo '```') > pr.txt + (echo 'Main Benchmark:'; echo '```' ; cat pr_text.txt; echo '```') > pr.txt - name: Comment 2 uses: mshick/add-pr-comment@v2 if: always() with: message-path: pr.txt + message-id: main - name: Run JMH benchmarks on Compute Engine run: | From 72b9375ef21a6e3f76adac29d90cc2322ce8d331 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Tue, 30 May 2023 02:24:36 -0700 Subject: [PATCH 084/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 7f753b0f1e..04226964ba 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -32,22 +32,8 @@ jobs: - name: Set up Google Cloud SDK uses: google-github-actions/setup-gcloud@v1 - - name: Copy exported text file from Google Cloud Compute Engine - run: | - gcloud compute scp root@instance-1:$BRANCH_NAME/main/NullAway/jmh/build/results/jmh/results.txt ./pr_text.txt --zone us-central1-a - - - name: Identifier - run: | - (echo 'Main Benchmark:'; echo '```' ; cat pr_text.txt; echo '```') > pr.txt - - - name: Comment 2 - uses: mshick/add-pr-comment@v2 - if: always() - with: - message-path: pr.txt - message-id: main - - name: Run JMH benchmarks on Compute Engine + - name: Setup Directory run: | gcloud compute ssh \ --project=nullway-jmh \ @@ -104,6 +90,7 @@ jobs: if: always() with: message-path: pr.txt + message-id: pr benchmark-main: needs: [setup] @@ -154,6 +141,7 @@ jobs: if: always() with: message-path: main.txt + message-id: main cleanup: needs: [benchmark-main,benchmark-pr] runs-on: ubuntu-latest From 52d73cb4fc9c4da1f4c8cc04a8cc395ffd855f94 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 31 May 2023 15:09:34 -0700 Subject: [PATCH 085/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 04226964ba..c4c295242e 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -23,11 +23,7 @@ jobs: - name: Set branch name run: echo "BRANCH_NAME=${{ steps.comment-branch.outputs.head_ref }}" >> $GITHUB_ENV - - id: 'auth' - name: Authenticating - uses: 'google-github-actions/auth@v1' - with: - credentials_json: '${{ secrets.GCP_SA_KEY }}' + - name: Set up Google Cloud SDK uses: google-github-actions/setup-gcloud@v1 From 14b84e758d00ad6751c8440f5f43ad661697fa37 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Thu, 1 Jun 2023 12:27:00 -0700 Subject: [PATCH 086/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index c4c295242e..04226964ba 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -23,7 +23,11 @@ jobs: - name: Set branch name run: echo "BRANCH_NAME=${{ steps.comment-branch.outputs.head_ref }}" >> $GITHUB_ENV - + - id: 'auth' + name: Authenticating + uses: 'google-github-actions/auth@v1' + with: + credentials_json: '${{ secrets.GCP_SA_KEY }}' - name: Set up Google Cloud SDK uses: google-github-actions/setup-gcloud@v1 From ee0b3edd5efe17b12bfd097454b2a22f695a13e6 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Mon, 5 Jun 2023 00:53:06 -0700 Subject: [PATCH 087/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 96 +++-------------------------- 1 file changed, 8 insertions(+), 88 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 04226964ba..0a6de6ef21 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -41,35 +41,8 @@ jobs: root@instance-1 \ --command=" export BRANCH_NAME=${BRANCH_NAME} && mkdir $BRANCH_NAME " - benchmark-pr: - needs: [setup] - runs-on: ubuntu-latest - permissions: write-all - steps: - - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Get PR branch - uses: xt0rted/pull-request-comment-branch@v1 - id: comment-branch - - - - name: Set branch name - run: echo "BRANCH_NAME=${{ steps.comment-branch.outputs.head_ref }}" >> $GITHUB_ENV - - - id: 'auth' - name: Authenticating - uses: 'google-github-actions/auth@v1' - with: - credentials_json: '${{ secrets.GCP_SA_KEY }}' - - - name: Set up Google Cloud SDK - uses: google-github-actions/setup-gcloud@v1 - - - - name: Run JMH benchmarks on Compute Engine + - name: Run JMH benchmarks for PR Branch run: | gcloud compute ssh \ --project=nullway-jmh \ @@ -77,50 +50,23 @@ jobs: root@instance-1 \ --command=" export BRANCH_NAME=${BRANCH_NAME} && cd $BRANCH_NAME/ && mkdir pr && cd pr/ && git clone --branch $BRANCH_NAME --single-branch git@github.com:armughan11/NullAway.git && cd NullAway/ && ./gradlew jmh " - - name: Copy exported text file from Google Cloud Compute Engine + - name: Copy exported PR benchmark file from Google Cloud Compute Engine run: | gcloud compute scp root@instance-1:$BRANCH_NAME/pr/NullAway/jmh/build/results/jmh/results.txt ./pr_text.txt --zone us-central1-a - - name: Identifier + - name: Formatting Benchmark run: | (echo 'PR Benchmark:'; echo '```' ; cat pr_text.txt; echo '```') > pr.txt - - name: Comment 2 + - name: Comment Benchmark uses: mshick/add-pr-comment@v2 if: always() with: message-path: pr.txt message-id: pr - - benchmark-main: - needs: [setup] - runs-on: ubuntu-latest - permissions: write-all - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Get PR branch - uses: xt0rted/pull-request-comment-branch@v1 - id: comment-branch - - - - name: Set branch name - run: echo "BRANCH_NAME=${{ steps.comment-branch.outputs.head_ref }}" >> $GITHUB_ENV - - - id: 'auth' - name: Authenticating - uses: 'google-github-actions/auth@v1' - with: - credentials_json: '${{ secrets.GCP_SA_KEY }}' - - - name: Set up Google Cloud SDK - uses: google-github-actions/setup-gcloud@v1 - - - - name: Run JMH benchmarks on Compute Engine + - name: Run JMH benchmarks for Main Branch run: | gcloud compute ssh \ --project=nullway-jmh \ @@ -128,46 +74,20 @@ jobs: root@instance-1 \ --command=" export BRANCH_NAME=${BRANCH_NAME} && cd $BRANCH_NAME/ && mkdir main && cd main/ && git clone git@github.com:armughan11/NullAway.git && cd NullAway/ && ./gradlew jmh " - - name: Copy exported text file from Google Cloud Compute Engine + - name: Copy exported Main Benchmark file from Google Cloud Compute Engine run: | gcloud compute scp root@instance-1:$BRANCH_NAME/main/NullAway/jmh/build/results/jmh/results.txt ./main_text.txt --zone us-central1-a - - name: Identifier + - name: Formatting Main Benchmark run: | (echo 'Main Benchmark:'; echo '```' ; cat main_text.txt; echo '```') > main.txt - - name: Comment 2 + - name: Comment Main Benchmark uses: mshick/add-pr-comment@v2 if: always() with: message-path: main.txt message-id: main - cleanup: - needs: [benchmark-main,benchmark-pr] - runs-on: ubuntu-latest - permissions: write-all - - steps: - - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Get PR branch - uses: xt0rted/pull-request-comment-branch@v1 - id: comment-branch - - - - name: Set branch name - run: echo "BRANCH_NAME=${{ steps.comment-branch.outputs.head_ref }}" >> $GITHUB_ENV - - - id: 'auth' - name: Authenticating - uses: 'google-github-actions/auth@v1' - with: - credentials_json: '${{ secrets.GCP_SA_KEY }}' - - - name: Set up Google Cloud SDK - uses: google-github-actions/setup-gcloud@v1 - name: Cleanup run: | From 27281891d6f819ab3d34afd0f7015543960eea27 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Thu, 15 Jun 2023 03:29:05 -0700 Subject: [PATCH 088/174] Create run_pr_benchmarks.sh --- .github/workflows/run_pr_benchmarks.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .github/workflows/run_pr_benchmarks.sh diff --git a/.github/workflows/run_pr_benchmarks.sh b/.github/workflows/run_pr_benchmarks.sh new file mode 100644 index 0000000000..3b454a72aa --- /dev/null +++ b/.github/workflows/run_pr_benchmarks.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +cd $BRANCH_NAME/ +mkdir pr +cd pr/ +git clone --branch $BRANCH_NAME --single-branch git@github.com:armughan11/NullAway.git +cd NullAway/ +./gradlew jmh From 00584661d2091cb8d47a6b5fedca0b4033a3172e Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Thu, 15 Jun 2023 03:30:11 -0700 Subject: [PATCH 089/174] Create run_main_benchmarks.sh --- .github/workflows/run_main_benchmarks.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .github/workflows/run_main_benchmarks.sh diff --git a/.github/workflows/run_main_benchmarks.sh b/.github/workflows/run_main_benchmarks.sh new file mode 100644 index 0000000000..03b0f3e74e --- /dev/null +++ b/.github/workflows/run_main_benchmarks.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +cd $BRANCH_NAME/ +mkdir main +cd main/ +git clone git@github.com:armughan11/NullAway.git +cd NullAway/ +./gradlew jmh From 0b9a86875300e5ddde1267e46703f5101a607378 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Thu, 15 Jun 2023 03:33:48 -0700 Subject: [PATCH 090/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 0a6de6ef21..33b33cf1cf 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -33,22 +33,23 @@ jobs: uses: google-github-actions/setup-gcloud@v1 - - name: Setup Directory + - name: Setup Directory and Copy Bash Scripts run: | gcloud compute ssh \ --project=nullway-jmh \ --zone=us-central1-a \ root@instance-1 \ - --command=" export BRANCH_NAME=${BRANCH_NAME} && mkdir $BRANCH_NAME " - - + --command="export BRANCH_NAME=${BRANCH_NAME} && mkdir $BRANCH_NAME" + gcloud compute scp ./github/workflows/run_pr_benchmarks.sh root@instance-1:$BRANCH_NAME/ --zone=us-central1-a + gcloud compute scp ./github/workflows/run_main_benchmarks.sh root@instance-1:$BRANCH_NAME/ --zone=us-central1-a + - name: Run JMH benchmarks for PR Branch run: | gcloud compute ssh \ --project=nullway-jmh \ --zone=us-central1-a \ root@instance-1 \ - --command=" export BRANCH_NAME=${BRANCH_NAME} && cd $BRANCH_NAME/ && mkdir pr && cd pr/ && git clone --branch $BRANCH_NAME --single-branch git@github.com:armughan11/NullAway.git && cd NullAway/ && ./gradlew jmh " + --command=" export BRANCH_NAME=${BRANCH_NAME} && chmod +x $BRANCH_NAME/run_pr_benchmarks.sh && $BRANCH_NAME/run_pr_benchmarks.sh" - name: Copy exported PR benchmark file from Google Cloud Compute Engine run: | @@ -72,7 +73,7 @@ jobs: --project=nullway-jmh \ --zone=us-central1-a \ root@instance-1 \ - --command=" export BRANCH_NAME=${BRANCH_NAME} && cd $BRANCH_NAME/ && mkdir main && cd main/ && git clone git@github.com:armughan11/NullAway.git && cd NullAway/ && ./gradlew jmh " + --command=" export BRANCH_NAME=${BRANCH_NAME} && chmod +x $BRANCH_NAME/run_main_benchmarks.sh && $BRANCH_NAME/run_main_benchmarks.sh " - name: Copy exported Main Benchmark file from Google Cloud Compute Engine run: | From a2b34ad5d102c5a67e03da09ed05a80ec702c475 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Thu, 15 Jun 2023 03:35:30 -0700 Subject: [PATCH 091/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 33b33cf1cf..4a7f2a0824 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -33,7 +33,7 @@ jobs: uses: google-github-actions/setup-gcloud@v1 - - name: Setup Directory and Copy Bash Scripts + - name: Setup Directory and Copy Bash Scripts run: | gcloud compute ssh \ --project=nullway-jmh \ From 9ea4bef77ab57ccb54027b6d3d43b72dc11c98ce Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Thu, 15 Jun 2023 03:38:19 -0700 Subject: [PATCH 092/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 4a7f2a0824..f87d493790 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -40,8 +40,8 @@ jobs: --zone=us-central1-a \ root@instance-1 \ --command="export BRANCH_NAME=${BRANCH_NAME} && mkdir $BRANCH_NAME" - gcloud compute scp ./github/workflows/run_pr_benchmarks.sh root@instance-1:$BRANCH_NAME/ --zone=us-central1-a - gcloud compute scp ./github/workflows/run_main_benchmarks.sh root@instance-1:$BRANCH_NAME/ --zone=us-central1-a + gcloud compute scp ./.github/workflows/run_pr_benchmarks.sh root@instance-1:$BRANCH_NAME/ --zone=us-central1-a + gcloud compute scp ./.github/workflows/run_main_benchmarks.sh root@instance-1:$BRANCH_NAME/ --zone=us-central1-a - name: Run JMH benchmarks for PR Branch run: | From 5578feb4c708838e872b21c7f3a3dd8b8f7cf4f4 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 16 Jun 2023 08:14:48 -0700 Subject: [PATCH 093/174] Delete test.py --- test.py | 1 - 1 file changed, 1 deletion(-) delete mode 100644 test.py diff --git a/test.py b/test.py deleted file mode 100644 index 6d95fe97a1..0000000000 --- a/test.py +++ /dev/null @@ -1 +0,0 @@ -print("Hello world") \ No newline at end of file From f6595d72de27387c0d65108a180a65578d607712 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Mon, 26 Jun 2023 09:35:13 -0500 Subject: [PATCH 094/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 74 +++-------------------------- 1 file changed, 7 insertions(+), 67 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index f87d493790..1044528fcd 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -1,4 +1,4 @@ -name: JMH Benchmark +name: Run JMH Benchmarks for Pull Request on: issue_comment: @@ -7,21 +7,17 @@ on: jobs: setup: - if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') + if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') && github.repository == 'uber/NullAway' runs-on: ubuntu-latest permissions: write-all steps: - name: Checkout repository - uses: actions/checkout@v2 - - - name: Get PR branch - uses: xt0rted/pull-request-comment-branch@v1 - id: comment-branch + uses: actions/checkout@v3 - name: Set branch name - run: echo "BRANCH_NAME=${{ steps.comment-branch.outputs.head_ref }}" >> $GITHUB_ENV + run: echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV - id: 'auth' name: Authenticating @@ -33,69 +29,13 @@ jobs: uses: google-github-actions/setup-gcloud@v1 - - name: Setup Directory and Copy Bash Scripts - run: | - gcloud compute ssh \ - --project=nullway-jmh \ - --zone=us-central1-a \ - root@instance-1 \ - --command="export BRANCH_NAME=${BRANCH_NAME} && mkdir $BRANCH_NAME" - gcloud compute scp ./.github/workflows/run_pr_benchmarks.sh root@instance-1:$BRANCH_NAME/ --zone=us-central1-a - gcloud compute scp ./.github/workflows/run_main_benchmarks.sh root@instance-1:$BRANCH_NAME/ --zone=us-central1-a - - - name: Run JMH benchmarks for PR Branch - run: | - gcloud compute ssh \ - --project=nullway-jmh \ - --zone=us-central1-a \ - root@instance-1 \ - --command=" export BRANCH_NAME=${BRANCH_NAME} && chmod +x $BRANCH_NAME/run_pr_benchmarks.sh && $BRANCH_NAME/run_pr_benchmarks.sh" - - - name: Copy exported PR benchmark file from Google Cloud Compute Engine - run: | - gcloud compute scp root@instance-1:$BRANCH_NAME/pr/NullAway/jmh/build/results/jmh/results.txt ./pr_text.txt --zone us-central1-a - - - name: Formatting Benchmark - run: | - (echo 'PR Benchmark:'; echo '```' ; cat pr_text.txt; echo '```') > pr.txt - - - name: Comment Benchmark - uses: mshick/add-pr-comment@v2 - if: always() - with: - message-path: pr.txt - message-id: pr - - - - name: Run JMH benchmarks for Main Branch - run: | - gcloud compute ssh \ - --project=nullway-jmh \ - --zone=us-central1-a \ - root@instance-1 \ - --command=" export BRANCH_NAME=${BRANCH_NAME} && chmod +x $BRANCH_NAME/run_main_benchmarks.sh && $BRANCH_NAME/run_main_benchmarks.sh " - - - name: Copy exported Main Benchmark file from Google Cloud Compute Engine - run: | - gcloud compute scp root@instance-1:$BRANCH_NAME/main/NullAway/jmh/build/results/jmh/results.txt ./main_text.txt --zone us-central1-a - - - name: Formatting Main Benchmark - run: | - (echo 'Main Benchmark:'; echo '```' ; cat main_text.txt; echo '```') > main.txt - - - name: Comment Main Benchmark - uses: mshick/add-pr-comment@v2 - if: always() - with: - message-path: main.txt - message-id: main - - - name: Cleanup + - name: Run benchmarks and cleanup run: | + gcloud compute scp ./.github/workflows/run_benchmarks.sh root@instance-1:/tmp --zone=us-central1-a gcloud compute ssh \ --project=nullway-jmh \ --zone=us-central1-a \ root@instance-1 \ - --command=" rm -r -f $BRANCH_NAME" + --command="bash /tmp/run_benchmarks.sh ${BRANCH_NAME}" From 2b9e3377d86c9b34d1485c7907879f7f20194875 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Mon, 26 Jun 2023 09:37:53 -0500 Subject: [PATCH 095/174] Create run_benchmarks.sh --- .github/workflows/run_benchmarks.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/run_benchmarks.sh diff --git a/.github/workflows/run_benchmarks.sh b/.github/workflows/run_benchmarks.sh new file mode 100644 index 0000000000..35882b7257 --- /dev/null +++ b/.github/workflows/run_benchmarks.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +BRANCH_NAME=$1 + +# Setup Directory and Copy Bash Scripts +mkdir $BRANCH_NAME +scp ./.github/workflows/run_pr_benchmarks.sh root@instance-1:$BRANCH_NAME/ +scp ./.github/workflows/run_main_benchmarks.sh root@instance-1:$BRANCH_NAME/ + +# Run JMH benchmarks for PR Branch +chmod +x $BRANCH_NAME/run_pr_benchmarks.sh +$BRANCH_NAME/run_pr_benchmarks.sh + +# Copy exported PR benchmark file from Google Cloud Compute Engine +scp root@instance-1:$BRANCH_NAME/pr/NullAway/jmh/build/results/jmh/results.txt ./pr_text.txt + +# Run JMH benchmarks for Main Branch +chmod +x $BRANCH_NAME/run_main_benchmarks.sh +$BRANCH_NAME/run_main_benchmarks.sh + +# Copy exported Main Benchmark file from Google Cloud Compute Engine +scp root@instance-1:$BRANCH_NAME/main/NullAway/jmh/build/results/jmh/results.txt ./main_text.txt + +# Cleanup +rm -r -f $BRANCH_NAME + +# Remove this script +rm -- "$0" From 1d890a68daaf4ce43cca7cd29a52048c803cf926 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Mon, 26 Jun 2023 09:38:59 -0500 Subject: [PATCH 096/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 1044528fcd..46518cc37f 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -7,7 +7,7 @@ on: jobs: setup: - if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') && github.repository == 'uber/NullAway' + if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') runs-on: ubuntu-latest permissions: write-all From 827471cac8550a3c5e427efedff3f5e61bd39856 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Mon, 26 Jun 2023 09:42:51 -0500 Subject: [PATCH 097/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 46518cc37f..f1cd3b8bff 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -10,14 +10,15 @@ jobs: if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') runs-on: ubuntu-latest permissions: write-all + env: + BRANCH_NAME: ${{ github.head_ref }} steps: - name: Checkout repository uses: actions/checkout@v3 - - name: Set branch name - run: echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV + - id: 'auth' name: Authenticating From 69b170657e16a07109baaec8806d67a193de3069 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Mon, 26 Jun 2023 09:49:35 -0500 Subject: [PATCH 098/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index f1cd3b8bff..a6bd3712a8 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest permissions: write-all env: - BRANCH_NAME: ${{ github.head_ref }} + BRANCH_NAME: ${{ github.event.issue.title }} steps: - name: Checkout repository From 1ccaaeefe34b6ad41aa2108466176ad97ec7e389 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Mon, 26 Jun 2023 09:54:38 -0500 Subject: [PATCH 099/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index a6bd3712a8..2d00561a30 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -10,15 +10,20 @@ jobs: if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') runs-on: ubuntu-latest permissions: write-all - env: - BRANCH_NAME: ${{ github.event.issue.title }} + steps: - name: Checkout repository uses: actions/checkout@v3 + - name: Get PR branch + uses: xt0rted/pull-request-comment-branch@v1 + id: comment-branch + - name: Set branch name + run: echo "BRANCH_NAME=${{ steps.comment-branch.outputs.head_ref }}" >> $GITHUB_ENV + - id: 'auth' name: Authenticating From f35a679f06d847f2bae3eeaede663ad584405d1e Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Mon, 26 Jun 2023 10:07:45 -0500 Subject: [PATCH 100/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 70 +++++++++++++++++++++++++---- 1 file changed, 62 insertions(+), 8 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 2d00561a30..f87d493790 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -1,4 +1,4 @@ -name: Run JMH Benchmarks for Pull Request +name: JMH Benchmark on: issue_comment: @@ -7,14 +7,13 @@ on: jobs: setup: - if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') + if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') runs-on: ubuntu-latest permissions: write-all - steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v2 - name: Get PR branch uses: xt0rted/pull-request-comment-branch@v1 @@ -23,7 +22,6 @@ jobs: - name: Set branch name run: echo "BRANCH_NAME=${{ steps.comment-branch.outputs.head_ref }}" >> $GITHUB_ENV - - id: 'auth' name: Authenticating @@ -35,13 +33,69 @@ jobs: uses: google-github-actions/setup-gcloud@v1 - - name: Run benchmarks and cleanup + - name: Setup Directory and Copy Bash Scripts + run: | + gcloud compute ssh \ + --project=nullway-jmh \ + --zone=us-central1-a \ + root@instance-1 \ + --command="export BRANCH_NAME=${BRANCH_NAME} && mkdir $BRANCH_NAME" + gcloud compute scp ./.github/workflows/run_pr_benchmarks.sh root@instance-1:$BRANCH_NAME/ --zone=us-central1-a + gcloud compute scp ./.github/workflows/run_main_benchmarks.sh root@instance-1:$BRANCH_NAME/ --zone=us-central1-a + + - name: Run JMH benchmarks for PR Branch + run: | + gcloud compute ssh \ + --project=nullway-jmh \ + --zone=us-central1-a \ + root@instance-1 \ + --command=" export BRANCH_NAME=${BRANCH_NAME} && chmod +x $BRANCH_NAME/run_pr_benchmarks.sh && $BRANCH_NAME/run_pr_benchmarks.sh" + + - name: Copy exported PR benchmark file from Google Cloud Compute Engine + run: | + gcloud compute scp root@instance-1:$BRANCH_NAME/pr/NullAway/jmh/build/results/jmh/results.txt ./pr_text.txt --zone us-central1-a + + - name: Formatting Benchmark + run: | + (echo 'PR Benchmark:'; echo '```' ; cat pr_text.txt; echo '```') > pr.txt + + - name: Comment Benchmark + uses: mshick/add-pr-comment@v2 + if: always() + with: + message-path: pr.txt + message-id: pr + + + - name: Run JMH benchmarks for Main Branch + run: | + gcloud compute ssh \ + --project=nullway-jmh \ + --zone=us-central1-a \ + root@instance-1 \ + --command=" export BRANCH_NAME=${BRANCH_NAME} && chmod +x $BRANCH_NAME/run_main_benchmarks.sh && $BRANCH_NAME/run_main_benchmarks.sh " + + - name: Copy exported Main Benchmark file from Google Cloud Compute Engine + run: | + gcloud compute scp root@instance-1:$BRANCH_NAME/main/NullAway/jmh/build/results/jmh/results.txt ./main_text.txt --zone us-central1-a + + - name: Formatting Main Benchmark + run: | + (echo 'Main Benchmark:'; echo '```' ; cat main_text.txt; echo '```') > main.txt + + - name: Comment Main Benchmark + uses: mshick/add-pr-comment@v2 + if: always() + with: + message-path: main.txt + message-id: main + + - name: Cleanup run: | - gcloud compute scp ./.github/workflows/run_benchmarks.sh root@instance-1:/tmp --zone=us-central1-a gcloud compute ssh \ --project=nullway-jmh \ --zone=us-central1-a \ root@instance-1 \ - --command="bash /tmp/run_benchmarks.sh ${BRANCH_NAME}" + --command=" rm -r -f $BRANCH_NAME" From 7051379d36c5c9fed59c08bc0a7108531011aed2 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Mon, 26 Jun 2023 10:07:58 -0500 Subject: [PATCH 101/174] Update and rename run_benchmarks.sh to gcloud_ssh.sh --- .github/workflows/gcloud_ssh.sh | 8 ++++++++ .github/workflows/run_benchmarks.sh | 28 ---------------------------- 2 files changed, 8 insertions(+), 28 deletions(-) create mode 100644 .github/workflows/gcloud_ssh.sh delete mode 100644 .github/workflows/run_benchmarks.sh diff --git a/.github/workflows/gcloud_ssh.sh b/.github/workflows/gcloud_ssh.sh new file mode 100644 index 0000000000..31dd8e813a --- /dev/null +++ b/.github/workflows/gcloud_ssh.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +PROJECT_ID="nullway-jmh" +ZONE="us-central1-a" +USER="root" +INSTANCE="instance-1" + +gcloud compute ssh --project=$PROJECT_ID --zone=$ZONE $USER@$INSTANCE --command="$1" diff --git a/.github/workflows/run_benchmarks.sh b/.github/workflows/run_benchmarks.sh deleted file mode 100644 index 35882b7257..0000000000 --- a/.github/workflows/run_benchmarks.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -BRANCH_NAME=$1 - -# Setup Directory and Copy Bash Scripts -mkdir $BRANCH_NAME -scp ./.github/workflows/run_pr_benchmarks.sh root@instance-1:$BRANCH_NAME/ -scp ./.github/workflows/run_main_benchmarks.sh root@instance-1:$BRANCH_NAME/ - -# Run JMH benchmarks for PR Branch -chmod +x $BRANCH_NAME/run_pr_benchmarks.sh -$BRANCH_NAME/run_pr_benchmarks.sh - -# Copy exported PR benchmark file from Google Cloud Compute Engine -scp root@instance-1:$BRANCH_NAME/pr/NullAway/jmh/build/results/jmh/results.txt ./pr_text.txt - -# Run JMH benchmarks for Main Branch -chmod +x $BRANCH_NAME/run_main_benchmarks.sh -$BRANCH_NAME/run_main_benchmarks.sh - -# Copy exported Main Benchmark file from Google Cloud Compute Engine -scp root@instance-1:$BRANCH_NAME/main/NullAway/jmh/build/results/jmh/results.txt ./main_text.txt - -# Cleanup -rm -r -f $BRANCH_NAME - -# Remove this script -rm -- "$0" From 3df23724d77d785953936bdd9807474a8477c71e Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Mon, 26 Jun 2023 10:10:48 -0500 Subject: [PATCH 102/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index f87d493790..fe06f2aa1e 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -35,11 +35,7 @@ jobs: - name: Setup Directory and Copy Bash Scripts run: | - gcloud compute ssh \ - --project=nullway-jmh \ - --zone=us-central1-a \ - root@instance-1 \ - --command="export BRANCH_NAME=${BRANCH_NAME} && mkdir $BRANCH_NAME" + ./.github/workflows/gcloud_ssh.sh "export BRANCH_NAME=${BRANCH_NAME} && mkdir $BRANCH_NAME" gcloud compute scp ./.github/workflows/run_pr_benchmarks.sh root@instance-1:$BRANCH_NAME/ --zone=us-central1-a gcloud compute scp ./.github/workflows/run_main_benchmarks.sh root@instance-1:$BRANCH_NAME/ --zone=us-central1-a From 8b26c84513f26fe511ca7244d01636f047643468 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Mon, 26 Jun 2023 10:13:16 -0500 Subject: [PATCH 103/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index fe06f2aa1e..ff1d3e6143 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -35,6 +35,7 @@ jobs: - name: Setup Directory and Copy Bash Scripts run: | + chmod +x ./github/workflows/gcloud_ssh.sh ./.github/workflows/gcloud_ssh.sh "export BRANCH_NAME=${BRANCH_NAME} && mkdir $BRANCH_NAME" gcloud compute scp ./.github/workflows/run_pr_benchmarks.sh root@instance-1:$BRANCH_NAME/ --zone=us-central1-a gcloud compute scp ./.github/workflows/run_main_benchmarks.sh root@instance-1:$BRANCH_NAME/ --zone=us-central1-a From 04e1b4f6dce56e556f9a1b64b8690eeabe4339a9 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Mon, 26 Jun 2023 10:15:21 -0500 Subject: [PATCH 104/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index ff1d3e6143..46666a4dc0 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -35,7 +35,7 @@ jobs: - name: Setup Directory and Copy Bash Scripts run: | - chmod +x ./github/workflows/gcloud_ssh.sh + chmod +x /github/workflows/gcloud_ssh.sh ./.github/workflows/gcloud_ssh.sh "export BRANCH_NAME=${BRANCH_NAME} && mkdir $BRANCH_NAME" gcloud compute scp ./.github/workflows/run_pr_benchmarks.sh root@instance-1:$BRANCH_NAME/ --zone=us-central1-a gcloud compute scp ./.github/workflows/run_main_benchmarks.sh root@instance-1:$BRANCH_NAME/ --zone=us-central1-a From b1d328cc8bed155e32c18bf86ab5a59d4251065e Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Mon, 26 Jun 2023 10:19:03 -0500 Subject: [PATCH 105/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 46666a4dc0..cee8ed204d 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -35,7 +35,7 @@ jobs: - name: Setup Directory and Copy Bash Scripts run: | - chmod +x /github/workflows/gcloud_ssh.sh + chmod +x ./.github/workflows/gcloud_ssh.sh ./.github/workflows/gcloud_ssh.sh "export BRANCH_NAME=${BRANCH_NAME} && mkdir $BRANCH_NAME" gcloud compute scp ./.github/workflows/run_pr_benchmarks.sh root@instance-1:$BRANCH_NAME/ --zone=us-central1-a gcloud compute scp ./.github/workflows/run_main_benchmarks.sh root@instance-1:$BRANCH_NAME/ --zone=us-central1-a From f6b384ae477e1e66c7e8ee2c265671084fe30e03 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Mon, 26 Jun 2023 10:24:46 -0500 Subject: [PATCH 106/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 40 +++++++---------------------- 1 file changed, 9 insertions(+), 31 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index cee8ed204d..5bc2e78c47 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -42,57 +42,35 @@ jobs: - name: Run JMH benchmarks for PR Branch run: | - gcloud compute ssh \ - --project=nullway-jmh \ - --zone=us-central1-a \ - root@instance-1 \ - --command=" export BRANCH_NAME=${BRANCH_NAME} && chmod +x $BRANCH_NAME/run_pr_benchmarks.sh && $BRANCH_NAME/run_pr_benchmarks.sh" + chmod +x ./.github/workflows/gcloud_ssh.sh + ./.github/workflows/gcloud_ssh.sh " export BRANCH_NAME=${BRANCH_NAME} && chmod +x $BRANCH_NAME/run_pr_benchmarks.sh && $BRANCH_NAME/run_pr_benchmarks.sh" - name: Copy exported PR benchmark file from Google Cloud Compute Engine run: | gcloud compute scp root@instance-1:$BRANCH_NAME/pr/NullAway/jmh/build/results/jmh/results.txt ./pr_text.txt --zone us-central1-a - - - name: Formatting Benchmark - run: | - (echo 'PR Benchmark:'; echo '```' ; cat pr_text.txt; echo '```') > pr.txt - - - name: Comment Benchmark - uses: mshick/add-pr-comment@v2 - if: always() - with: - message-path: pr.txt - message-id: pr - name: Run JMH benchmarks for Main Branch run: | - gcloud compute ssh \ - --project=nullway-jmh \ - --zone=us-central1-a \ - root@instance-1 \ - --command=" export BRANCH_NAME=${BRANCH_NAME} && chmod +x $BRANCH_NAME/run_main_benchmarks.sh && $BRANCH_NAME/run_main_benchmarks.sh " + ./.github/workflows/gcloud_ssh.sh " export BRANCH_NAME=${BRANCH_NAME} && chmod +x $BRANCH_NAME/run_main_benchmarks.sh && $BRANCH_NAME/run_main_benchmarks.sh " - name: Copy exported Main Benchmark file from Google Cloud Compute Engine run: | gcloud compute scp root@instance-1:$BRANCH_NAME/main/NullAway/jmh/build/results/jmh/results.txt ./main_text.txt --zone us-central1-a - - name: Formatting Main Benchmark + - name: Formatting Benchmark run: | - (echo 'Main Benchmark:'; echo '```' ; cat main_text.txt; echo '```') > main.txt + (echo 'Main Benchmark:'; echo '```' ; cat main_text.txt; echo '```'; echo 'PR Benchmark:'; echo '```' ; cat pr_text.txt; echo '```') > benchmark.txt - - name: Comment Main Benchmark + - name: Comment Benchmark uses: mshick/add-pr-comment@v2 if: always() with: - message-path: main.txt - message-id: main + message-path: benchmark.txt + message-id: benchmark - name: Cleanup run: | - gcloud compute ssh \ - --project=nullway-jmh \ - --zone=us-central1-a \ - root@instance-1 \ - --command=" rm -r -f $BRANCH_NAME" + ./.github/workflows/gcloud_ssh.sh " rm -r -f $BRANCH_NAME" From 750ed828d18f23e56ab2e72382d7463a90ea4400 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 28 Jun 2023 09:12:04 -0500 Subject: [PATCH 107/174] Update run_pr_benchmarks.sh --- .github/workflows/run_pr_benchmarks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_pr_benchmarks.sh b/.github/workflows/run_pr_benchmarks.sh index 3b454a72aa..451f102c3c 100644 --- a/.github/workflows/run_pr_benchmarks.sh +++ b/.github/workflows/run_pr_benchmarks.sh @@ -3,6 +3,6 @@ cd $BRANCH_NAME/ mkdir pr cd pr/ -git clone --branch $BRANCH_NAME --single-branch git@github.com:armughan11/NullAway.git +git clone --branch $BRANCH_NAME --single-branch git@github.com:Uber/NullAway.git cd NullAway/ ./gradlew jmh From fd1e9932adbff3460fafbde4ceca0a4d8fe5fa0c Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 28 Jun 2023 09:12:17 -0500 Subject: [PATCH 108/174] Update run_main_benchmarks.sh --- .github/workflows/run_main_benchmarks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_main_benchmarks.sh b/.github/workflows/run_main_benchmarks.sh index 03b0f3e74e..8e9d9c6ac7 100644 --- a/.github/workflows/run_main_benchmarks.sh +++ b/.github/workflows/run_main_benchmarks.sh @@ -3,6 +3,6 @@ cd $BRANCH_NAME/ mkdir main cd main/ -git clone git@github.com:armughan11/NullAway.git +git clone git@github.com:Uber/NullAway.git cd NullAway/ ./gradlew jmh From 78a0ca62fad29bb7c5f84a499e380ae10ac27afa Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 28 Jun 2023 09:19:45 -0500 Subject: [PATCH 109/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 5bc2e78c47..1d650807ba 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -21,7 +21,12 @@ jobs: - name: Set branch name - run: echo "BRANCH_NAME=${{ steps.comment-branch.outputs.head_ref }}" >> $GITHUB_ENV + run: | + echo "BRANCH_NAME=${{ steps.comment-branch.outputs.head_ref }}" >> $GITHUB_ENV + echo "REPO_FULL_NAME=${{ github.event.issue.pull_request.user.login }}/${{ github.event.issue.pull_request.repo.name }}" >> $GITHUB_ENV + + + - id: 'auth' name: Authenticating @@ -34,7 +39,7 @@ jobs: - name: Setup Directory and Copy Bash Scripts - run: | + run: | chmod +x ./.github/workflows/gcloud_ssh.sh ./.github/workflows/gcloud_ssh.sh "export BRANCH_NAME=${BRANCH_NAME} && mkdir $BRANCH_NAME" gcloud compute scp ./.github/workflows/run_pr_benchmarks.sh root@instance-1:$BRANCH_NAME/ --zone=us-central1-a From 7c7ae0b9c94ec52542971c9c24671945001ed8c9 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 28 Jun 2023 09:22:50 -0500 Subject: [PATCH 110/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 1d650807ba..858ec0aeec 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -23,7 +23,10 @@ jobs: - name: Set branch name run: | echo "BRANCH_NAME=${{ steps.comment-branch.outputs.head_ref }}" >> $GITHUB_ENV - echo "REPO_FULL_NAME=${{ github.event.issue.pull_request.user.login }}/${{ github.event.issue.pull_request.repo.name }}" >> $GITHUB_ENV + PR_URL=$(jq -r .issue.pull_request.url <<< "${{ toJson(github.event) }}") + PR_DETAILS=$(curl -s -H "Authorization: token $GH_TOKEN" $PR_URL) + REPO_FULL_NAME=$(jq -r .head.repo.full_name <<< "$PR_DETAILS") + echo $REPO_FULL_NAME From 9d5008a41bce6b259a7de68567f92ff440454cd2 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 28 Jun 2023 09:34:32 -0500 Subject: [PATCH 111/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 858ec0aeec..dd28efbcc6 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -21,11 +21,13 @@ jobs: - name: Set branch name + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - echo "BRANCH_NAME=${{ steps.comment-branch.outputs.head_ref }}" >> $GITHUB_ENV - PR_URL=$(jq -r .issue.pull_request.url <<< "${{ toJson(github.event) }}") - PR_DETAILS=$(curl -s -H "Authorization: token $GH_TOKEN" $PR_URL) - REPO_FULL_NAME=$(jq -r .head.repo.full_name <<< "$PR_DETAILS") + PR_NUMBER=${{ github.event.issue.number }} + PR_DETAILS=$(curl -s -H "Authorization: token $GH_TOKEN" "https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER") + REPO_FULL_NAME=$(echo "$PR_DETAILS" | jq -r .head.repo.full_name) + BRANCH_NAME=$(echo "$PR_DETAILS" | jq -r .head.ref) echo $REPO_FULL_NAME From 3dd23dad123adaae1f13f82ad0e0d44db94fc2b5 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 28 Jun 2023 09:38:33 -0500 Subject: [PATCH 112/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index dd28efbcc6..5dea39eefe 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -15,11 +15,6 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 - - name: Get PR branch - uses: xt0rted/pull-request-comment-branch@v1 - id: comment-branch - - - name: Set branch name env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -28,10 +23,8 @@ jobs: PR_DETAILS=$(curl -s -H "Authorization: token $GH_TOKEN" "https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER") REPO_FULL_NAME=$(echo "$PR_DETAILS" | jq -r .head.repo.full_name) BRANCH_NAME=$(echo "$PR_DETAILS" | jq -r .head.ref) - echo $REPO_FULL_NAME - - - + echo "REPO_FULL_NAME=$REPO_FULL_NAME" >> $GITHUB_ENV + echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV - id: 'auth' name: Authenticating From ee97fa2db9944db5dd164aa65bf2e1de2283d723 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 28 Jun 2023 09:41:43 -0500 Subject: [PATCH 113/174] Update run_pr_benchmarks.sh --- .github/workflows/run_pr_benchmarks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_pr_benchmarks.sh b/.github/workflows/run_pr_benchmarks.sh index 451f102c3c..45ace87f02 100644 --- a/.github/workflows/run_pr_benchmarks.sh +++ b/.github/workflows/run_pr_benchmarks.sh @@ -3,6 +3,6 @@ cd $BRANCH_NAME/ mkdir pr cd pr/ -git clone --branch $BRANCH_NAME --single-branch git@github.com:Uber/NullAway.git +git clone --branch $BRANCH_NAME --single-branch git@github.com:$REPO_NAME.git cd NullAway/ ./gradlew jmh From 60f40c0bc53956b7ab55930842ecc6f93ab0833a Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 28 Jun 2023 09:43:46 -0500 Subject: [PATCH 114/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 5dea39eefe..3cbac38b4f 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -21,9 +21,9 @@ jobs: run: | PR_NUMBER=${{ github.event.issue.number }} PR_DETAILS=$(curl -s -H "Authorization: token $GH_TOKEN" "https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER") - REPO_FULL_NAME=$(echo "$PR_DETAILS" | jq -r .head.repo.full_name) + REPO_NAME=$(echo "$PR_DETAILS" | jq -r .head.repo.full_name) BRANCH_NAME=$(echo "$PR_DETAILS" | jq -r .head.ref) - echo "REPO_FULL_NAME=$REPO_FULL_NAME" >> $GITHUB_ENV + echo "REPO_NAME=$REPO_NAME" >> $GITHUB_ENV echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV - id: 'auth' @@ -46,7 +46,7 @@ jobs: - name: Run JMH benchmarks for PR Branch run: | chmod +x ./.github/workflows/gcloud_ssh.sh - ./.github/workflows/gcloud_ssh.sh " export BRANCH_NAME=${BRANCH_NAME} && chmod +x $BRANCH_NAME/run_pr_benchmarks.sh && $BRANCH_NAME/run_pr_benchmarks.sh" + ./.github/workflows/gcloud_ssh.sh " export BRANCH_NAME=${BRANCH_NAME} && export REPO_NAME=${REPO_NAME} && chmod +x $BRANCH_NAME/run_pr_benchmarks.sh && $BRANCH_NAME/run_pr_benchmarks.sh" - name: Copy exported PR benchmark file from Google Cloud Compute Engine run: | From a180681518f428af6ac4ded00efec776d512bc93 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 28 Jun 2023 09:57:52 -0500 Subject: [PATCH 115/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 3cbac38b4f..d7a94e2fdd 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -7,13 +7,13 @@ on: jobs: setup: - if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') + if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') && github.repository == 'uber/NullAway' runs-on: ubuntu-latest permissions: write-all steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set branch name env: From 21fa6354cc786ff3748f8ca58bfd32c075572186 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 28 Jun 2023 10:07:53 -0500 Subject: [PATCH 116/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index d7a94e2fdd..81c89b6a17 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -1,4 +1,4 @@ -name: JMH Benchmark +name: Run JMH Benchmarks for Pull Request on: issue_comment: From a22dd490a90a6f6b4f9d1735328752feb8247917 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 5 Jul 2023 22:33:31 -0500 Subject: [PATCH 117/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 81c89b6a17..f90ce3e487 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -36,30 +36,11 @@ jobs: uses: google-github-actions/setup-gcloud@v1 - - name: Setup Directory and Copy Bash Scripts - run: | - chmod +x ./.github/workflows/gcloud_ssh.sh - ./.github/workflows/gcloud_ssh.sh "export BRANCH_NAME=${BRANCH_NAME} && mkdir $BRANCH_NAME" - gcloud compute scp ./.github/workflows/run_pr_benchmarks.sh root@instance-1:$BRANCH_NAME/ --zone=us-central1-a - gcloud compute scp ./.github/workflows/run_main_benchmarks.sh root@instance-1:$BRANCH_NAME/ --zone=us-central1-a - - - name: Run JMH benchmarks for PR Branch - run: | - chmod +x ./.github/workflows/gcloud_ssh.sh - ./.github/workflows/gcloud_ssh.sh " export BRANCH_NAME=${BRANCH_NAME} && export REPO_NAME=${REPO_NAME} && chmod +x $BRANCH_NAME/run_pr_benchmarks.sh && $BRANCH_NAME/run_pr_benchmarks.sh" - - - name: Copy exported PR benchmark file from Google Cloud Compute Engine + - name: Run benchmarks run: | - gcloud compute scp root@instance-1:$BRANCH_NAME/pr/NullAway/jmh/build/results/jmh/results.txt ./pr_text.txt --zone us-central1-a - - - - name: Run JMH benchmarks for Main Branch - run: | - ./.github/workflows/gcloud_ssh.sh " export BRANCH_NAME=${BRANCH_NAME} && chmod +x $BRANCH_NAME/run_main_benchmarks.sh && $BRANCH_NAME/run_main_benchmarks.sh " - - - name: Copy exported Main Benchmark file from Google Cloud Compute Engine - run: | - gcloud compute scp root@instance-1:$BRANCH_NAME/main/NullAway/jmh/build/results/jmh/results.txt ./main_text.txt --zone us-central1-a + chmod +x ./.github/workflows/run_gcp_benchmarks.sh + ./.github/workflows/run_gcp_benchmarks.sh + - name: Formatting Benchmark run: | From 367048210450a342cadfe8c0ac12d186425df0bd Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 5 Jul 2023 22:34:24 -0500 Subject: [PATCH 118/174] Create run_gcp_benchmarks.sh --- .github/workflows/run_gcp_benchmarks.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/run_gcp_benchmarks.sh diff --git a/.github/workflows/run_gcp_benchmarks.sh b/.github/workflows/run_gcp_benchmarks.sh new file mode 100644 index 0000000000..f51ee6f036 --- /dev/null +++ b/.github/workflows/run_gcp_benchmarks.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# Assign command line argument to a variable +CMD="$1" + +# Setup Directory and Copy Bash Scripts +chmod +x ./.github/workflows/gcloud_ssh.sh +./.github/workflows/gcloud_ssh.sh "export BRANCH_NAME=${BRANCH_NAME} && mkdir $BRANCH_NAME" +gcloud compute scp ./.github/workflows/run_pr_benchmarks.sh root@instance-1:$BRANCH_NAME/ --zone=us-central1-a +gcloud compute scp ./.github/workflows/run_main_benchmarks.sh root@instance-1:$BRANCH_NAME/ --zone=us-central1-a + +# Run JMH benchmarks for PR Branch +./.github/workflows/gcloud_ssh.sh " export BRANCH_NAME=${BRANCH_NAME} && export REPO_NAME=${REPO_NAME} && chmod +x $BRANCH_NAME/run_pr_benchmarks.sh && $BRANCH_NAME/run_pr_benchmarks.sh" + +# Copy exported PR benchmark file from Google Cloud Compute Engine +gcloud compute scp root@instance-1:$BRANCH_NAME/pr/NullAway/jmh/build/results/jmh/results.txt ./pr_text.txt --zone=us-central1-a + +# Run JMH benchmarks for Main Branch +./.github/workflows/gcloud_ssh.sh " export BRANCH_NAME=${BRANCH_NAME} && chmod +x $BRANCH_NAME/run_main_benchmarks.sh && $BRANCH_NAME/run_main_benchmarks.sh " + +# Copy exported Main Benchmark file from Google Cloud Compute Engine +gcloud compute scp root@instance-1:$BRANCH_NAME/main/NullAway/jmh/build/results/jmh/results.txt ./main_text.txt --zone=us-central1-a From 859a079de634cc37a4afcfd6a062998174288bbe Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 5 Jul 2023 22:35:31 -0500 Subject: [PATCH 119/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index f90ce3e487..ec7bccd087 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -7,7 +7,7 @@ on: jobs: setup: - if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') && github.repository == 'uber/NullAway' + if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') #&& github.repository == 'uber/NullAway' runs-on: ubuntu-latest permissions: write-all From 0af9deeea3edd3df7b2d9f2dfae94928f465ca3f Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 5 Jul 2023 22:41:25 -0500 Subject: [PATCH 120/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index ec7bccd087..c4a7220c49 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -19,12 +19,9 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - PR_NUMBER=${{ github.event.issue.number }} - PR_DETAILS=$(curl -s -H "Authorization: token $GH_TOKEN" "https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER") - REPO_NAME=$(echo "$PR_DETAILS" | jq -r .head.repo.full_name) - BRANCH_NAME=$(echo "$PR_DETAILS" | jq -r .head.ref) - echo "REPO_NAME=$REPO_NAME" >> $GITHUB_ENV - echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV + chmod +x ./.github/workflows/get_repo_details.sh + ./.github/workflows/get_repo_details.sh "${{ secrets.GITHUB_TOKEN }}" "${{ github.event.issue.number }}" "${{ github.repository }}" + - id: 'auth' name: Authenticating From c9cf2b0da0c6f98a4f5eb9bcb8aebe543dd23399 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 5 Jul 2023 22:41:43 -0500 Subject: [PATCH 121/174] Create get_repo_details.sh --- .github/workflows/get_repo_details.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/get_repo_details.sh diff --git a/.github/workflows/get_repo_details.sh b/.github/workflows/get_repo_details.sh new file mode 100644 index 0000000000..a045e801c0 --- /dev/null +++ b/.github/workflows/get_repo_details.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# Assign command line argument to a variable +GH_TOKEN="$1" +PR_NUMBER="$2" +REPO_NAME="$3" + +# Get PR details +PR_DETAILS=$(curl -s -H "Authorization: token $GH_TOKEN" "https://api.github.com/repos/$REPO_NAME/pulls/$PR_NUMBER") + +# Get repo full name and branch name +REPO_FULL_NAME=$(echo "$PR_DETAILS" | jq -r .head.repo.full_name) +BRANCH_NAME=$(echo "$PR_DETAILS" | jq -r .head.ref) + +# Export the variables +echo "REPO_FULL_NAME=$REPO_FULL_NAME" >> $GITHUB_ENV +echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV From 24d527b4271c56c436bc9a17774295ff305161e0 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 5 Jul 2023 22:49:43 -0500 Subject: [PATCH 122/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 49 +++++++++++++++-------------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index c4a7220c49..7b29b7cc7e 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -1,57 +1,58 @@ +# This GitHub Actions workflow runs JMH benchmarks when a new comment is created on a pull request name: Run JMH Benchmarks for Pull Request on: - issue_comment: + issue_comment: # This workflow triggers when a comment is created types: [created] - jobs: setup: - if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') #&& github.repository == 'uber/NullAway' - runs-on: ubuntu-latest - permissions: write-all + # Only run this job if a comment on a pull request contains '/benchmark' and is a PR on the uber/NullAway repository + if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') && github.repository == 'uber/NullAway' + runs-on: ubuntu-latest + permissions: write-all steps: - - name: Checkout repository + - name: Checkout repository # Checks out repository under $GITHUB_WORKSPACE uses: actions/checkout@v3 - name: Set branch name env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # The GitHub token is loaded from the secrets of repo run: | - chmod +x ./.github/workflows/get_repo_details.sh + # Make the script executable and run it + chmod +x ./.github/workflows/get_repo_details.sh ./.github/workflows/get_repo_details.sh "${{ secrets.GITHUB_TOKEN }}" "${{ github.event.issue.number }}" "${{ github.repository }}" - - id: 'auth' - name: Authenticating - uses: 'google-github-actions/auth@v1' + name: Authenticating # Authenticating with Google Cloud + uses: 'google-github-actions/auth@v1' with: - credentials_json: '${{ secrets.GCP_SA_KEY }}' + credentials_json: '${{ secrets.GCP_SA_KEY }}' # Google Cloud credentials are loaded from repo's secrets - - name: Set up Google Cloud SDK + - name: Set up Google Cloud SDK # This step sets up Google Cloud SDK uses: google-github-actions/setup-gcloud@v1 - - - - name: Run benchmarks + + - name: Run benchmarks # This runs the benchmark script on GCP run: | + chmod +x ./.github/workflows/run_gcp_benchmarks.sh ./.github/workflows/run_gcp_benchmarks.sh - - - - name: Formatting Benchmark + + - name: Formatting Benchmark # Create a text file containing the benchmark results run: | + (echo 'Main Benchmark:'; echo '```' ; cat main_text.txt; echo '```'; echo 'PR Benchmark:'; echo '```' ; cat pr_text.txt; echo '```') > benchmark.txt - name: Comment Benchmark uses: mshick/add-pr-comment@v2 - if: always() + if: always() # This step is for adding the comment with: - message-path: benchmark.txt + message-path: benchmark.txt # The path to the message file to leave as a comment message-id: benchmark - name: Cleanup + # Delete the branch directory on the Google Cloud instance + if: always() run: | - ./.github/workflows/gcloud_ssh.sh " rm -r -f $BRANCH_NAME" - - + ./.github/workflows/gcloud_ssh.sh " rm -r -f $BRANCH_NAME" From 059cbcfb073846e01f6c1182cbf8a988bf38cd21 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 5 Jul 2023 22:50:58 -0500 Subject: [PATCH 123/174] Update gcloud_ssh.sh --- .github/workflows/gcloud_ssh.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/gcloud_ssh.sh b/.github/workflows/gcloud_ssh.sh index 31dd8e813a..323d3d0520 100644 --- a/.github/workflows/gcloud_ssh.sh +++ b/.github/workflows/gcloud_ssh.sh @@ -1,8 +1,13 @@ #!/bin/bash +# This script is used to run commands on a Google Cloud instance via SSH + +# Define the variables for Google Cloud project, zone, username, and instance PROJECT_ID="nullway-jmh" ZONE="us-central1-a" USER="root" INSTANCE="instance-1" +# Use the gcloud compute ssh command to run a command ($1) on the specified Google Cloud instance +# $1 is a positional parameter that represents the first argument given when calling this script gcloud compute ssh --project=$PROJECT_ID --zone=$ZONE $USER@$INSTANCE --command="$1" From d51e45ffec8d6d1340e8d26536181a730ed06995 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 5 Jul 2023 22:51:46 -0500 Subject: [PATCH 124/174] Update get_repo_details.sh --- .github/workflows/get_repo_details.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/get_repo_details.sh b/.github/workflows/get_repo_details.sh index a045e801c0..4406382b08 100644 --- a/.github/workflows/get_repo_details.sh +++ b/.github/workflows/get_repo_details.sh @@ -1,17 +1,26 @@ #!/bin/bash -# Assign command line argument to a variable +# This script retrieves the repository and branch details of a GitHub pull request + +# Assign command line arguments to variables +# GH_TOKEN is the GitHub authentication token +# PR_NUMBER is the number of the pull request +# REPO_NAME is the name of the repository GH_TOKEN="$1" PR_NUMBER="$2" REPO_NAME="$3" -# Get PR details +# Use a curl command to retrieve the details of the pull request from the GitHub API +# The GH_TOKEN is used for authentication +# The output of the curl command is stored in the PR_DETAILS variable PR_DETAILS=$(curl -s -H "Authorization: token $GH_TOKEN" "https://api.github.com/repos/$REPO_NAME/pulls/$PR_NUMBER") -# Get repo full name and branch name +# Use the jq command to parse the JSON output of the curl command +# The full name of the repository and the branch name are extracted from the JSON and stored in the REPO_FULL_NAME and BRANCH_NAME variables respectively REPO_FULL_NAME=$(echo "$PR_DETAILS" | jq -r .head.repo.full_name) BRANCH_NAME=$(echo "$PR_DETAILS" | jq -r .head.ref) -# Export the variables +# Export the REPO_FULL_NAME and BRANCH_NAME variables +# The variables are appended to the $GITHUB_ENV file, making them available to subsequent steps in a GitHub Actions workflow echo "REPO_FULL_NAME=$REPO_FULL_NAME" >> $GITHUB_ENV echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV From 860ad36b15cb4b6879919a3fafc9e4b49ae4a5b2 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 5 Jul 2023 22:53:09 -0500 Subject: [PATCH 125/174] Update run_gcp_benchmarks.sh --- .github/workflows/run_gcp_benchmarks.sh | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/run_gcp_benchmarks.sh b/.github/workflows/run_gcp_benchmarks.sh index f51ee6f036..f63b3739af 100644 --- a/.github/workflows/run_gcp_benchmarks.sh +++ b/.github/workflows/run_gcp_benchmarks.sh @@ -1,22 +1,27 @@ #!/bin/bash -# Assign command line argument to a variable +# This script is responsible for running benchmarks for a GitHub pull request and the main branch on Google Cloud Compute Engine (GCCE). + +# Accepting a command line argument CMD="$1" -# Setup Directory and Copy Bash Scripts +# Setting up a new directory named after the branch on GCCE and copying bash scripts into this directory +# The ssh command is made executable and then run with a command to export the branch name and make a new directory on the GCCE chmod +x ./.github/workflows/gcloud_ssh.sh ./.github/workflows/gcloud_ssh.sh "export BRANCH_NAME=${BRANCH_NAME} && mkdir $BRANCH_NAME" + +# Using gcloud compute scp to copy the bash scripts that will run the benchmarks onto the GCCE gcloud compute scp ./.github/workflows/run_pr_benchmarks.sh root@instance-1:$BRANCH_NAME/ --zone=us-central1-a gcloud compute scp ./.github/workflows/run_main_benchmarks.sh root@instance-1:$BRANCH_NAME/ --zone=us-central1-a -# Run JMH benchmarks for PR Branch +# Running the benchmark script for the pull request branch on GCCE ./.github/workflows/gcloud_ssh.sh " export BRANCH_NAME=${BRANCH_NAME} && export REPO_NAME=${REPO_NAME} && chmod +x $BRANCH_NAME/run_pr_benchmarks.sh && $BRANCH_NAME/run_pr_benchmarks.sh" -# Copy exported PR benchmark file from Google Cloud Compute Engine +# Copying the benchmark results from GCCE back to the Github runner for the PR branch gcloud compute scp root@instance-1:$BRANCH_NAME/pr/NullAway/jmh/build/results/jmh/results.txt ./pr_text.txt --zone=us-central1-a -# Run JMH benchmarks for Main Branch +# Running the benchmark script for the main branch on GCCE ./.github/workflows/gcloud_ssh.sh " export BRANCH_NAME=${BRANCH_NAME} && chmod +x $BRANCH_NAME/run_main_benchmarks.sh && $BRANCH_NAME/run_main_benchmarks.sh " -# Copy exported Main Benchmark file from Google Cloud Compute Engine +# Copying the benchmark results from GCCE back to the Github runner for the main branch gcloud compute scp root@instance-1:$BRANCH_NAME/main/NullAway/jmh/build/results/jmh/results.txt ./main_text.txt --zone=us-central1-a From 9cded48d6291f99ff42809e1dd0ec6237605f9a2 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 5 Jul 2023 22:54:20 -0500 Subject: [PATCH 126/174] Update run_main_benchmarks.sh --- .github/workflows/run_main_benchmarks.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/run_main_benchmarks.sh b/.github/workflows/run_main_benchmarks.sh index 8e9d9c6ac7..8690aabe19 100644 --- a/.github/workflows/run_main_benchmarks.sh +++ b/.github/workflows/run_main_benchmarks.sh @@ -1,8 +1,19 @@ #!/bin/bash +# This script is responsible for cloning the main repository from GitHub and running Java Microbenchmark Harness (JMH) benchmarks. + +# Change directory to the one named after the branch name. cd $BRANCH_NAME/ + +# Create a new directory called 'main' and navigate into it mkdir main cd main/ + +# Clone the main repository from GitHub git clone git@github.com:Uber/NullAway.git + +# Change directory into the newly cloned repository cd NullAway/ + +# Run the JMH benchmarks using the Gradle Wrapper. ./gradlew jmh From 619176a28c4cd26728cf0cc34cf7b567f70f0a43 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 5 Jul 2023 22:55:11 -0500 Subject: [PATCH 127/174] Update run_pr_benchmarks.sh --- .github/workflows/run_pr_benchmarks.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/run_pr_benchmarks.sh b/.github/workflows/run_pr_benchmarks.sh index 45ace87f02..39157300c6 100644 --- a/.github/workflows/run_pr_benchmarks.sh +++ b/.github/workflows/run_pr_benchmarks.sh @@ -1,8 +1,20 @@ #!/bin/bash +# This script is responsible for cloning a specific branch (the PR branch) from a GitHub repository and running Java Microbenchmark Harness (JMH) benchmarks. + +# Change directory to the one named after the branch name. cd $BRANCH_NAME/ + +# Create a new directory called 'pr' and navigate into it mkdir pr cd pr/ + +# Clone the specific branch from the GitHub repository. +# The repository and branch are specified by the REPO_NAME and BRANCH_NAME variables. git clone --branch $BRANCH_NAME --single-branch git@github.com:$REPO_NAME.git + +# Change directory into the newly cloned repository cd NullAway/ + +# Run the JMH benchmarks using the Gradle Wrapper. ./gradlew jmh From 4e6665e15cbd1de74e924b894e32ed31b9f9bd73 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 5 Jul 2023 22:57:34 -0500 Subject: [PATCH 128/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 7b29b7cc7e..0cb0e3040a 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -8,7 +8,7 @@ on: jobs: setup: # Only run this job if a comment on a pull request contains '/benchmark' and is a PR on the uber/NullAway repository - if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') && github.repository == 'uber/NullAway' + if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') #&& github.repository == 'uber/NullAway' runs-on: ubuntu-latest permissions: write-all From 9c11cd20c52c2b87ecdfdea4ae8cf23c56e796c6 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 5 Jul 2023 23:02:18 -0500 Subject: [PATCH 129/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 0cb0e3040a..f6386dbc26 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -20,7 +20,6 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # The GitHub token is loaded from the secrets of repo run: | - # Make the script executable and run it chmod +x ./.github/workflows/get_repo_details.sh ./.github/workflows/get_repo_details.sh "${{ secrets.GITHUB_TOKEN }}" "${{ github.event.issue.number }}" "${{ github.repository }}" From b7f6478bba6b875900c66394b07051e44ea4d38c Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 5 Jul 2023 23:10:52 -0500 Subject: [PATCH 130/174] Update run_pr_benchmarks.sh --- .github/workflows/run_pr_benchmarks.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_pr_benchmarks.sh b/.github/workflows/run_pr_benchmarks.sh index 39157300c6..84b6d0c622 100644 --- a/.github/workflows/run_pr_benchmarks.sh +++ b/.github/workflows/run_pr_benchmarks.sh @@ -10,8 +10,8 @@ mkdir pr cd pr/ # Clone the specific branch from the GitHub repository. -# The repository and branch are specified by the REPO_NAME and BRANCH_NAME variables. -git clone --branch $BRANCH_NAME --single-branch git@github.com:$REPO_NAME.git +# The repository and branch are specified by the REPO_FULL_NAME and BRANCH_NAME variables. +git clone --branch $BRANCH_NAME --single-branch git@github.com:$REPO_FULL_NAME.git # Change directory into the newly cloned repository cd NullAway/ From b5527538a95c7ebcf6e313acba316feff8a6d1bf Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 5 Jul 2023 23:11:39 -0500 Subject: [PATCH 131/174] Update run_pr_benchmarks.sh --- .github/workflows/run_pr_benchmarks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_pr_benchmarks.sh b/.github/workflows/run_pr_benchmarks.sh index 84b6d0c622..0b06d8398b 100644 --- a/.github/workflows/run_pr_benchmarks.sh +++ b/.github/workflows/run_pr_benchmarks.sh @@ -11,7 +11,7 @@ cd pr/ # Clone the specific branch from the GitHub repository. # The repository and branch are specified by the REPO_FULL_NAME and BRANCH_NAME variables. -git clone --branch $BRANCH_NAME --single-branch git@github.com:$REPO_FULL_NAME.git +git clone --branch $BRANCH_NAME --single-branch git@github.com:$REPO_NAME.git # Change directory into the newly cloned repository cd NullAway/ From 97a664ded95269594a40541aac655a255dc0db97 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 5 Jul 2023 23:14:51 -0500 Subject: [PATCH 132/174] Update run_pr_benchmarks.sh --- .github/workflows/run_pr_benchmarks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_pr_benchmarks.sh b/.github/workflows/run_pr_benchmarks.sh index 0b06d8398b..61ab445b23 100644 --- a/.github/workflows/run_pr_benchmarks.sh +++ b/.github/workflows/run_pr_benchmarks.sh @@ -11,7 +11,7 @@ cd pr/ # Clone the specific branch from the GitHub repository. # The repository and branch are specified by the REPO_FULL_NAME and BRANCH_NAME variables. -git clone --branch $BRANCH_NAME --single-branch git@github.com:$REPO_NAME.git +git clone --branch $BRANCH_NAME --single-branch git@github.com:$REPO_NAME.git NullAway # Change directory into the newly cloned repository cd NullAway/ From 4f6df5cb78f07d88ab2b0b644da5c2afef2e9296 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 5 Jul 2023 23:17:29 -0500 Subject: [PATCH 133/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index f6386dbc26..84b8a31da9 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -36,7 +36,7 @@ jobs: run: | chmod +x ./.github/workflows/run_gcp_benchmarks.sh - ./.github/workflows/run_gcp_benchmarks.sh + ./.github/workflows/run_gcp_benchmarks.sh ${{ env.REPO_NAME }} ${{ env.BRANCH_NAME }} - name: Formatting Benchmark # Create a text file containing the benchmark results run: | From e4916becef932083d534b1258213428ad576d40a Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 5 Jul 2023 23:18:28 -0500 Subject: [PATCH 134/174] Update run_gcp_benchmarks.sh --- .github/workflows/run_gcp_benchmarks.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run_gcp_benchmarks.sh b/.github/workflows/run_gcp_benchmarks.sh index f63b3739af..e86c6ec1ad 100644 --- a/.github/workflows/run_gcp_benchmarks.sh +++ b/.github/workflows/run_gcp_benchmarks.sh @@ -3,7 +3,8 @@ # This script is responsible for running benchmarks for a GitHub pull request and the main branch on Google Cloud Compute Engine (GCCE). # Accepting a command line argument -CMD="$1" +REPO_NAME="$1" +BRANCH_NAME="$2" # Setting up a new directory named after the branch on GCCE and copying bash scripts into this directory # The ssh command is made executable and then run with a command to export the branch name and make a new directory on the GCCE From bffefdb01d6a923b8b4862e5f918d340980cb814 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 5 Jul 2023 23:19:51 -0500 Subject: [PATCH 135/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 84b8a31da9..db463bb251 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -36,7 +36,7 @@ jobs: run: | chmod +x ./.github/workflows/run_gcp_benchmarks.sh - ./.github/workflows/run_gcp_benchmarks.sh ${{ env.REPO_NAME }} ${{ env.BRANCH_NAME }} + ./.github/workflows/run_gcp_benchmarks.sh - name: Formatting Benchmark # Create a text file containing the benchmark results run: | From 6c752c6e39c659c0dc6e0b545ed57e305d50a3a2 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 5 Jul 2023 23:20:37 -0500 Subject: [PATCH 136/174] Update run_gcp_benchmarks.sh --- .github/workflows/run_gcp_benchmarks.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/run_gcp_benchmarks.sh b/.github/workflows/run_gcp_benchmarks.sh index e86c6ec1ad..9a701a7585 100644 --- a/.github/workflows/run_gcp_benchmarks.sh +++ b/.github/workflows/run_gcp_benchmarks.sh @@ -2,9 +2,6 @@ # This script is responsible for running benchmarks for a GitHub pull request and the main branch on Google Cloud Compute Engine (GCCE). -# Accepting a command line argument -REPO_NAME="$1" -BRANCH_NAME="$2" # Setting up a new directory named after the branch on GCCE and copying bash scripts into this directory # The ssh command is made executable and then run with a command to export the branch name and make a new directory on the GCCE @@ -16,7 +13,7 @@ gcloud compute scp ./.github/workflows/run_pr_benchmarks.sh root@instance-1:$BRA gcloud compute scp ./.github/workflows/run_main_benchmarks.sh root@instance-1:$BRANCH_NAME/ --zone=us-central1-a # Running the benchmark script for the pull request branch on GCCE -./.github/workflows/gcloud_ssh.sh " export BRANCH_NAME=${BRANCH_NAME} && export REPO_NAME=${REPO_NAME} && chmod +x $BRANCH_NAME/run_pr_benchmarks.sh && $BRANCH_NAME/run_pr_benchmarks.sh" +./.github/workflows/gcloud_ssh.sh " export BRANCH_NAME=${BRANCH_NAME} && export REPO_NAME=${REPO_FULL_NAME} && chmod +x $BRANCH_NAME/run_pr_benchmarks.sh && $BRANCH_NAME/run_pr_benchmarks.sh" # Copying the benchmark results from GCCE back to the Github runner for the PR branch gcloud compute scp root@instance-1:$BRANCH_NAME/pr/NullAway/jmh/build/results/jmh/results.txt ./pr_text.txt --zone=us-central1-a From d6e832f067a07a8b9420acb69868205f78cd5a61 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Wed, 5 Jul 2023 23:25:00 -0500 Subject: [PATCH 137/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index db463bb251..46b7758d34 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -16,7 +16,7 @@ jobs: - name: Checkout repository # Checks out repository under $GITHUB_WORKSPACE uses: actions/checkout@v3 - - name: Set branch name + - name: Set branch name #This step retrieves the repository branch details for the PR. env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # The GitHub token is loaded from the secrets of repo run: | From 254799310098779667158efd71c6edf896567c0e Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Sat, 8 Jul 2023 00:37:34 -0500 Subject: [PATCH 138/174] Update gcloud_ssh.sh --- .github/workflows/gcloud_ssh.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gcloud_ssh.sh b/.github/workflows/gcloud_ssh.sh index 323d3d0520..e0fc80ba95 100644 --- a/.github/workflows/gcloud_ssh.sh +++ b/.github/workflows/gcloud_ssh.sh @@ -3,10 +3,10 @@ # This script is used to run commands on a Google Cloud instance via SSH # Define the variables for Google Cloud project, zone, username, and instance -PROJECT_ID="nullway-jmh" +PROJECT_ID="ucr-ursa-major-sridharan-lab" ZONE="us-central1-a" USER="root" -INSTANCE="instance-1" +INSTANCE="nullway-jmh" # Use the gcloud compute ssh command to run a command ($1) on the specified Google Cloud instance # $1 is a positional parameter that represents the first argument given when calling this script From 976df478ec61afadf9f1e55f89c21f85653de45f Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Sat, 8 Jul 2023 00:39:29 -0500 Subject: [PATCH 139/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 46b7758d34..b728faf0b0 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -27,7 +27,7 @@ jobs: name: Authenticating # Authenticating with Google Cloud uses: 'google-github-actions/auth@v1' with: - credentials_json: '${{ secrets.GCP_SA_KEY }}' # Google Cloud credentials are loaded from repo's secrets + credentials_json: '${{ secrets.GCP_SA_KEY_1 }}' # Google Cloud credentials are loaded from repo's secrets - name: Set up Google Cloud SDK # This step sets up Google Cloud SDK uses: google-github-actions/setup-gcloud@v1 From 9a41a4cd37b58bced065d9edb9bc0db546227ba2 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Sat, 8 Jul 2023 00:43:43 -0500 Subject: [PATCH 140/174] Update run_gcp_benchmarks.sh --- .github/workflows/run_gcp_benchmarks.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_gcp_benchmarks.sh b/.github/workflows/run_gcp_benchmarks.sh index 9a701a7585..03ba8f30fb 100644 --- a/.github/workflows/run_gcp_benchmarks.sh +++ b/.github/workflows/run_gcp_benchmarks.sh @@ -9,8 +9,8 @@ chmod +x ./.github/workflows/gcloud_ssh.sh ./.github/workflows/gcloud_ssh.sh "export BRANCH_NAME=${BRANCH_NAME} && mkdir $BRANCH_NAME" # Using gcloud compute scp to copy the bash scripts that will run the benchmarks onto the GCCE -gcloud compute scp ./.github/workflows/run_pr_benchmarks.sh root@instance-1:$BRANCH_NAME/ --zone=us-central1-a -gcloud compute scp ./.github/workflows/run_main_benchmarks.sh root@instance-1:$BRANCH_NAME/ --zone=us-central1-a +gcloud compute scp ./.github/workflows/run_pr_benchmarks.sh root@nullway-jmh:$BRANCH_NAME/ --zone=us-central1-a +gcloud compute scp ./.github/workflows/run_main_benchmarks.sh root@nullway-jmh:$BRANCH_NAME/ --zone=us-central1-a # Running the benchmark script for the pull request branch on GCCE ./.github/workflows/gcloud_ssh.sh " export BRANCH_NAME=${BRANCH_NAME} && export REPO_NAME=${REPO_FULL_NAME} && chmod +x $BRANCH_NAME/run_pr_benchmarks.sh && $BRANCH_NAME/run_pr_benchmarks.sh" From 0e6a13f1378909ae51a25092ee6166ac94c2a4e7 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Sat, 8 Jul 2023 01:37:13 -0500 Subject: [PATCH 141/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index b728faf0b0..188aac97d7 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -54,4 +54,4 @@ jobs: # Delete the branch directory on the Google Cloud instance if: always() run: | - ./.github/workflows/gcloud_ssh.sh " rm -r -f $BRANCH_NAME" + ./.github/workflows/gcloud_ssh.sh " export BRANCH_NAME=${BRANCH_NAME} && rm -r -f $BRANCH_NAME" From 010843e670e4e6a72d5acf4245f35b7ef1dfeacd Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Sat, 8 Jul 2023 01:42:24 -0500 Subject: [PATCH 142/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 188aac97d7..87132ab271 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -37,6 +37,12 @@ jobs: chmod +x ./.github/workflows/run_gcp_benchmarks.sh ./.github/workflows/run_gcp_benchmarks.sh + + - name: Cleanup + # Delete the branch directory on the Google Cloud instance + if: always() + run: | + ./.github/workflows/gcloud_ssh.sh " export BRANCH_NAME=${BRANCH_NAME} && rm -r -f $BRANCH_NAME" - name: Formatting Benchmark # Create a text file containing the benchmark results run: | From 041f2b84a6a845c23c387b91254ea4f391cef7d0 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Sat, 8 Jul 2023 01:43:57 -0500 Subject: [PATCH 143/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 87132ab271..c907bee0e0 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -31,6 +31,11 @@ jobs: - name: Set up Google Cloud SDK # This step sets up Google Cloud SDK uses: google-github-actions/setup-gcloud@v1 + - name: Cleanup + # Delete the branch directory on the Google Cloud instance + if: always() + run: | + ./.github/workflows/gcloud_ssh.sh " export BRANCH_NAME=${BRANCH_NAME} && rm -r -f $BRANCH_NAME" - name: Run benchmarks # This runs the benchmark script on GCP run: | @@ -38,11 +43,7 @@ jobs: chmod +x ./.github/workflows/run_gcp_benchmarks.sh ./.github/workflows/run_gcp_benchmarks.sh - - name: Cleanup - # Delete the branch directory on the Google Cloud instance - if: always() - run: | - ./.github/workflows/gcloud_ssh.sh " export BRANCH_NAME=${BRANCH_NAME} && rm -r -f $BRANCH_NAME" + - name: Formatting Benchmark # Create a text file containing the benchmark results run: | From d0e89d2b75b88f34ae7a899b7b321fbf2e8567c4 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Sat, 8 Jul 2023 01:44:54 -0500 Subject: [PATCH 144/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index c907bee0e0..188aac97d7 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -31,19 +31,12 @@ jobs: - name: Set up Google Cloud SDK # This step sets up Google Cloud SDK uses: google-github-actions/setup-gcloud@v1 - - name: Cleanup - # Delete the branch directory on the Google Cloud instance - if: always() - run: | - ./.github/workflows/gcloud_ssh.sh " export BRANCH_NAME=${BRANCH_NAME} && rm -r -f $BRANCH_NAME" - name: Run benchmarks # This runs the benchmark script on GCP run: | chmod +x ./.github/workflows/run_gcp_benchmarks.sh ./.github/workflows/run_gcp_benchmarks.sh - - - name: Formatting Benchmark # Create a text file containing the benchmark results run: | From f2acee09a2557ab7ecca95c3c08a4de35d3d6234 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Sat, 8 Jul 2023 01:53:10 -0500 Subject: [PATCH 145/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 188aac97d7..dee10042d2 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -37,6 +37,11 @@ jobs: chmod +x ./.github/workflows/run_gcp_benchmarks.sh ./.github/workflows/run_gcp_benchmarks.sh + - name: Cleanup + # Delete the branch directory on the Google Cloud instance + if: always() + run: | + ./.github/workflows/gcloud_ssh.sh " export BRANCH_NAME=${BRANCH_NAME} && rm -r -f $BRANCH_NAME" - name: Formatting Benchmark # Create a text file containing the benchmark results run: | @@ -50,8 +55,4 @@ jobs: message-path: benchmark.txt # The path to the message file to leave as a comment message-id: benchmark - - name: Cleanup - # Delete the branch directory on the Google Cloud instance - if: always() - run: | - ./.github/workflows/gcloud_ssh.sh " export BRANCH_NAME=${BRANCH_NAME} && rm -r -f $BRANCH_NAME" + From 11b65c9f68fed00bf34ded7df974c05f49551ebf Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 14 Jul 2023 19:06:00 -0500 Subject: [PATCH 146/174] Update gcloud_ssh.sh --- .github/workflows/gcloud_ssh.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/gcloud_ssh.sh b/.github/workflows/gcloud_ssh.sh index e0fc80ba95..ad67887bdf 100644 --- a/.github/workflows/gcloud_ssh.sh +++ b/.github/workflows/gcloud_ssh.sh @@ -7,7 +7,4 @@ PROJECT_ID="ucr-ursa-major-sridharan-lab" ZONE="us-central1-a" USER="root" INSTANCE="nullway-jmh" - -# Use the gcloud compute ssh command to run a command ($1) on the specified Google Cloud instance -# $1 is a positional parameter that represents the first argument given when calling this script gcloud compute ssh --project=$PROJECT_ID --zone=$ZONE $USER@$INSTANCE --command="$1" From 7de9274e84ad7b3513d0eb1ca11ec9a38ff4d3bf Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 14 Jul 2023 19:07:55 -0500 Subject: [PATCH 147/174] Update get_repo_details.sh --- .github/workflows/get_repo_details.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/get_repo_details.sh b/.github/workflows/get_repo_details.sh index 4406382b08..7312419b5d 100644 --- a/.github/workflows/get_repo_details.sh +++ b/.github/workflows/get_repo_details.sh @@ -10,17 +10,11 @@ GH_TOKEN="$1" PR_NUMBER="$2" REPO_NAME="$3" -# Use a curl command to retrieve the details of the pull request from the GitHub API -# The GH_TOKEN is used for authentication -# The output of the curl command is stored in the PR_DETAILS variable PR_DETAILS=$(curl -s -H "Authorization: token $GH_TOKEN" "https://api.github.com/repos/$REPO_NAME/pulls/$PR_NUMBER") -# Use the jq command to parse the JSON output of the curl command -# The full name of the repository and the branch name are extracted from the JSON and stored in the REPO_FULL_NAME and BRANCH_NAME variables respectively REPO_FULL_NAME=$(echo "$PR_DETAILS" | jq -r .head.repo.full_name) BRANCH_NAME=$(echo "$PR_DETAILS" | jq -r .head.ref) # Export the REPO_FULL_NAME and BRANCH_NAME variables -# The variables are appended to the $GITHUB_ENV file, making them available to subsequent steps in a GitHub Actions workflow echo "REPO_FULL_NAME=$REPO_FULL_NAME" >> $GITHUB_ENV echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV From a1c9b5071c9c48f3d14f243c9249a3e8ddb45ce7 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 14 Jul 2023 19:09:37 -0500 Subject: [PATCH 148/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index dee10042d2..5f507a13f5 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -8,31 +8,31 @@ on: jobs: setup: # Only run this job if a comment on a pull request contains '/benchmark' and is a PR on the uber/NullAway repository - if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') #&& github.repository == 'uber/NullAway' + if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') && github.repository == 'uber/NullAway' runs-on: ubuntu-latest permissions: write-all steps: - - name: Checkout repository # Checks out repository under $GITHUB_WORKSPACE + - name: Checkout repository uses: actions/checkout@v3 - - name: Set branch name #This step retrieves the repository branch details for the PR. + - name: Set branch name env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # The GitHub token is loaded from the secrets of repo + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | chmod +x ./.github/workflows/get_repo_details.sh ./.github/workflows/get_repo_details.sh "${{ secrets.GITHUB_TOKEN }}" "${{ github.event.issue.number }}" "${{ github.repository }}" - id: 'auth' - name: Authenticating # Authenticating with Google Cloud + name: Authenticating uses: 'google-github-actions/auth@v1' with: - credentials_json: '${{ secrets.GCP_SA_KEY_1 }}' # Google Cloud credentials are loaded from repo's secrets + credentials_json: '${{ secrets.GCP_SA_KEY_1 }}' - - name: Set up Google Cloud SDK # This step sets up Google Cloud SDK + - name: Set up Google Cloud SDK uses: google-github-actions/setup-gcloud@v1 - - name: Run benchmarks # This runs the benchmark script on GCP + - name: Run benchmarks run: | chmod +x ./.github/workflows/run_gcp_benchmarks.sh From 9b99d3a6d3fd4b2608803784df012c96ccf0c87f Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 14 Jul 2023 19:11:35 -0500 Subject: [PATCH 149/174] Update run_gcp_benchmarks.sh --- .github/workflows/run_gcp_benchmarks.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/run_gcp_benchmarks.sh b/.github/workflows/run_gcp_benchmarks.sh index 03ba8f30fb..b3ff27ac89 100644 --- a/.github/workflows/run_gcp_benchmarks.sh +++ b/.github/workflows/run_gcp_benchmarks.sh @@ -3,8 +3,6 @@ # This script is responsible for running benchmarks for a GitHub pull request and the main branch on Google Cloud Compute Engine (GCCE). -# Setting up a new directory named after the branch on GCCE and copying bash scripts into this directory -# The ssh command is made executable and then run with a command to export the branch name and make a new directory on the GCCE chmod +x ./.github/workflows/gcloud_ssh.sh ./.github/workflows/gcloud_ssh.sh "export BRANCH_NAME=${BRANCH_NAME} && mkdir $BRANCH_NAME" @@ -13,13 +11,10 @@ gcloud compute scp ./.github/workflows/run_pr_benchmarks.sh root@nullway-jmh:$BR gcloud compute scp ./.github/workflows/run_main_benchmarks.sh root@nullway-jmh:$BRANCH_NAME/ --zone=us-central1-a # Running the benchmark script for the pull request branch on GCCE -./.github/workflows/gcloud_ssh.sh " export BRANCH_NAME=${BRANCH_NAME} && export REPO_NAME=${REPO_FULL_NAME} && chmod +x $BRANCH_NAME/run_pr_benchmarks.sh && $BRANCH_NAME/run_pr_benchmarks.sh" +./.github/workflows/gcloud_ssh.sh " export BRANCH_NAME=${BRANCH_NAME} && export REPO_NAME=${REPO_FULL_NAME} && chmod +x $BRANCH_NAME/run_pr_benchmarks.sh && $BRANCH_NAME/run_pr_benchmarks.sh && cd && chmod +x $BRANCH_NAME/run_main_benchmarks.sh && $BRANCH_NAME/run_main_benchmarks.sh" # Copying the benchmark results from GCCE back to the Github runner for the PR branch gcloud compute scp root@instance-1:$BRANCH_NAME/pr/NullAway/jmh/build/results/jmh/results.txt ./pr_text.txt --zone=us-central1-a -# Running the benchmark script for the main branch on GCCE -./.github/workflows/gcloud_ssh.sh " export BRANCH_NAME=${BRANCH_NAME} && chmod +x $BRANCH_NAME/run_main_benchmarks.sh && $BRANCH_NAME/run_main_benchmarks.sh " - # Copying the benchmark results from GCCE back to the Github runner for the main branch gcloud compute scp root@instance-1:$BRANCH_NAME/main/NullAway/jmh/build/results/jmh/results.txt ./main_text.txt --zone=us-central1-a From 730a6c939010efe80b4738386dd741875afd6e7f Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 14 Jul 2023 19:12:11 -0500 Subject: [PATCH 150/174] Update run_main_benchmarks.sh --- .github/workflows/run_main_benchmarks.sh | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/run_main_benchmarks.sh b/.github/workflows/run_main_benchmarks.sh index 8690aabe19..c28e9231aa 100644 --- a/.github/workflows/run_main_benchmarks.sh +++ b/.github/workflows/run_main_benchmarks.sh @@ -1,19 +1,9 @@ #!/bin/bash -# This script is responsible for cloning the main repository from GitHub and running Java Microbenchmark Harness (JMH) benchmarks. - -# Change directory to the one named after the branch name. cd $BRANCH_NAME/ - -# Create a new directory called 'main' and navigate into it mkdir main cd main/ - -# Clone the main repository from GitHub git clone git@github.com:Uber/NullAway.git - -# Change directory into the newly cloned repository cd NullAway/ -# Run the JMH benchmarks using the Gradle Wrapper. ./gradlew jmh From 2e472d4213303f5a50ac829e9895e52f8444d7a0 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 14 Jul 2023 19:12:37 -0500 Subject: [PATCH 151/174] Update run_pr_benchmarks.sh --- .github/workflows/run_pr_benchmarks.sh | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/run_pr_benchmarks.sh b/.github/workflows/run_pr_benchmarks.sh index 61ab445b23..f711176899 100644 --- a/.github/workflows/run_pr_benchmarks.sh +++ b/.github/workflows/run_pr_benchmarks.sh @@ -1,20 +1,9 @@ #!/bin/bash -# This script is responsible for cloning a specific branch (the PR branch) from a GitHub repository and running Java Microbenchmark Harness (JMH) benchmarks. - -# Change directory to the one named after the branch name. cd $BRANCH_NAME/ - -# Create a new directory called 'pr' and navigate into it mkdir pr cd pr/ - -# Clone the specific branch from the GitHub repository. -# The repository and branch are specified by the REPO_FULL_NAME and BRANCH_NAME variables. git clone --branch $BRANCH_NAME --single-branch git@github.com:$REPO_NAME.git NullAway - -# Change directory into the newly cloned repository cd NullAway/ -# Run the JMH benchmarks using the Gradle Wrapper. ./gradlew jmh From 2dd58e6640d5ee6b19cb8198b7c000c7a92e44a2 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 14 Jul 2023 19:13:10 -0500 Subject: [PATCH 152/174] Update run_gcp_benchmarks.sh --- .github/workflows/run_gcp_benchmarks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_gcp_benchmarks.sh b/.github/workflows/run_gcp_benchmarks.sh index b3ff27ac89..6627133cf0 100644 --- a/.github/workflows/run_gcp_benchmarks.sh +++ b/.github/workflows/run_gcp_benchmarks.sh @@ -10,7 +10,7 @@ chmod +x ./.github/workflows/gcloud_ssh.sh gcloud compute scp ./.github/workflows/run_pr_benchmarks.sh root@nullway-jmh:$BRANCH_NAME/ --zone=us-central1-a gcloud compute scp ./.github/workflows/run_main_benchmarks.sh root@nullway-jmh:$BRANCH_NAME/ --zone=us-central1-a -# Running the benchmark script for the pull request branch on GCCE +# Running the benchmark script for the pull request branch and main branch on GCCE ./.github/workflows/gcloud_ssh.sh " export BRANCH_NAME=${BRANCH_NAME} && export REPO_NAME=${REPO_FULL_NAME} && chmod +x $BRANCH_NAME/run_pr_benchmarks.sh && $BRANCH_NAME/run_pr_benchmarks.sh && cd && chmod +x $BRANCH_NAME/run_main_benchmarks.sh && $BRANCH_NAME/run_main_benchmarks.sh" # Copying the benchmark results from GCCE back to the Github runner for the PR branch From 97ae3134af1c78008b6d6177db62addd08f5b1c2 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 14 Jul 2023 19:13:54 -0500 Subject: [PATCH 153/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 5f507a13f5..3ed2aef7a7 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -8,7 +8,7 @@ on: jobs: setup: # Only run this job if a comment on a pull request contains '/benchmark' and is a PR on the uber/NullAway repository - if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') && github.repository == 'uber/NullAway' + if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') #&& github.repository == 'uber/NullAway' runs-on: ubuntu-latest permissions: write-all From 90f1cb130e0dee48dcc145d5d43d0db1d171a2e9 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 14 Jul 2023 21:02:50 -0500 Subject: [PATCH 154/174] Update run_gcp_benchmarks.sh --- .github/workflows/run_gcp_benchmarks.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_gcp_benchmarks.sh b/.github/workflows/run_gcp_benchmarks.sh index 6627133cf0..059e72c4f6 100644 --- a/.github/workflows/run_gcp_benchmarks.sh +++ b/.github/workflows/run_gcp_benchmarks.sh @@ -14,7 +14,7 @@ gcloud compute scp ./.github/workflows/run_main_benchmarks.sh root@nullway-jmh:$ ./.github/workflows/gcloud_ssh.sh " export BRANCH_NAME=${BRANCH_NAME} && export REPO_NAME=${REPO_FULL_NAME} && chmod +x $BRANCH_NAME/run_pr_benchmarks.sh && $BRANCH_NAME/run_pr_benchmarks.sh && cd && chmod +x $BRANCH_NAME/run_main_benchmarks.sh && $BRANCH_NAME/run_main_benchmarks.sh" # Copying the benchmark results from GCCE back to the Github runner for the PR branch -gcloud compute scp root@instance-1:$BRANCH_NAME/pr/NullAway/jmh/build/results/jmh/results.txt ./pr_text.txt --zone=us-central1-a +gcloud compute scp root@nullway-jmh:$BRANCH_NAME/pr/NullAway/jmh/build/results/jmh/results.txt ./pr_text.txt --zone=us-central1-a # Copying the benchmark results from GCCE back to the Github runner for the main branch -gcloud compute scp root@instance-1:$BRANCH_NAME/main/NullAway/jmh/build/results/jmh/results.txt ./main_text.txt --zone=us-central1-a +gcloud compute scp root@nullway-jmh:$BRANCH_NAME/main/NullAway/jmh/build/results/jmh/results.txt ./main_text.txt --zone=us-central1-a From 64c70a6e0890502f4c29f15a4ad297452d070d2e Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 14 Jul 2023 21:05:21 -0500 Subject: [PATCH 155/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 3ed2aef7a7..6092239663 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -8,7 +8,7 @@ on: jobs: setup: # Only run this job if a comment on a pull request contains '/benchmark' and is a PR on the uber/NullAway repository - if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') #&& github.repository == 'uber/NullAway' + if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') && github.repository == 'uber/NullAway' runs-on: ubuntu-latest permissions: write-all @@ -27,7 +27,7 @@ jobs: name: Authenticating uses: 'google-github-actions/auth@v1' with: - credentials_json: '${{ secrets.GCP_SA_KEY_1 }}' + credentials_json: '${{ secrets.GCP_SA_KEY }}' - name: Set up Google Cloud SDK uses: google-github-actions/setup-gcloud@v1 From 8a865bbaa1ec818c225d35a9e7e3bc4745d5d484 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 14 Jul 2023 21:10:02 -0500 Subject: [PATCH 156/174] Update run_gcp_benchmarks.sh --- .github/workflows/run_gcp_benchmarks.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/run_gcp_benchmarks.sh b/.github/workflows/run_gcp_benchmarks.sh index 059e72c4f6..996cecf46a 100644 --- a/.github/workflows/run_gcp_benchmarks.sh +++ b/.github/workflows/run_gcp_benchmarks.sh @@ -6,6 +6,9 @@ chmod +x ./.github/workflows/gcloud_ssh.sh ./.github/workflows/gcloud_ssh.sh "export BRANCH_NAME=${BRANCH_NAME} && mkdir $BRANCH_NAME" +gcloud compute scp root@nullway-jmh:test.txt ./test.txt --zone=us-central1-a + + # Using gcloud compute scp to copy the bash scripts that will run the benchmarks onto the GCCE gcloud compute scp ./.github/workflows/run_pr_benchmarks.sh root@nullway-jmh:$BRANCH_NAME/ --zone=us-central1-a gcloud compute scp ./.github/workflows/run_main_benchmarks.sh root@nullway-jmh:$BRANCH_NAME/ --zone=us-central1-a From cf959138e3621805b035ffa1411a898a69a9760f Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 14 Jul 2023 21:11:58 -0500 Subject: [PATCH 157/174] Update run_gcp_benchmarks.sh --- .github/workflows/run_gcp_benchmarks.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/run_gcp_benchmarks.sh b/.github/workflows/run_gcp_benchmarks.sh index 996cecf46a..059e72c4f6 100644 --- a/.github/workflows/run_gcp_benchmarks.sh +++ b/.github/workflows/run_gcp_benchmarks.sh @@ -6,9 +6,6 @@ chmod +x ./.github/workflows/gcloud_ssh.sh ./.github/workflows/gcloud_ssh.sh "export BRANCH_NAME=${BRANCH_NAME} && mkdir $BRANCH_NAME" -gcloud compute scp root@nullway-jmh:test.txt ./test.txt --zone=us-central1-a - - # Using gcloud compute scp to copy the bash scripts that will run the benchmarks onto the GCCE gcloud compute scp ./.github/workflows/run_pr_benchmarks.sh root@nullway-jmh:$BRANCH_NAME/ --zone=us-central1-a gcloud compute scp ./.github/workflows/run_main_benchmarks.sh root@nullway-jmh:$BRANCH_NAME/ --zone=us-central1-a From 21c030c726037d248ef89d1059c91b3242ded1af Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 14 Jul 2023 21:14:14 -0500 Subject: [PATCH 158/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 6092239663..da6943af91 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -31,6 +31,16 @@ jobs: - name: Set up Google Cloud SDK uses: google-github-actions/setup-gcloud@v1 + + - name: Test + run: gcloud compute scp root@nullway-jmh:test.txt ./test.txt --zone=us-central1-a + + - name: Comment Benchmark + uses: mshick/add-pr-comment@v2 + if: always() # This step is for adding the comment + with: + message-path: test.txt # The path to the message file to leave as a comment + message-id: test - name: Run benchmarks run: | From 95eb12e7e595b1073386a157ee69ad782732b596 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 14 Jul 2023 21:14:54 -0500 Subject: [PATCH 159/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index da6943af91..1569a69c4c 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -8,7 +8,7 @@ on: jobs: setup: # Only run this job if a comment on a pull request contains '/benchmark' and is a PR on the uber/NullAway repository - if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') && github.repository == 'uber/NullAway' + if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') #&& github.repository == 'uber/NullAway' runs-on: ubuntu-latest permissions: write-all From ca7f20c1f9c8d3d05de3705004157d5deb2c932d Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 14 Jul 2023 21:20:41 -0500 Subject: [PATCH 160/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 1569a69c4c..536a117539 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -33,7 +33,7 @@ jobs: uses: google-github-actions/setup-gcloud@v1 - name: Test - run: gcloud compute scp root@nullway-jmh:test.txt ./test.txt --zone=us-central1-a + run: gcloud compute scp --project="ucr-ursa-major-sridharan-lab" root@nullway-jmh:test.txt ./test.txt --zone=us-central1-a - name: Comment Benchmark uses: mshick/add-pr-comment@v2 From 12d16ded6b0fc02769e45e67ffe176aab4325854 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 14 Jul 2023 21:22:10 -0500 Subject: [PATCH 161/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 536a117539..086c972dad 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -27,13 +27,13 @@ jobs: name: Authenticating uses: 'google-github-actions/auth@v1' with: - credentials_json: '${{ secrets.GCP_SA_KEY }}' + credentials_json: '${{ secrets.GCP_SA_KEY_1 }}' - name: Set up Google Cloud SDK uses: google-github-actions/setup-gcloud@v1 - name: Test - run: gcloud compute scp --project="ucr-ursa-major-sridharan-lab" root@nullway-jmh:test.txt ./test.txt --zone=us-central1-a + run: gcloud compute scp root@nullway-jmh:test.txt ./test.txt --zone=us-central1-a - name: Comment Benchmark uses: mshick/add-pr-comment@v2 From 1c4681d91c7323a3eba8af25d4bb1f1ece2c4f67 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 14 Jul 2023 21:24:16 -0500 Subject: [PATCH 162/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 086c972dad..21b9654e28 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -32,16 +32,6 @@ jobs: - name: Set up Google Cloud SDK uses: google-github-actions/setup-gcloud@v1 - - name: Test - run: gcloud compute scp root@nullway-jmh:test.txt ./test.txt --zone=us-central1-a - - - name: Comment Benchmark - uses: mshick/add-pr-comment@v2 - if: always() # This step is for adding the comment - with: - message-path: test.txt # The path to the message file to leave as a comment - message-id: test - - name: Run benchmarks run: | From 16231f5443871e53c26fb4d49e3d73bfabd1f9f9 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 14 Jul 2023 21:25:34 -0500 Subject: [PATCH 163/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 21b9654e28..8f8640079f 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -34,9 +34,9 @@ jobs: - name: Run benchmarks run: | - chmod +x ./.github/workflows/run_gcp_benchmarks.sh ./.github/workflows/run_gcp_benchmarks.sh + - name: Cleanup # Delete the branch directory on the Google Cloud instance if: always() @@ -45,7 +45,6 @@ jobs: - name: Formatting Benchmark # Create a text file containing the benchmark results run: | - (echo 'Main Benchmark:'; echo '```' ; cat main_text.txt; echo '```'; echo 'PR Benchmark:'; echo '```' ; cat pr_text.txt; echo '```') > benchmark.txt - name: Comment Benchmark From 52f94ca463df31e24b53a1003811d922de5f80db Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 14 Jul 2023 21:28:34 -0500 Subject: [PATCH 164/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 8f8640079f..3f92b1c026 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -8,7 +8,7 @@ on: jobs: setup: # Only run this job if a comment on a pull request contains '/benchmark' and is a PR on the uber/NullAway repository - if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') #&& github.repository == 'uber/NullAway' + if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') && github.repository == 'uber/NullAway' runs-on: ubuntu-latest permissions: write-all From 75c6ca9a950d41146d771163242396b2adcb392f Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 14 Jul 2023 21:58:33 -0500 Subject: [PATCH 165/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 3f92b1c026..bc3d8d42c0 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -32,6 +32,9 @@ jobs: - name: Set up Google Cloud SDK uses: google-github-actions/setup-gcloud@v1 + - name: Start VM + run: gcloud compute instances start nullway-jmh + - name: Run benchmarks run: | chmod +x ./.github/workflows/run_gcp_benchmarks.sh @@ -53,5 +56,7 @@ jobs: with: message-path: benchmark.txt # The path to the message file to leave as a comment message-id: benchmark + - name: Stop VM + run: gcloud compute instances stop nullway-jmh From dc7588bb4756ca59c2b7743166517bfc7f55ac7f Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 14 Jul 2023 21:58:42 -0500 Subject: [PATCH 166/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index bc3d8d42c0..c6a6511628 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -8,7 +8,7 @@ on: jobs: setup: # Only run this job if a comment on a pull request contains '/benchmark' and is a PR on the uber/NullAway repository - if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') && github.repository == 'uber/NullAway' + if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') #&& github.repository == 'uber/NullAway' runs-on: ubuntu-latest permissions: write-all From 092ed4de4304cf5b8cb410149d661b64715aa11c Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 14 Jul 2023 22:00:15 -0500 Subject: [PATCH 167/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index c6a6511628..028549daff 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -33,7 +33,7 @@ jobs: uses: google-github-actions/setup-gcloud@v1 - name: Start VM - run: gcloud compute instances start nullway-jmh + run: gcloud compute instances start nullway-jmh --zone=us-central1-a - name: Run benchmarks run: | @@ -57,6 +57,7 @@ jobs: message-path: benchmark.txt # The path to the message file to leave as a comment message-id: benchmark - name: Stop VM - run: gcloud compute instances stop nullway-jmh + run: gcloud compute instances stop nullway-jmh --zone=us-central1-a + From 828a29daa8b181a4c8a3d208b8790edfb56d6da4 Mon Sep 17 00:00:00 2001 From: armughan11 <52311490+armughan11@users.noreply.github.com> Date: Fri, 14 Jul 2023 22:02:41 -0500 Subject: [PATCH 168/174] Added VM start and stop commands --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 028549daff..cfbd3c55d4 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -8,7 +8,7 @@ on: jobs: setup: # Only run this job if a comment on a pull request contains '/benchmark' and is a PR on the uber/NullAway repository - if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') #&& github.repository == 'uber/NullAway' + if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') && github.repository == 'uber/NullAway' runs-on: ubuntu-latest permissions: write-all From 006c6249585d9d62197c4fd0a6e163c54680f89d Mon Sep 17 00:00:00 2001 From: Manu Sridharan Date: Sat, 15 Jul 2023 15:49:59 -0700 Subject: [PATCH 169/174] minor tweaks --- .github/workflows/gcloud_ssh.sh | 1 + .github/workflows/get_repo_details.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gcloud_ssh.sh b/.github/workflows/gcloud_ssh.sh index ad67887bdf..80d9e68795 100644 --- a/.github/workflows/gcloud_ssh.sh +++ b/.github/workflows/gcloud_ssh.sh @@ -7,4 +7,5 @@ PROJECT_ID="ucr-ursa-major-sridharan-lab" ZONE="us-central1-a" USER="root" INSTANCE="nullway-jmh" + gcloud compute ssh --project=$PROJECT_ID --zone=$ZONE $USER@$INSTANCE --command="$1" diff --git a/.github/workflows/get_repo_details.sh b/.github/workflows/get_repo_details.sh index 7312419b5d..55521665f4 100644 --- a/.github/workflows/get_repo_details.sh +++ b/.github/workflows/get_repo_details.sh @@ -15,6 +15,6 @@ PR_DETAILS=$(curl -s -H "Authorization: token $GH_TOKEN" "https://api.github.com REPO_FULL_NAME=$(echo "$PR_DETAILS" | jq -r .head.repo.full_name) BRANCH_NAME=$(echo "$PR_DETAILS" | jq -r .head.ref) -# Export the REPO_FULL_NAME and BRANCH_NAME variables +# Export vars to GITHUB_ENV so they can be used by later scripts echo "REPO_FULL_NAME=$REPO_FULL_NAME" >> $GITHUB_ENV echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV From a0b77f07ec6fa7e1cd4381c49e1d8c8113c066f7 Mon Sep 17 00:00:00 2001 From: Md Armughanuddin <52311490+armughan11@users.noreply.github.com> Date: Sat, 15 Jul 2023 17:55:31 -0500 Subject: [PATCH 170/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index cfbd3c55d4..f15cca1675 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -57,6 +57,7 @@ jobs: message-path: benchmark.txt # The path to the message file to leave as a comment message-id: benchmark - name: Stop VM + if: always() run: gcloud compute instances stop nullway-jmh --zone=us-central1-a From c9632dedffe993e24a23e3437487cb31518cab32 Mon Sep 17 00:00:00 2001 From: Manu Sridharan Date: Mon, 17 Jul 2023 14:39:00 -0700 Subject: [PATCH 171/174] change job name --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index f15cca1675..e580fd78a5 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -6,7 +6,7 @@ on: types: [created] jobs: - setup: + benchmarking: # Only run this job if a comment on a pull request contains '/benchmark' and is a PR on the uber/NullAway repository if: github.event.issue.pull_request && contains(github.event.comment.body, '/benchmark') && github.repository == 'uber/NullAway' runs-on: ubuntu-latest From 1d1b0509cede945c012bd9627b712b2eb50b19be Mon Sep 17 00:00:00 2001 From: Manu Sridharan Date: Mon, 17 Jul 2023 15:04:50 -0700 Subject: [PATCH 172/174] tweak text --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index e580fd78a5..76a2c19982 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -48,7 +48,7 @@ jobs: - name: Formatting Benchmark # Create a text file containing the benchmark results run: | - (echo 'Main Benchmark:'; echo '```' ; cat main_text.txt; echo '```'; echo 'PR Benchmark:'; echo '```' ; cat pr_text.txt; echo '```') > benchmark.txt + (echo 'Main Branch:'; echo '```' ; cat main_text.txt; echo '```'; echo 'With This PR:'; echo '```' ; cat pr_text.txt; echo '```') > benchmark.txt - name: Comment Benchmark uses: mshick/add-pr-comment@v2 From 5d3284669cdedbe4a7bc3bfe99bacd066bcf107d Mon Sep 17 00:00:00 2001 From: Md Armughanuddin <52311490+armughan11@users.noreply.github.com> Date: Mon, 17 Jul 2023 17:59:02 -0500 Subject: [PATCH 173/174] Update jmh-benchmark.yml --- .github/workflows/jmh-benchmark.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 76a2c19982..0be95bbb1a 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -13,6 +13,12 @@ jobs: permissions: write-all steps: + - name: Job Invocation + uses: peter-evans/create-or-update-comment@v3 + with: + comment-id: ${{ github.event.comment.id }} + reactions: '+1' + - name: Checkout repository uses: actions/checkout@v3 From 1b07f0d273cad52e005e3444f061d0ccfb44c0a2 Mon Sep 17 00:00:00 2001 From: Manu Sridharan Date: Mon, 17 Jul 2023 16:32:59 -0700 Subject: [PATCH 174/174] change step name --- .github/workflows/jmh-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 0be95bbb1a..858a411306 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -13,7 +13,7 @@ jobs: permissions: write-all steps: - - name: Job Invocation + - name: Add reaction uses: peter-evans/create-or-update-comment@v3 with: comment-id: ${{ github.event.comment.id }}