Skip to content

Commit

Permalink
fix conda windows build
Browse files Browse the repository at this point in the history
Conda hard wires an old build generator. This commit simply sets it to
ninja on Windows, which also supports multi core builds.
  • Loading branch information
rkaminsk committed Dec 1, 2021
1 parent 16b0bdf commit 860781e
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/conda.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def run():
options.extend(['-c', c])
options.append(recipe_path)

subprocess.call(options, env=build_env)
subprocess.check_call(options, env=build_env)

if __name__ == '__main__':
run()
13 changes: 7 additions & 6 deletions .github/conda/bld.bat
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
mkdir build

cmake -G "%CMAKE_GENERATOR%" -H. -Bbuild ^
cmake -G "Ninja" -H. -Bbuild ^
-DCMAKE_CXX_COMPILER="%CXX%" ^
-DCMAKE_C_COMPILER="%CC%" ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^
-DPython_ROOT_DIR="%PREFIX%" ^
-DPython_EXECUTABLE="%PYTHON%" ^
-DCLINGO_BUILD_WITH_PYTHON=ON ^
-DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^
-DPYCLINGO_INSTALL="system" ^
-DCLINGO_BUILD_WITH_LUA=OFF ^
-DCLINGO_MANAGE_RPATH=OFF
-DCLINGO_MANAGE_RPATH=OFF ^
-DPYCLINGO_INSTALL="system"

cmake --build build --config Release
cmake --build build --config Release --target install
cmake --build build
cmake --build build --target install
1 change: 1 addition & 0 deletions .github/conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ source:
requirements:
build:
- cmake
- ninja
- {{ compiler('c') }}
- {{ compiler('cxx') }}
{% if dev %}
Expand Down
20 changes: 11 additions & 9 deletions .github/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ pip:
else:
check_call(['yum', 'install', '-y', 're2c', 'bison'])
winmac_images:
macos-10.15:
macos-latest:
depends: |
brew update
brew install re2c
brew install [email protected]
windows-2016:
windows-latest:
depends: |
choco install re2c
choco install winflexbison3
Expand All @@ -47,7 +47,7 @@ conda:
os:
- 'ubuntu-latest'
- 'macos-latest'
- 'windows-2016'
- 'windows-latest'
macosx-sdk:
'MacOSX10.9.sdk.tar.xz'
channels_release:
Expand All @@ -68,6 +68,7 @@ conda:
requirements:
build:
- cmake
- ninja
- "{{ compiler('c') }}"
- "{{ compiler('cxx') }}"
build_dev:
Expand Down Expand Up @@ -129,19 +130,20 @@ conda:
build_bat: |
mkdir build
cmake -G "%CMAKE_GENERATOR%" -H. -Bbuild ^
cmake -G "Ninja" -H. -Bbuild ^
-DCMAKE_CXX_COMPILER="%CXX%" ^
-DCMAKE_C_COMPILER="%CC%" ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^
-DPython_ROOT_DIR="%PREFIX%" ^
-DPython_EXECUTABLE="%PYTHON%" ^
-DCLINGO_BUILD_WITH_PYTHON=ON ^
-DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^
-DPYCLINGO_INSTALL="system" ^
-DCLINGO_BUILD_WITH_LUA=OFF ^
-DCLINGO_MANAGE_RPATH=OFF
-DCLINGO_MANAGE_RPATH=OFF ^
-DPYCLINGO_INSTALL="system"
cmake --build build --config Release
cmake --build build --config Release --target install
cmake --build build
cmake --build build --target install
build_config: |
python:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pipwinmac-wip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
run: |
pip install --user toml cffi scikit-build cmake ninja twine
- name: Install macos prerequisites
- name: Install macos-latest prerequisites
if: ${{ matrix.os == 'macos-latest' }}
run: |
brew update
Expand Down

0 comments on commit 860781e

Please sign in to comment.