Skip to content

Commit

Permalink
Add Windows Makefile
Browse files Browse the repository at this point in the history
Signed-off-by: Matteo Cafasso <noxdafox@gmail.com>
  • Loading branch information
noxdafox committed Sep 4, 2023
1 parent bf83f57 commit 3b9bff8
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
# python-version: ['3.8', '3.9', '3.10', '3.11']
# steps:
# - uses: actions/checkout@v2
# - name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -41,17 +41,20 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v2
# Install nmake
- uses: ilammy/msvc-dev-cmd@v1
- name: Build CLIPS
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Build CLIPSPy
run: |
nmake clips
- name: Build Python packages
run: |
python setup.py build_ext --include-dirs= --library-dirs
- name: Build Python wheels
run: |
python setup.py sdist bdist_wheel
nmake /F Makefile.win
- name: Store build artifacts
uses: actions/upload-artifact@v3
with:
name: windows-build
path: dist/
24 changes: 24 additions & 0 deletions Makefile.win
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# vim: tabstop=8
PYTHON = python
CLIPS_VERSION = 6.41
CLIPS_SOURCE_URL = "https://sourceforge.net/projects/clipsrules/files/CLIPS/6.4.1/clips_core_source_641.zip"

.PHONY: clips_source clips clipspy

all: clips_source clips clipspy

clips_source:
curl --output clips.zip --location --url $(CLIPS_SOURCE_URL)
mkdir clips_source
tar -xf clips.zip -C clips_source --strip-components=1

clips: clips_source
(cd clips_source/core/ && nmake /F makefile.win)

clipspy: clips
python setup.py build_ext --include-dirs=clips_source/core/ --library-dirs=clips_source/core/
python setup.py sdist bdist_wheel

clean:
-del clips.zip
-rd /s /q clips_source build dist clipspy.egg-info

0 comments on commit 3b9bff8

Please sign in to comment.