Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Windows #54

Merged
merged 4 commits into from
Jan 25, 2025
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .github/workflows/conda-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ on:
- cron: "0 11 * * 1"

jobs:
build-linux:
build:
name: CondaBuild (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"] #, "windows-latest"] # "macos-latest"] #,
os: ["ubuntu-latest", "windows-latest"] # "macos-latest"] #,
python-version: ["3.10"]
steps:
- name: Checkout Repository
Expand All @@ -28,6 +28,13 @@ jobs:
if: startsWith(matrix.os, 'macos')
run: build_tools/install_macos_sdk.sh

- name: Install Visual Studio 2017 (Windows only)
if: matrix.os == 'windows-latest'
run: |
choco install visualstudio2017buildtools --version=15.9.54 -y
choco install visualstudio2017-workload-vctools -y
setx PATH "%PATH%;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build"

- name: Set up Conda
uses: conda-incubator/setup-miniconda@v3
with:
Expand All @@ -37,6 +44,8 @@ jobs:
channels: conda-forge,bioconda,tpeulen,defaults
channel-priority: true



- name: Display Conda Settings
shell: bash -el {0}
run: |
Expand Down
6 changes: 3 additions & 3 deletions conda-recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ git pull
cd ..\..\

:: Configure the build using CMake
cmake -S . -B build -G "Visual Studio 17 2022" -A x64 ^
cmake -S . -B build -G "Visual Studio 15 2017" -A x64 ^
-DPYTHON_EXECUTABLE="%PYTHON%" ^
-DPYTHON_LIBRARY_OUTPUT_DIRECTORY="%SP_DIR%" ^
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE="%SP_DIR%" ^
Expand All @@ -42,7 +42,7 @@ if exist build rmdir /s /q build
mkdir build
cd build
:: Configure the build using CMake
cmake .. -G "Visual Studio 17 2022" ^
cmake .. -G "Visual Studio 15 2017" -A x64 ^
-DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^
-DCMAKE_PREFIX_PATH="%PREFIX%" ^
-DBUILD_PYTHON_INTERFACE=ON ^
Expand Down Expand Up @@ -71,7 +71,7 @@ for /f "tokens=2 delims= " %%v in ('%PYTHON% --version 2^>^&1') do set PYTHON_VE
:: Extract only the numeric part of the version
for /f "tokens=1-3 delims=." %%a in ("%PYTHON_VERSION%") do set PYTHON_VERSION_NUMERIC=%%a.%%b.%%c

cmake .. -G "Visual Studio 17 2022" ^
cmake .. -G "Visual Studio 15 2017" -A x64 ^
-DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^
-DCMAKE_PREFIX_PATH="%PREFIX%" ^
-DBUILD_PYTHON_INTERFACE=ON ^
Expand Down
2 changes: 1 addition & 1 deletion conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ requirements:
- libgomp # [linux]
- pip
- swig <4.3.0
- python
- python =3.10
- numpy
- tttrlib
- pkg-config # [not win]
Expand Down
Loading