use GLPK as solver #83
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
name: Benchmark | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
schedule: | |
- cron: '0 0 * * SUN' | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Release | |
jobs: | |
idol_smaller: | |
name: Smaller instances | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
arguments: | |
- "external" | |
- "bab best-bound most-infeasible simple-rounding knapsack-cover" | |
- "bab worst-bound most-infeasible simple-rounding knapsack-cover" | |
- "bab best-estimate most-infeasible simple-rounding knapsack-cover" | |
- "bab depth-first most-infeasible simple-rounding knapsack-cover" | |
- "bab breadth-first most-infeasible simple-rounding knapsack-cover" | |
- "bab best-bound least-infeasible simple-rounding knapsack-cover" | |
- "bab best-bound first-infeasible simple-rounding knapsack-cover" | |
- "bab best-bound uniformly-random simple-rounding knapsack-cover" | |
- "bab best-bound pseudo-cost simple-rounding knapsack-cover" | |
- "bab best-bound strong-branching simple-rounding knapsack-cover" | |
- "bab best-bound most-infeasible simple-rounding -" | |
- "bab best-bound most-infeasible - -" | |
instances: | |
- "00Uncorrelated/n00050/" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Update apt-get | |
run: sudo apt-get update | |
#- name: Download HiGHS | |
# run: git clone https://github.com/ERGO-Code/HiGHS.git | |
#- name: Install HiGHS | |
# run: mkdir HiGHS/build && cd HiGHS/build && cmake .. && make && sudo make install | |
- name: Install GLPK | |
run: sudo apt-get install libglpk-dev | |
- name: Install idol | |
run: git clone --branch main https://github.com/hlefebvr/idol.git && cd idol && cmake -DUSE_GLPK=YES . && make && sudo make install | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/cmake-build-debug -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
- name: Build | |
run: cmake --build ${{github.workspace}}/cmake-build-debug --config ${{env.BUILD_TYPE}} | |
- name: Solve instances with idol | |
run: ./run.sh ./data/${{ matrix.instances }} ${{ matrix.arguments }} | |
shell: bash | |
- name: Rename results file | |
run: mv results_KP_idol.csv results_KP_idol__$(uuidgen).csv | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: results | |
path: results_KP_idol__*.csv | |
idol_larger: | |
name: Larger instances | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
arguments: | |
- "external" | |
- "bab best-bound most-infeasible simple-rounding -" | |
- "bab best-bound most-infeasible simple-rounding knapsack-cover" | |
- "bab worst-bound most-infeasible simple-rounding knapsack-cover" | |
- "bab best-estimate most-infeasible simple-rounding knapsack-cover" | |
- "bab depth-first most-infeasible simple-rounding knapsack-cover" | |
- "bab best-bound least-infeasible simple-rounding knapsack-cover" | |
- "bab best-bound first-infeasible simple-rounding knapsack-cover" | |
- "bab best-bound uniformly-random simple-rounding knapsack-cover" | |
- "bab best-bound pseudo-cost simple-rounding knapsack-cover" | |
- "bab best-bound strong-branching simple-rounding knapsack-cover" | |
instances: | |
- "00Uncorrelated/n00200/" | |
- "00Uncorrelated/n00500/" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Update apt-get | |
run: sudo apt-get update | |
- name: Download HiGHS | |
run: git clone https://github.com/ERGO-Code/HiGHS.git | |
- name: Install HiGHS | |
run: mkdir HiGHS/build && cd HiGHS/build && cmake .. && make && sudo make install | |
- name: Install idol | |
run: git clone --branch dev https://github.com/hlefebvr/idol.git && cd idol && cmake -DUSE_HIGHS=YES . && make && sudo make install | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/cmake-build-debug -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
- name: Build | |
run: cmake --build ${{github.workspace}}/cmake-build-debug --config ${{env.BUILD_TYPE}} | |
- name: Solve instances with idol | |
run: ./run.sh ./data/${{ matrix.instances }} ${{ matrix.arguments }} | |
shell: bash | |
- name: Rename results file | |
run: mv results_KP_idol.csv results_KP_idol__$(uuidgen).csv | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: results | |
path: results_KP_idol__*.csv | |
render: | |
runs-on: ubuntu-latest | |
needs: [idol_smaller, idol_larger] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download a single artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: results | |
- name: Collect all results from idol | |
run: cat results_KP_idol__*.csv > results_KP_idol.csv | |
# Install all R markdown dependencies | |
- name: Update apt-get | |
run: sudo apt-get update | |
- name: Install dependencies of kableExtra | |
run: sudo apt-get install libxml2-dev libfontconfig1-dev libcurl4-openssl-dev | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
- name: Install rmarkdown | |
run: R -e "install.packages(\"rmarkdown\")" | |
- name: Install dplyr | |
run: R -e "install.packages(\"dplyr\")" | |
- name: Install rmdformats | |
run: R -e "install.packages(\"rmdformats\")" | |
- name: Install ggplot2 | |
run: R -e "install.packages(\"ggplot2\")" | |
- name: Render report | |
run: ./build.sh | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
publish_branch: gh-pages | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: reports/ | |
force_orphan: true |