diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index c9b01705..afa2c855 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -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 @@ -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: @@ -37,6 +44,8 @@ jobs: channels: conda-forge,bioconda,tpeulen,defaults channel-priority: true + + - name: Display Conda Settings shell: bash -el {0} run: | diff --git a/conda-recipe/bld.bat b/conda-recipe/bld.bat index e37f2025..4f224183 100755 --- a/conda-recipe/bld.bat +++ b/conda-recipe/bld.bat @@ -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%" ^ @@ -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 ^ @@ -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 ^ diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 0d089644..f128def8 100755 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -32,7 +32,7 @@ requirements: - libgomp # [linux] - pip - swig <4.3.0 - - python + - python =3.10 - numpy - tttrlib - pkg-config # [not win]