|
| 1 | +name: Binding Perf Tests |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + pull_request: |
| 7 | + description: The pull request number to run the perf tests. The workflow compares the specified pull request with the trunk. |
| 8 | + required: true |
| 9 | + |
| 10 | +jobs: |
| 11 | + jikesrvm-perf-compare: |
| 12 | + runs-on: [self-hosted, Linux, freq-scaling-off] |
| 13 | + steps: |
| 14 | + - run: echo "PERF_PR=${{ github.event.inputs.pull_request }}" >> $GITHUB_ENV |
| 15 | + - name: Check Revisions |
| 16 | + |
| 17 | + with: |
| 18 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 19 | + pull_request: ${{ env.PERF_PR }} |
| 20 | + default_env: 'JIKESRVM_BINDING_TRUNK_REF=master,MMTK_CORE_TRUNK_REF=master,JIKESRVM_BINDING_BRANCH_REF=master,MMTK_CORE_BRANCH_REF=${{ github.event.pull_request.head.sha }}' |
| 21 | + # Trunk |
| 22 | + # - binding |
| 23 | + - name: Checkout JikesRVM Binding Trunk |
| 24 | + uses: actions/checkout@v2 |
| 25 | + with: |
| 26 | + repository: mmtk/mmtk-jikesrvm |
| 27 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 28 | + path: mmtk-jikesrvm-trunk |
| 29 | + submodules: true |
| 30 | + ref: ${{ env.JIKESRVM_BINDING_TRUNK_REF }} |
| 31 | + # - core |
| 32 | + - name: Checkout MMTk Core |
| 33 | + uses: actions/checkout@v2 |
| 34 | + with: |
| 35 | + ref: ${{ env.MMTK_CORE_TRUNK_REF }} |
| 36 | + path: mmtk-core-trunk |
| 37 | + # Branch |
| 38 | + # - binding |
| 39 | + - name: Checkout JikesRVM Binding Branch |
| 40 | + uses: actions/checkout@v2 |
| 41 | + with: |
| 42 | + repository: mmtk/mmtk-jikesrvm |
| 43 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 44 | + path: mmtk-jikesrvm-branch |
| 45 | + submodules: true |
| 46 | + ref: ${{ env.JIKESRVM_BINDING_BRANCH_REF }} |
| 47 | + # - core |
| 48 | + - name: Checkout MMTk Core |
| 49 | + uses: actions/checkout@v2 |
| 50 | + with: |
| 51 | + ref: ${{ env.MMTK_CORE_BRANCH_REF }} |
| 52 | + path: mmtk-core-branch |
| 53 | + # Checkout perf-kit |
| 54 | + - name: Checkout Perf Kit |
| 55 | + uses: actions/checkout@v2 |
| 56 | + with: |
| 57 | + repository: mmtk/ci-perf-kit |
| 58 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 59 | + ref: "0.6.5" |
| 60 | + path: ci-perf-kit |
| 61 | + submodules: true |
| 62 | + # setup |
| 63 | + # Use rust-toolchain in the trunk (it doesnt matter much - if the toolchains defined in the trunk and the branch are different, we cant run anyway) |
| 64 | + - name: Setup Rust Toolchain |
| 65 | + run: echo "RUSTUP_TOOLCHAIN=`cat mmtk-core-trunk/rust-toolchain`" >> $GITHUB_ENV |
| 66 | + - name: Setup |
| 67 | + run: | |
| 68 | + mkdir -p ci-perf-kit/running/benchmarks/dacapo |
| 69 | + cp /usr/share/benchmarks/dacapo/dacapo-2006-10-MR2.jar ci-perf-kit/running/benchmarks/dacapo/ |
| 70 | + # run compare |
| 71 | + |
| 72 | + with: |
| 73 | + github-token: ${{ secrets.CI_ACCESS_TOKEN }} |
| 74 | + repository: 'mmtk/mmtk-core' |
| 75 | + number: ${{ env.PERF_PR }} |
| 76 | + id: jikesrvm-perf-compare-comment |
| 77 | + message: 'Running benchmarks for JikesRVM...' |
| 78 | + recreate: true |
| 79 | + - name: Compare Performance |
| 80 | + id: run |
| 81 | + run: | |
| 82 | + JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64 ./ci-perf-kit/scripts/jikesrvm-compare.sh mmtk-jikesrvm-trunk/ mmtk-core-trunk/ mmtk-jikesrvm-branch/ mmtk-core-branch/ jikesrvm-compare-report.md |
| 83 | + # set report.md to output |
| 84 | + - uses: pCYSl5EDgo/cat@master |
| 85 | + id: cat |
| 86 | + with: |
| 87 | + path: jikesrvm-compare-report.md |
| 88 | + # upload run results |
| 89 | + - uses: actions/upload-artifact@v2 |
| 90 | + with: |
| 91 | + name: jikesrvm-log |
| 92 | + path: ci-perf-kit/running/results/log |
| 93 | + - uses: actions/upload-artifact@v2 |
| 94 | + with: |
| 95 | + name: jikesrvm-compare-report.md |
| 96 | + path: jikesrvm-compare-report.md |
| 97 | + # report |
| 98 | + |
| 99 | + if: always() |
| 100 | + with: |
| 101 | + github-token: ${{ secrets.CI_ACCESS_TOKEN }} |
| 102 | + repository: 'mmtk/mmtk-core' |
| 103 | + number: ${{ env.PERF_PR }} |
| 104 | + id: jikesrvm-perf-compare-comment |
| 105 | + message: ${{ steps.cat.outputs.text }} |
| 106 | + append: true |
| 107 | + # Cleanup logs (this is necessary for self-hosted runners) |
| 108 | + # [`always()`](https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#always) ensures we clean up the logs even if some steps fail |
| 109 | + - name: Clean up logs and reports |
| 110 | + if: always() |
| 111 | + run: | |
| 112 | + rm -rf ci-perf-kit/running/results/log/* |
| 113 | + rm jikesrvm-compare-report.md |
| 114 | +
|
| 115 | + openjdk-perf-compare: |
| 116 | + runs-on: [self-hosted, Linux, freq-scaling-off] |
| 117 | + steps: |
| 118 | + - run: echo "PERF_PR=${{ github.event.inputs.pull_request }}" >> $GITHUB_ENV |
| 119 | + - name: Check Revisions |
| 120 | + |
| 121 | + with: |
| 122 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 123 | + pull_request: ${{ env.PERF_PR }} |
| 124 | + default_env: 'OPENJDK_BINDING_TRUNK_REF=master,MMTK_CORE_TRUNK_REF=master,OPENJDK_BINDING_BRANCH_REF=master,MMTK_CORE_BRANCH_REF=${{ github.event.pull_request.head.sha }}' |
| 125 | + # Trunk |
| 126 | + # - binding |
| 127 | + - name: Checkout OpenJDK Binding Trunk |
| 128 | + uses: actions/checkout@v2 |
| 129 | + with: |
| 130 | + repository: mmtk/mmtk-openjdk |
| 131 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 132 | + path: mmtk-openjdk-trunk |
| 133 | + submodules: true |
| 134 | + ref: ${{ env.OPENJDK_BINDING_TRUNK_REF }} |
| 135 | + # -core |
| 136 | + - name: Checkout MMTk Core |
| 137 | + uses: actions/checkout@v2 |
| 138 | + with: |
| 139 | + ref: ${{ env.MMTK_CORE_TRUNK_REF }} |
| 140 | + path: mmtk-core-trunk |
| 141 | + # Branch |
| 142 | + # - binding |
| 143 | + - name: Checkout OpenJDK Binding Branch |
| 144 | + uses: actions/checkout@v2 |
| 145 | + with: |
| 146 | + repository: mmtk/mmtk-openjdk |
| 147 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 148 | + path: mmtk-openjdk-branch |
| 149 | + submodules: true |
| 150 | + ref: ${{ env.OPENJDK_BINDING_BRANCH_REF }} |
| 151 | + # - core |
| 152 | + - name: Checkout MMTk Core |
| 153 | + uses: actions/checkout@v2 |
| 154 | + with: |
| 155 | + ref: ${{ env.MMTK_CORE_BRANCH_REF }} |
| 156 | + path: mmtk-core-branch |
| 157 | + # checkout perf-kit |
| 158 | + - name: Checkout Perf Kit |
| 159 | + uses: actions/checkout@v2 |
| 160 | + with: |
| 161 | + repository: mmtk/ci-perf-kit |
| 162 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 163 | + ref: "0.6.5" |
| 164 | + path: ci-perf-kit |
| 165 | + submodules: true |
| 166 | + # setup |
| 167 | + # Use rust-toolchain in the trunk (it doesnt matter much - if the toolchains defined in the trunk and the branch are different, we cant run anyway) |
| 168 | + - name: Setup Rust Toolchain |
| 169 | + run: echo "RUSTUP_TOOLCHAIN=`cat mmtk-core-trunk/rust-toolchain`" >> $GITHUB_ENV |
| 170 | + - name: Setup |
| 171 | + run: | |
| 172 | + mkdir -p ci-perf-kit/running/benchmarks/dacapo |
| 173 | + cp /usr/share/benchmarks/dacapo/dacapo-2006-10-MR2.jar ci-perf-kit/running/benchmarks/dacapo/ |
| 174 | + # run compare |
| 175 | + |
| 176 | + with: |
| 177 | + github-token: ${{ secrets.CI_ACCESS_TOKEN }} |
| 178 | + repository: 'mmtk/mmtk-core' |
| 179 | + number: ${{ env.PERF_PR }} |
| 180 | + id: openjdk-perf-compare-comment |
| 181 | + message: 'Running benchmarks for OpenJDK...' |
| 182 | + recreate: true |
| 183 | + - name: Compare Performance |
| 184 | + id: run |
| 185 | + run: | |
| 186 | + ./ci-perf-kit/scripts/openjdk-compare.sh mmtk-openjdk-trunk/ mmtk-core-trunk/ mmtk-openjdk-branch/ mmtk-core-branch/ openjdk-compare-report.md |
| 187 | + # set report.md to output |
| 188 | + - uses: pCYSl5EDgo/cat@master |
| 189 | + id: cat |
| 190 | + with: |
| 191 | + path: openjdk-compare-report.md |
| 192 | + # upload run results |
| 193 | + - uses: actions/upload-artifact@v2 |
| 194 | + with: |
| 195 | + name: openjdk-log |
| 196 | + path: ci-perf-kit/running/results/log |
| 197 | + - uses: actions/upload-artifact@v2 |
| 198 | + with: |
| 199 | + name: openjdk-compare-report.md |
| 200 | + path: openjdk-compare-report.md |
| 201 | + # report |
| 202 | + |
| 203 | + if: always() |
| 204 | + with: |
| 205 | + github-token: ${{ secrets.CI_ACCESS_TOKEN }} |
| 206 | + repository: 'mmtk/mmtk-core' |
| 207 | + number: ${{ env.PERF_PR }} |
| 208 | + id: openjdk-perf-compare-comment |
| 209 | + message: ${{ steps.cat.outputs.text }} |
| 210 | + append: true |
| 211 | + # Cleanup logs (this is necessary for self-hosted runners) |
| 212 | + - name: Clean up logs and reports |
| 213 | + if: always() |
| 214 | + run: | |
| 215 | + rm -rf ci-perf-kit/running/results/log/* |
| 216 | + rm openjdk-compare-report.md |
0 commit comments