Skip to content

Commit

Permalink
Merge pull request #54 from Fluorescence-Tools/development
Browse files Browse the repository at this point in the history
Build Windows
  • Loading branch information
tpeulen authored Jan 25, 2025
2 parents 59227b5 + 7faa5d0 commit d77d0f3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
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

0 comments on commit d77d0f3

Please sign in to comment.