From 13d70fe1792d22456117c3c048b0f1e5a2b694bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxemilian=20Gr=C3=B6nblom?= Date: Sat, 20 Apr 2024 14:29:52 +0300 Subject: [PATCH] fix: Fixed an issue with the benchmarker SHOT path --- .github/workflows/benchmarker.yml | 19 ++++++++++--------- .github/workflows/build-workflow.yml | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/benchmarker.yml b/.github/workflows/benchmarker.yml index d33e6360..c9822114 100644 --- a/.github/workflows/benchmarker.yml +++ b/.github/workflows/benchmarker.yml @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/build-workflow.yml b/.github/workflows/build-workflow.yml index e6cf4425..920be175 100644 --- a/.github/workflows/build-workflow.yml +++ b/.github/workflows/build-workflow.yml @@ -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 }}