Skip to content

Commit

Permalink
fix: Fixed an issue with the benchmarker SHOT path
Browse files Browse the repository at this point in the history
  • Loading branch information
maxemiliang committed Apr 20, 2024
1 parent 22447c9 commit 13d70fe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/benchmarker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,12 @@ jobs:
runs-on: [ self-hosted, linux, cmake ]

steps:
- name: Cleanup workspace
run: |
sudo rm -rf ./* || true
sudo rm -rf ./.??* || true
- shell: bash
run: git -C shot-benchmarker pull || git clone https://github.com/maxemiliang/shot-benchmarker.git

- name: Fetch SHOT artifact
if: ${{ inputs.shot_artifact != '' }}
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ inputs.shot_artifact }}
path: ${{ github.workspace }}/shot-benchmarker
Expand All @@ -91,10 +86,16 @@ jobs:
shell: bash
run: echo "SHOT_EXECUTABLE_PATH=${{ github.workspace }}/shot-benchmarker" >> $GITHUB_ENV

- name: Set the SHOT executable path
# If the path is not an absolute path, we assume it is relative to the current working directory
- name: Set the SHOT executable path.
if: ${{ inputs.shot_executable_path != '' }}
shell: bash
run: echo "SHOT_EXECUTABLE_PATH=${{ inputs.shot_executable_path }}" >> $GITHUB_ENV
run: |
if [[ ${{ inputs.shot_executable_path }} == /* ]]; then
echo "SHOT_EXECUTABLE_PATH=${{ inputs.shot_executable_path }}" >> $GITHUB_ENV
else
echo "SHOT_EXECUTABLE_PATH=${{ github.workspace }}/${{ inputs.shot_executable_path }}" >> $GITHUB_ENV
fi
- name: Make SHOT executable
shell: bash
Expand All @@ -104,7 +105,7 @@ jobs:
- name: Show linked libraries
shell: bash
working-directory: ${{ github.workspace }}/shot-benchmarker
working-directory: ${{ env.SHOT_EXECUTABLE_PATH }}
run: ldd SHOT

- uses: actions/setup-python@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ jobs:
uses: ./.github/workflows/benchmarker.yml
needs: [ build ]
with:
shot_executable_path: ${{ github.workspace }}/build
shot_executable_path: build
benchmark_folder: "MINLP-convex-small"
benchmark_type: "nl"
enable_gurobi: ${{ inputs.enable_gurobi }}
Expand Down

0 comments on commit 13d70fe

Please sign in to comment.