Skip to content

Commit

Permalink
Let's try building this way
Browse files Browse the repository at this point in the history
  • Loading branch information
msoos committed Jul 18, 2024
1 parent 96523ad commit eb40409
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 37 deletions.
49 changes: 16 additions & 33 deletions .github/workflows/python-wheel-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,25 @@ jobs:

steps:
- uses: actions/checkout@v3
# - name: Checkout CaDiCaL
# uses: actions/checkout@v3
# with:
# repository: meelgroup/cadical
# ref: 'add_dynamic_lib'
# path: python/cadical
- name: Checkout CaDiCaL
uses: actions/checkout@v3
with:
repository: meelgroup/cadical
ref: 'add_dynamic_lib'
path: python/cadical

# - name: Checkout Cadiback
# uses: actions/checkout@v3
# with:
# repository: meelgroup/cadiback
# ref: 'mate'
# path: python/cadiback
- name: Checkout Cadiback
uses: actions/checkout@v3
with:
repository: meelgroup/cadiback
ref: 'mate'
path: python/cadiback

# - name: configure and build CaDiCaL
# run: cd python/cadical && CXXFLAGS=-fPIC ./configure --competition && make -j4
- name: configure and build CaDiCaL
run: cd python/cadical && CXXFLAGS=-fPIC ./configure --competition && make -j4

# - name: Configure and build Cadiback
# run: cd python/cadiback && ./configure && make -j4
- name: Configure and build Cadiback
run: cd python/cadiback && ./configure && make -j4 && sudo make install

# Used to host cibuildwheel
- uses: actions/setup-python@v3
Expand All @@ -45,23 +45,6 @@ jobs:
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BEFORE_BUILD: >
pwd
echo "here"
ls
echo "here2"
git clone https://github.com/meelgroup/cadical.git
cd cadical
git checkout add_dynamic_lib
./configure
make -j4
cd ..
git clone https://github.com/meelgroup/cadiback.git
cd cadical
git checkout mate
./configure
make -j4
cd ..
CIBW_BEFORE_ALL_LINUX: yum install -y gmp-devel
CIBW_SKIP: "*musl*"
CIBW_ARCHS: "auto64"
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ def _parse_toml(pyproject_path):
def gen_modules(version):

if platform == "win32" or platform == "cygwin":
extra_compile_args_val = ['-I../', '-Isrc/', '/std:c++17', "/DCMS_FULL_VERSION=\""+version+"\""]
define_macros_val = [("TRACE", "")]
extra_compile_args_val = ['-I../', '-Isrc/', '/std:c++17', "/DINSTALLED_CADIBACK", "/DCMS_FULL_VERSION=\""+version+"\""]
define_macros_val = [("TRACE", ""), ("INSTALLED_CADIBACK", "")]

else:
extra_compile_args_val = ['-I../', '-Isrc/', '-std=c++17']
define_macros_val = [("TRACE", ""), ("CMS_FULL_VERSION", "\""+version+"\"")]
extra_compile_args_val = ['-I../', '-Isrc/', '-std=c++17', "-DINSTALLED_CADIBACK"]
define_macros_val = [("TRACE", ""), ("INSTALLED_CADIBACK", ""), ("CMS_FULL_VERSION", "\""+version+"\"")]

modules = Extension(
name = "pycryptosat",
Expand Down
4 changes: 4 additions & 0 deletions src/backbone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ THE SOFTWARE.
***********************************************/

#include "solver.h"
#ifdef INSTALLED_CADIBACK
#include <cadiback.h>
#else
#include "../cadiback/cadiback.h"
#endif

using namespace CMSat;

Expand Down

0 comments on commit eb40409

Please sign in to comment.