|
| 1 | +name: "Test Normal Build" |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_call: |
| 5 | + inputs: |
| 6 | + config-file: |
| 7 | + description: 'Config file name' |
| 8 | + required: true |
| 9 | + type: string |
| 10 | + heap-factor: |
| 11 | + description: 'Heap factor' |
| 12 | + required: true |
| 13 | + type: string |
| 14 | + |
| 15 | +env: |
| 16 | + DACAPO_VERSION: dacapo-23.9-RC3-chopin |
| 17 | + DACAPO_FILE: dacapo-23.9-RC3-chopin.zip |
| 18 | + DACAPO_DOWNLOAD_URL: https://download.dacapobench.org/chopin/dacapo-23.9-RC3-chopin.zip |
| 19 | + |
| 20 | +jobs: |
| 21 | + cache-dacapo: |
| 22 | + runs-on: ubuntu-22.04 |
| 23 | + steps: |
| 24 | + - name: Check ${{ env.DACAPO_VERSION }} cache |
| 25 | + id: check-cache |
| 26 | + uses: actions/cache@v3 |
| 27 | + with: |
| 28 | + path: dacapo/${{ env.DACAPO_FILE }} |
| 29 | + key: ${{ env.DACAPO_VERSION }} |
| 30 | + lookup-only: true |
| 31 | + - name: Install ${{ env.DACAPO_VERSION }} |
| 32 | + if: steps.check-cache.outputs.cache-hit != 'true' |
| 33 | + run: | |
| 34 | + mkdir -p dacapo |
| 35 | + pushd dacapo |
| 36 | + wget -q "${{ env.DACAPO_DOWNLOAD_URL }}" -O ${{ env.DACAPO_FILE }} |
| 37 | + popd |
| 38 | +
|
| 39 | + test-normal-build: |
| 40 | + needs: |
| 41 | + - cache-dacapo |
| 42 | + runs-on: ubuntu-22.04 |
| 43 | + strategy: |
| 44 | + fail-fast: false |
| 45 | + matrix: |
| 46 | + debug-level: ["fastdebug", "release"] |
| 47 | + benchmark: |
| 48 | + - avrora |
| 49 | + - batik |
| 50 | + - biojava |
| 51 | + - cassandra |
| 52 | + - eclipse |
| 53 | + - fop |
| 54 | + - graphchi |
| 55 | + - h2 |
| 56 | + - h2o |
| 57 | + - jme |
| 58 | + - jython |
| 59 | + - kafka |
| 60 | + - luindex |
| 61 | + - lusearch |
| 62 | + - pmd |
| 63 | + # spring |
| 64 | + - sunflow |
| 65 | + - tomcat |
| 66 | + # tradebeans |
| 67 | + # tradesoap |
| 68 | + - xalan |
| 69 | + - zxing |
| 70 | + steps: |
| 71 | + - name: Check free space |
| 72 | + run: df -h |
| 73 | + - name: Maximize build space |
| 74 | + uses: easimon/maximize-build-space@master |
| 75 | + with: |
| 76 | + remove-dotnet: true |
| 77 | + remove-android: true |
| 78 | + remove-haskell: true |
| 79 | + remove-codeql: true |
| 80 | + remove-docker-images: true |
| 81 | + # Leave some room for the runner for logging in /dev/root |
| 82 | + root-reserve-mb: 6000 |
| 83 | + temp-reserve-mb: 1024 |
| 84 | + - name: Check free space |
| 85 | + run: df -h |
| 86 | + - name: Checkout MMTk OpenJDK binding |
| 87 | + uses: actions/checkout@v4 |
| 88 | + - name: Setup environment |
| 89 | + run: | |
| 90 | + pip3 install running-ng |
| 91 | + sudo apt-get update -y |
| 92 | + sudo apt-get install -y build-essential libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev libcups2-dev libasound2-dev libxrandr-dev |
| 93 | + - name: Check free space and runner log path |
| 94 | + run: | |
| 95 | + df -h |
| 96 | + df . -h |
| 97 | + # FIXME: Commenting because GitHub has changed location the home directory |
| 98 | + # df /home/runner/runners |
| 99 | + - name: Fetch ${{ env.DACAPO_VERSION }} cache |
| 100 | + id: fetch-cache |
| 101 | + uses: actions/cache@v3 |
| 102 | + with: |
| 103 | + path: dacapo/${{ env.DACAPO_FILE }} |
| 104 | + key: ${{ env.DACAPO_VERSION }} |
| 105 | + # fail-on-cache-miss: true # We should never have a cache miss here as we cache DaCapo in an earlier job |
| 106 | + # Temporarily change this to false in case the cache download gets |
| 107 | + # stuck -- if the cache download is stuck then we go straight to |
| 108 | + # upstream and fetch the zip file |
| 109 | + fail-on-cache-miss: false |
| 110 | + - name: Install ${{ env.DACAPO_VERSION }} |
| 111 | + if: steps.fetch-cache.outputs.cache-hit != 'true' |
| 112 | + run: | |
| 113 | + mkdir -p dacapo |
| 114 | + pushd dacapo |
| 115 | + wget -q "${{ env.DACAPO_DOWNLOAD_URL }}" -O ${{ env.DACAPO_FILE }} |
| 116 | + popd |
| 117 | + - name: Unzip ${{ env.DACAPO_VERSION }} |
| 118 | + run: | |
| 119 | + pushd dacapo |
| 120 | + unzip ${{ env.DACAPO_FILE }} |
| 121 | + rm ${{ env.DACAPO_FILE }} |
| 122 | + popd |
| 123 | + - name: Check free space |
| 124 | + run: df -h |
| 125 | + - name: Download bundles |
| 126 | + uses: actions/download-artifact@v4 |
| 127 | + with: |
| 128 | + name: linux-x86_64-server-${{ matrix.debug-level }}-bundles-normal |
| 129 | + path: bundles |
| 130 | + - name: Extract OpenJDK |
| 131 | + run: | |
| 132 | + pushd bundles |
| 133 | + tar xvf *.tar.gz |
| 134 | + BIN_DIR=`find . -name bin` |
| 135 | + mv `dirname $BIN_DIR` jdk |
| 136 | + popd |
| 137 | + - name: Check free space |
| 138 | + run: df -h |
| 139 | + - name: Run ${{ env.DACAPO_VERSION }} ${{ matrix.benchmark }} on MMTk OpenJDK ${{ matrix.debug-level }} with ${{ inputs.heap-factor }}x MarkCompact minheap |
| 140 | + run: | |
| 141 | + DACAPO_PATH=`realpath ./dacapo` |
| 142 | + sed -i "s;DACAPO_PATH;$DACAPO_PATH;g" .github/configs/base.yml |
| 143 | + echo " - ${{ matrix.benchmark }}" >> .github/configs/${{ inputs.config-file }} |
| 144 | + cat .github/configs/${{ inputs.config-file }} |
| 145 | + set -o pipefail |
| 146 | + running runbms /tmp .github/configs/${{ inputs.config-file }} -s ${{ inputs.heap-factor }} -p linux-x86_64-${{ matrix.benchmark }}-${{ matrix.debug-level }} | tee /tmp/running.stdout |
| 147 | + - name: Extract running run id |
| 148 | + id: extract-running-run-id |
| 149 | + run: | |
| 150 | + RUN_ID=`sed -n 's/^Run id:.\(.*\)$/\1/p' < /tmp/running.stdout` |
| 151 | + echo "run-id=$RUN_ID" >> $GITHUB_OUTPUT |
| 152 | + - name: Upload running artifacts |
| 153 | + uses: actions/upload-artifact@v4 |
| 154 | + with: |
| 155 | + name: linux-x86_64-${{ matrix.benchmark }}-${{ matrix.debug-level }} |
| 156 | + path: /tmp/${{ steps.extract-running-run-id.outputs.run-id }}/ |
| 157 | + - name: Check for test failures |
| 158 | + run: | |
| 159 | + RUNNING_OUTPUT=`sed -n "s/^\(${{ matrix.benchmark }} .*\)$/\1/p" < /tmp/running.stdout` |
| 160 | + echo $RUNNING_OUTPUT |
| 161 | + pip3 install pyyaml |
| 162 | + echo $RUNNING_OUTPUT | python3 .github/scripts/ci-matrix-result-check.py linux-x64 ${{ matrix.debug-level }} ${{ matrix.benchmark }} /tmp/${{ steps.extract-running-run-id.outputs.run-id }}/ .github/configs/${{ inputs.config-file}} |
0 commit comments