diff --git a/.github/workflows/benchmarker.yml b/.github/workflows/benchmarker.yml index 5dd4b419..e88fee18 100644 --- a/.github/workflows/benchmarker.yml +++ b/.github/workflows/benchmarker.yml @@ -3,9 +3,9 @@ name: Benchmark on: workflow_call: inputs: - shot_executable: - description: 'The SHOT executable to run' - default: ./SHOT + shot_executable_path: + description: 'The path to the SHOT executable to run' + default: "/SHOT" required: false type: string benchmark_folder: @@ -86,10 +86,20 @@ jobs: name: ${{ inputs.shot_artifact }} path: ${{ github.workspace }}/shot-benchmarker + - name: Set the SHOT executable path if an artifact is used + if : ${{ inputs.shot_executable_path == '' }} + shell: bash + run: echo "SHOT_EXECUTABLE_PATH=${{ github.workspace }}/shot-benchmarker" >> $GITHUB_ENV + + - name: Set the SHOT executable path + if: ${{ inputs.shot_executable_path != '' }} + shell: bash + run: echo "SHOT_EXECUTABLE_PATH=${{ inputs.shot_executable_path }}" >> $GITHUB_ENV + - name: Make SHOT executable shell: bash run: | - cd ${{ github.workspace }}/shot-benchmarker + cd ${{ env.SHOT_EXECUTABLE_PATH }} chmod +x SHOT - name: Show linked libraries @@ -125,7 +135,7 @@ jobs: INPUT_BENCHMARK_FOLDER: ${{ inputs.benchmark_folder }} INPUT_BENCHMARK_TYPE: ${{ inputs.benchmark_type }} INPUT_BENCHMARKS: ${{ inputs.benchmarks }} - INPUT_SHOT_EXECUTABLE: ${{ inputs.shot_executable }} + INPUT_SHOT_EXECUTABLE: ${{ env.SHOT_EXECUTABLE_PATH }}/SHOT INPUT_IS_GAMS: ${{ inputs.enable_gams }} INPUT_IS_GUROBI: ${{ inputs.enable_gurobi }} OS_AUTH_URL: 'https://pouta.csc.fi:5001/v3' diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index da166acb..537cd19e 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -34,24 +34,8 @@ jobs: gurobi_license: ${{ secrets.GUROBI_LICENSE_FILE }} gams_license: ${{ secrets.GAMS_LICENSE_FILE }} - # Finally, we run some simple benchmarks - benchmark: - name: Benchmark - needs: [ build-test, build-proprietary ] - uses: ./.github/workflows/benchmarker.yml - with: - benchmark_folder: "MINLP-convex-small" - benchmark_type: "nl" - enable_gurobi: false - enable_gams: false - shot_artifact: shot-binary-${{ github.sha }} - secrets: - gurobi_license: ${{ secrets.GUROBI_LICENSE_FILE }} - gams_license: ${{ secrets.GAMS_LICENSE_FILE }} - OS_USERNAME: ${{ secrets.OS_USERNAME }} - OS_PASSWORD: ${{ secrets.OS_PASSWORD }} - # Publish the test results as an output + # Publish the test results as an output publish-test: name: Publish test results needs: [ build-test, build-proprietary, benchmark ] diff --git a/.github/workflows/build-workflow.yml b/.github/workflows/build-workflow.yml index c6faa7d3..46cd72c5 100644 --- a/.github/workflows/build-workflow.yml +++ b/.github/workflows/build-workflow.yml @@ -347,3 +347,19 @@ jobs: run: | rm -f $GRB_LICENSE_FILE rm -f $GAMS_LICENSE_FILE + + # Finally, we run some simple benchmarks + benchmark: + name: Benchmark + uses: ./.github/workflows/benchmarker.yml + with: + shot_executable_path: "${{ github.workspace }}/build" + benchmark_folder: "MINLP-convex-small" + benchmark_type: "nl" + enable_gurobi: ${{ inputs.enable_gurobi }} + enable_gams: ${{ inputs.enable_gams }} + secrets: + gurobi_license: ${{ secrets.GUROBI_LICENSE_FILE }} + gams_license: ${{ secrets.GAMS_LICENSE_FILE }} + OS_USERNAME: ${{ secrets.OS_USERNAME }} + OS_PASSWORD: ${{ secrets.OS_PASSWORD }}