mmtk 0.3.2

MMTk is a framework for the design and implementation of high-performance and portable memory managers.
Documentation
name: Post Code Review Checks (Micro Benchmarks)

on:
  pull_request:
    types: [opened, synchronize, reopened, labeled]
    branches:
      - master

jobs:
  openjdk-microbm:
    runs-on: [self-hosted, Linux, freq-scaling-off]
    if: contains(github.event.pull_request.labels.*.name, 'PR-benchmarking')
    steps:
      - name: Check Revisions
        uses: qinsoon/comment-env-vars@1.0.2
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          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 }}'
      # Trunk
      # - binding
      - name: Checkout OpenJDK Binding Trunk
        uses: actions/checkout@v2
        with:
          repository: mmtk/mmtk-openjdk
          token: ${{ secrets.GITHUB_TOKEN }}
          path: mmtk-openjdk-trunk
          submodules: true
          ref: ${{ env.OPENJDK_BINDING_TRUNK_REF }}
      # -core
      - name: Checkout MMTk Core
        uses: actions/checkout@v2
        with:
          ref: ${{ env.MMTK_CORE_TRUNK_REF }}
          path: mmtk-core-trunk
      # Branch
      # - binding
      - name: Checkout OpenJDK Binding Branch
        uses: actions/checkout@v2
        with:
          repository: mmtk/mmtk-openjdk
          token: ${{ secrets.GITHUB_TOKEN }}
          path: mmtk-openjdk-branch
          submodules: true
          ref: ${{ env.OPENJDK_BINDING_BRANCH_REF }}
      # - core
      - name: Checkout MMTk Core
        uses: actions/checkout@v2
        with:
          ref: ${{ env.MMTK_CORE_BRANCH_REF }}
          path: mmtk-core-branch
      # checkout perf-kit
      - name: Checkout Perf Kit
        uses: actions/checkout@v2
        with:
          repository: mmtk/ci-perf-kit
          token: ${{ secrets.GITHUB_TOKEN }}
          ref: "0.5.2"
          path: ci-perf-kit
          submodules: true
      # 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)
      - name: Setup Rust Toolchain
        run: echo "RUSTUP_TOOLCHAIN=`cat mmtk-core-trunk/rust-toolchain`" >> $GITHUB_ENV          
      # run compare
      - name: Compare Performance
        id: run
        run: |
          ./ci-perf-kit/scripts/openjdk-micro-bm.sh mmtk-openjdk-trunk/ mmtk-core-trunk/ mmtk-openjdk-branch/ mmtk-core-branch/ openjdk-rebench-report.md
      # set report.md to output
      - uses: pCYSl5EDgo/cat@master
        id: cat
        with:
          path: openjdk-rebench-report.md
      # upload run results
      - uses: actions/upload-artifact@v2
        with:
          name: openjdk-rebench-data
          path: ci-perf-kit/microbm/ci.data
      - uses: actions/upload-artifact@v2
        with:
          name: openjdk-rebench-report.md
          path: openjdk-rebench-report.md
      # report
      - name: Result
        if: always()
        uses: thollander/actions-comment-pull-request@master
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          message: ${{ steps.cat.outputs.text }}
      # Cleanup logs (this is necessary for self-hosted runners)
      - name: Clean up logs and reports
        if: always()
        run: |
          rm -f ci-perf-kit/microbm/*.data
          rm openjdk-rebench-report.md