Skip to content

Commit

Permalink
Feature/update cmake files (#4)
Browse files Browse the repository at this point in the history
* Update CMake files

* Update CMake files

* Update build.yml
  • Loading branch information
fontanf authored Jul 13, 2024
1 parent c54e071 commit b4b3e10
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 21 deletions.
24 changes: 5 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-13, macos-latest]
python-version: ["3.8"]

env:
Expand All @@ -29,20 +29,15 @@ jobs:
run: |
python3 -m pip install gdown
python3 -u scripts/download_data.py
- name: Install CLP (MacOS)
run: |
brew install clp
if: ${{ (matrix.os == 'macos-13') || (matrix.os == 'macos-latest') }}
- name: Build
run: |
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --parallel
cmake --install build --config Release --prefix install
- name: Copy CLP libraries (Darwin)
run: |
mkdir -p "/Users/runner/work/Osi/Osi/dist/lib"
cp -rf "${GITHUB_WORKSPACE}/build/_deps/mathoptsolverscmake-build/extern/Osi-prefix/src/Osi/lib/" "/Users/runner/work/Osi/Osi/dist/lib"
mkdir -p "/Users/runner/work/CoinUtils/CoinUtils/dist/lib"
cp -rf "${GITHUB_WORKSPACE}/build/_deps/mathoptsolverscmake-build/extern/CoinUtils-prefix/src/CoinUtils/lib/" "/Users/runner/work/CoinUtils/CoinUtils/dist/lib"
mkdir -p "/Users/runner/work/Clp/Clp/dist/lib"
cp -rf "${GITHUB_WORKSPACE}/build/_deps/mathoptsolverscmake-build/extern/Clp-prefix/src/Clp/lib/" "/Users/runner/work/Clp/Clp/dist/lib"
if: matrix.os == 'macos-latest'
- name: Run tests
run: python3 -u scripts/run_tests.py test_results
- name: Checkout main branch
Expand All @@ -55,15 +50,6 @@ jobs:
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --parallel
cmake --install build --config Release --prefix install
- name: Copy CLP libraries (Darwin)
run: |
mkdir -p "/Users/runner/work/Osi/Osi/dist/lib"
cp -rf "${GITHUB_WORKSPACE}/build/_deps/mathoptsolverscmake-build/extern/Osi-prefix/src/Osi/lib/" "/Users/runner/work/Osi/Osi/dist/lib"
mkdir -p "/Users/runner/work/CoinUtils/CoinUtils/dist/lib"
cp -rf "${GITHUB_WORKSPACE}/build/_deps/mathoptsolverscmake-build/extern/CoinUtils-prefix/src/CoinUtils/lib/" "/Users/runner/work/CoinUtils/CoinUtils/dist/lib"
mkdir -p "/Users/runner/work/Clp/Clp/dist/lib"
cp -rf "${GITHUB_WORKSPACE}/build/_deps/mathoptsolverscmake-build/extern/Clp-prefix/src/Clp/lib/" "/Users/runner/work/Clp/Clp/dist/lib"
if: matrix.os == 'macos-latest'
- name: Run tests
run: python3 -u scripts/run_tests.py test_results_ref
- name: Process tests
Expand Down
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 3.15.0)

project(StarObservationSchedulingSolver LANGUAGES CXX)

# Avoid FetchContent warning.
cmake_policy(SET CMP0135 NEW)

# Require C++14.
set(CMAKE_CXX_STANDARD 14)

Expand Down
5 changes: 3 additions & 2 deletions extern/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ include(FetchContent)
FetchContent_Declare(
columngenerationsolver
GIT_REPOSITORY https://github.com/fontanf/columngenerationsolver.git
GIT_TAG 32561f17c6fa7100b2dedb5d397dab1a03c9db2c)
#SOURCE_DIR "${PROJECT_SOURCE_DIR}/../columngenerationsolver/")
GIT_TAG 9c57300135f8d1ec2a44de4aeb53e0056d24f2f3
#SOURCE_DIR "${PROJECT_SOURCE_DIR}/../columngenerationsolver/"
EXCLUDE_FROM_ALL)
FetchContent_MakeAvailable(columngenerationsolver)

0 comments on commit b4b3e10

Please sign in to comment.