-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move the benchmark action into this repo
- Loading branch information
1 parent
751fbdd
commit ad91fdb
Showing
2 changed files
with
59 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Benchmark | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
shot_executable: | ||
description: 'The SHOT executable to run' | ||
default: "shot" | ||
required: false | ||
type: string | ||
benchmark_folder: | ||
description: 'The benchmark to run (folder name from: https://github.com/andreaslundell/SHOT_benchmark_problems)' | ||
default: "MINLP-convex-small" | ||
required: false | ||
type: string | ||
benchmark_type: | ||
description: 'The benchmark type to run, can be gms, nl or osil' | ||
default: "nl" | ||
required: false | ||
type: string | ||
benchmarks: | ||
description: 'The benchmarks to run, can be a list of benchmarks or a single benchmark, defaults to all benchmarks' | ||
default: "" | ||
required: false | ||
type: string | ||
|
||
jobs: | ||
benchmark: | ||
name: Benchmark SHOT | ||
runs-on: [ self-hosted, linux, cmake ] | ||
|
||
steps: | ||
- shell: bash | ||
run: git clone https://github.com/maxemiliang/shot-benchmarker.git | ||
|
||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
cache: 'pip' | ||
working-directory: ${{ github.workspace }}/shot-benchmarker | ||
|
||
- shell: bash | ||
run: pip install -r requirements.txt | ||
working-directory: ${{ github.workspace }}/shot-benchmarker | ||
|
||
- shell: bash | ||
env: | ||
INPUT_BENCHMARK_FOLDER: ${{ inputs.benchmark_folder }} | ||
INPUT_BENCHMARK_TYPE: ${{ inputs.benchmark_type }} | ||
INPUT_BENCHMARKS: ${{ inputs.benchmarks }} | ||
INPUT_SHOT_EXECUTABLE: ${{ inputs.shot_executable }} | ||
run: python main.py | ||
working-directory: ${{ github.workspace }}/shot-benchmarker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,14 +38,11 @@ jobs: | |
benchmark: | ||
name: Benchmark | ||
needs: [ build-test ] | ||
runs-on: [ self-hosted, docker ] | ||
steps: | ||
- name: Run Benchmark | ||
uses: maxemiliang/[email protected] | ||
with: | ||
benchmark_folder: "MINLP-convex-small" | ||
benchmark_type: "nl" | ||
shot_executable: ${{github.workspace}}/build/SHOT | ||
uses: ./.github/workflows/benchmarker.yml§ | ||
with: | ||
benchmark_folder: "MINLP-convex-small" | ||
benchmark_type: "nl" | ||
shot_executable: ${{github.workspace}}/build/SHOT | ||
|
||
# Publish the test results as an output | ||
publish-test: | ||
|