diff --git a/.github/actions/simeng_benchmarks/action.yml b/.github/actions/simeng_benchmarks/action.yml index bc43abbec1..8a6063bd4f 100644 --- a/.github/actions/simeng_benchmarks/action.yml +++ b/.github/actions/simeng_benchmarks/action.yml @@ -2,65 +2,34 @@ name: simeng-benchmarks description: runs simeng benchmarks inputs: - BENCHMARK_BRANCH: - description: name of the branch on the benchmark repo you want to checkout + RUN_DIR: + description: directory from which the benchmark binary should be run required: true - OS: - description: docker image name + BIN_PATH: + description: path to the binary for the benchmark required: true - PAT: - description: personal access token required to checkout private benchmark repo + PASS_STRING: + description: string that is searched for in the benchmark's output to confirm whether or not it has passed required: true runs: using: 'composite' steps: - - ################################## - # clones repo with different versions of the checkout action, as container - # has different node versions and some compilers run on older OSes that - # have differing node versions - ################################## - - - if: ${{ contains(fromJson('["ubuntu:18.04"]'), matrix.OS) }} - name: checkout v3 - uses: actions/checkout@v3 - with: - repository: UoB-HPC/simeng-benchmarks - token: ${{ inputs.PAT }} - ref: makefile-build-system - path: simeng-benchmarks - - - if: ${{ !contains(fromJson('["ubuntu:18.04"]'), matrix.OS) }} - name: checking out benchmark repository - uses: actions/checkout@v4 - with: - repository: UoB-HPC/simeng-benchmarks - ref: makefile-build-system - token: ${{ inputs.PAT }} - path: simeng-benchmarks - - - name: CloverLeaf serial gcc8.3.0 armv8.4 + - name: Run Benchmark shell: bash run: | echo "BASH running" - cd $GITHUB_WORKSPACE/simeng-benchmarks/Data_Files/CloverLeaf + cd ${{ inputs.RUN_DIR }} echo "cd done" ls - simeng $GITHUB_WORKSPACE/configs/a64fx.yaml $SIMENG_BENCHMARKS_SRC_DIR/binaries/CloverLeaf/serial/cloverleaf_gcc8.3.0_armv8.4 >> $GITHUB_WORKSPACE/simeng.tmp 2> $GITHUB_WORKSPACE/simeng.tmp - if grep -q "This test is considered PASSED" $GITHUB_WORKSPACE/simeng.tmp; then + simeng $GITHUB_WORKSPACE/configs/a64fx.yaml ${{ inputs.BIN_PATH }} >> $GITHUB_WORKSPACE/simeng.tmp 2> $GITHUB_WORKSPACE/simeng.tmp + if grep -q ${{ inputs.PASS_STRING }} $GITHUB_WORKSPACE/simeng.tmp; then echo "Passed" else echo "Failed" exit 1 fi -# - name: run benchmark -# shell: bash -# run: | -# cd ./simeng-benchmarks/Tools/simulation/validation -# SIMENG_BENCHMARKS_SRC_DIR=$GITHUB_WORKSPACE/simeng-benchmarks python3 validate_simulation.py all_a64fx.json $GITHUB_WORKSPACE/configs/a64fx.yaml - # { # "name": "CloverLeaf serial gcc8.3.0 armv8.4", # "run_from": "$SIMENG_BENCHMARKS_SRC_DIR/Data_Files/CloverLeaf", diff --git a/.github/workflows/LINUX_BUILD_TEST.yml b/.github/workflows/LINUX_BUILD_TEST.yml index 6badc72669..78895c39ba 100644 --- a/.github/workflows/LINUX_BUILD_TEST.yml +++ b/.github/workflows/LINUX_BUILD_TEST.yml @@ -162,7 +162,7 @@ jobs: uses: actions/checkout@v3 with: repository: UoB-HPC/simeng-benchmarks - token: ${{ inputs.PAT }} + token: ${{ env.PAT }} ref: makefile-build-system path: simeng-benchmarks @@ -172,24 +172,16 @@ jobs: with: repository: UoB-HPC/simeng-benchmarks ref: makefile-build-system - token: ${{ inputs.PAT }} + token: ${{ env.PAT }} path: simeng-benchmarks - if: ${{ inputs.SIMENG-MODE == 'Release' }} name: CloverLeaf serial gcc8.3.0 armv8.4 - shell: bash - run: | - echo "BASH running" - cd $GITHUB_WORKSPACE/simeng-benchmarks/Data_Files/CloverLeaf - echo "cd done" - ls - simeng $GITHUB_WORKSPACE/configs/a64fx.yaml $GITHUB_WORKSPACE/simeng-benchmarks/binaries/CloverLeaf/serial/cloverleaf_gcc8.3.0_armv8.4 >> $GITHUB_WORKSPACE/simeng.tmp 2> $GITHUB_WORKSPACE/simeng.tmp - if grep -q "This test is considered PASSED" $GITHUB_WORKSPACE/simeng.tmp; then - echo "Passed" - else - echo "Failed" - exit 1 - fi + uses: ./.github/actions/simeng_benchmarks + with: + RUN_DIR: $GITHUB_WORKSPACE/simeng-benchmarks/Data_Files/CloverLeaf + BIN_PATH: $GITHUB_WORKSPACE/simeng-benchmarks/binaries/CloverLeaf/serial/cloverleaf_gcc8.3.0_armv8.4 + PASS_STRING: "This test is considered PASSED" # - if: ${{ inputs.SIMENG-MODE == 'Release' }}