From c2f7a5dce2fe6df0ca13dbc8c8b7674492d3d82e Mon Sep 17 00:00:00 2001 From: pouryafard75 Date: Sat, 10 Feb 2024 21:08:17 -0500 Subject: [PATCH] Create benchmark.yml Update benchmark.yml Update benchmark.yml Update benchmark.yml Update benchmark.yml Update benchmark.yml Update benchmark.yml Update benchmark.yml Update benchmark.yml Update benchmark.yml Update benchmark.yml Update benchmark.yml Update benchmark.yml Update benchmark.yml Update benchmark.yml Update benchmark.yml Update benchmark.yml Update benchmark.yml Update benchmark.yml Update benchmark.yml Update benchmark.yml Update benchmark.yml Update benchmark.yml Add Benchmark workflow --- .github/workflows/benchmark.yml | 51 +++++++++++++++++++++++++++++++++ 1 file changed, 51 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 000000000..96afdcee2 --- /dev/null +++ b/.github/workflows/benchmark.yml @@ -0,0 +1,51 @@ +name: Benchmark + +on: + workflow_dispatch: + repository_dispatch: + types: [run-project] + +jobs: + build-and-run-project: + runs-on: ubuntu-latest + + env: + OAuthToken: ${{ secrets.OAUTHTOKEN }} + releaseVersion: CI-benchmark-SNAPSHOT + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + - name: Checkout code + uses: actions/checkout@v2 + + # Build the project and publish to Maven local + - name: Publish to Maven local + run: ./gradlew publishToMavenLocal -x test -x javadoc -Pversion=${{ env.releaseVersion }} + + # Clone the DiffBenchmark repository and run benchmarks + - name: Clone DiffBenchmark repository and run benchmarks + run: | + git clone -b automation --depth 1 --single-branch https://github.com/pouryafard75/DiffBenchmark.git && + cd DiffBenchmark && + ./gradlew -b build.gradle clean run \ + -PrefactoringMinerVersion=${{ env.releaseVersion }} \ + -DrefactoringMinerPath=$(pwd)/.. \ + -PmainClass=benchmark.CmdRunner \ + --args="refOracle defects4j" + + - name: Zip directory + run: | + zip -r Stats.zip DiffBenchmark/out/oracle/ + + + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: Stats + path: Stats.zip