Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
62 changes: 62 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: build-and-test

# Build the solver-free libraries (SOLVER=NONE — no Gurobi/CPLEX, no license)
# and run the unit/regression test suite on Linux, macOS, and Windows.

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-and-test:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- name: Checkout
uses: actions/checkout@v4
# The benchmark data is in Git LFS and is not needed to build or test
# (the toy example is plain text), so skip LFS to save bandwidth.
with:
lfs: false

- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y cmake libeigen3-dev libboost-dev

- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: brew install eigen boost

- name: Install dependencies (Windows)
if: runner.os == 'Windows'
run: vcpkg install eigen3 boost-dynamic-bitset --triplet x64-windows

- name: Configure (no solver) — Linux/macOS
if: runner.os != 'Windows'
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DSOLVER=NONE

- name: Configure (no solver) — Windows
if: runner.os == 'Windows'
shell: pwsh
# Quote the whole -D argument so PowerShell expands $env:VCPKG_INSTALLATION_ROOT
# (an unquoted value is passed to CMake literally and the toolchain is not found).
run: cmake -S . -B build -DSOLVER=NONE "-DCMAKE_TOOLCHAIN_FILE=$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"

- name: Build unit tests
run: cmake --build build --config Release --target unit_tests

- name: Run tests
run: ctest --test-dir build -C Release --output-on-failure
28 changes: 14 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
DARP_IPS/bin/*
DARP_IPS/cmake-build-debug/*
DARP_IPS/lib/*
DARP_IPS/cmake-build-release/*
cpp/bin/*
cpp/lib/*
**/cmake-build-*/
.DS_Store
**/.DS_Store
*.csv
Expand All @@ -10,16 +9,17 @@ DARP_IPS/cmake-build-release/*



DARP_IPS/.idea/*
DARP_IPS/.vscode/launch.json
DARP_IPS/.vscode/settings.json
DARP_IPS/.vscode/tasks.json
DARP_IPS/src/solvers/.idea/workspace.xml
Data/*
**/.idea/
cpp/.vscode/launch.json
cpp/.vscode/settings.json
cpp/.vscode/tasks.json
Outputs/
Outputs_1/*
DARP_IPS/src/data/.idea/*
# Toy example run outputs (keep the folder, ignore generated runs)
data/ToyExample/runs/*
!data/ToyExample/runs/.gitkeep
dataset/*
DARP_IPS/.idea/misc.xml
DARP_IPS/build-gurobi/*
DARP_IPS/build-cplex/*
cpp/build-gurobi/*
cpp/build-cplex/*
NYC_Dataset_2015-2016.zip
build/
17 changes: 17 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# ---------------------------------------------------------------------------
# Top-level CMake entry point.
#
# The actual C++ solver lives in cpp/. This thin wrapper exists so that IDEs
# (e.g. CLion) and `cmake -S . -B build` invocations launched from the
# repository root automatically pick up the solver build. All build options
# (SOLVER, GUROBI_ROOT, EIGEN_DIR, ENABLE_ASAN, ...) are defined in
# cpp/CMakeLists.txt and are forwarded transparently.
# ---------------------------------------------------------------------------
cmake_minimum_required(VERSION 3.16)
project(dynamic_ips)

# Enable CTest at the top level so `ctest` works from a root-level build tree
# (the tests themselves are defined under cpp/tests).
enable_testing()

add_subdirectory(cpp)
217 changes: 0 additions & 217 deletions DARP_IPS/CMakeLists.txt

This file was deleted.

This file was deleted.

Loading
Loading