Skip to content

Commit

Permalink
Merge pull request #26 from scipopt/bundled-debug
Browse files Browse the repository at this point in the history
Use debug precompiled binaries in debug mode
  • Loading branch information
mmghannam authored Feb 8, 2025
2 parents e868347 + 167b1d1 commit 2004891
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,27 @@ jobs:
- uses: actions/checkout@v3
- name: Test bundled
run: |
cargo b --features bundled -vv
cargo b --features bundled --release
cargo t --features bundled --release create
cargo t --features bundled --release --examples
bundled-debug-test:
strategy:
matrix:
os: [
ubuntu-latest,
macos-latest,
macos-14, # macOS arm runner
windows-latest,
]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Test bundled
run: |
cargo b --features bundled
cargo t --features bundled create
cargo t --features bundled --examples
cargo t --features bundled --examples
from-source-test:
strategy:
Expand Down
8 changes: 7 additions & 1 deletion bundled.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,14 @@ pub fn download_scip() {
panic!("Unsupported OS-arch combination: {}-{}", os, arch);
};

// if debug mode is enabled, download the debug version of SCIP
#[cfg(debug_assertions)]
let debug_str = "-debug";
#[cfg(not(debug_assertions))]
let debug_str = "";

let url = format!(
"https://github.com/scipopt/scipoptsuite-deploy/releases/download/v0.7.0/libscip-{os_string}.zip"
"https://github.com/scipopt/scipoptsuite-deploy/releases/download/v0.7.0/libscip-{os_string}{debug_str}.zip",
);

download_and_extract_zip(&url, &extract_path)
Expand Down

0 comments on commit 2004891

Please sign in to comment.