diff --git a/.github/workflows/build-action.yml b/.github/workflows/build-action.yml index 6a4bf78a7..e7949e229 100644 --- a/.github/workflows/build-action.yml +++ b/.github/workflows/build-action.yml @@ -163,8 +163,8 @@ jobs: with: files: ${{ github.workspace }}/build/output/*.tar.gz - build-windows-2019: - runs-on: windows-2019 + build-windows-latest: + runs-on: windows-latest timeout-minutes: 60 steps: - @@ -172,20 +172,26 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 - # Use a set working python version and VS-2019 as newer versions can't seem to load _gravity.pyd on Windows - name: setup-python uses: actions/setup-python@v5 with: - python-version: '3.7.9' + python-version: '3.11' + + # The pthreads-win32 build depends on the VS2010 runtime - which isn't on the latest runners + - + name: install-VS2010-redistributable + run: | + Invoke-WebRequest "https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x64.exe" -OutFile vcredist2010_x64.exe + .\vcredist2010_x64.exe /quiet /norestart - name: build shell: cmd run: | python --version - python -m pip install --upgrade setuptools six + python -m pip install --upgrade six mkdir build && cd build - cmake -DCMAKE_INSTALL_PREFIX=gravity -G"Visual Studio 16 2019" -A x64 .. + cmake -DCMAKE_INSTALL_PREFIX=gravity -G"Visual Studio 17 2022" -A x64 .. cmake --build . --target install --config Release --parallel start /B gravity/bin/ServiceDirectory.exe ctest --test-dir gravity_external_examples_tests-prefix/src/gravity_external_examples_tests-build -C Release --verbose diff --git a/cmake/GravityExternalUrls.cmake b/cmake/GravityExternalUrls.cmake index 12273fd76..71d9f25f6 100644 --- a/cmake/GravityExternalUrls.cmake +++ b/cmake/GravityExternalUrls.cmake @@ -16,7 +16,7 @@ set(spdlog_url "https://github.com/gabime/spdlog/archive/refs/tags/v1.9.2.zip") set(boost_url "https://dl.bintray.com/boostorg/release/1.72.0/source/boost_1_72_0.zip") -set(swigwin_url "http://prdownloads.sourceforge.net/swig/swigwin-4.0.1.zip") +set(swigwin_url "http://prdownloads.sourceforge.net/swig/swigwin-4.3.1.zip") set(lexyacc_win_url "https://master.dl.sourceforge.net/project/winflexbison/old_versions/win_flex_bison-2.5.22.zip") diff --git a/src/api/python/src/python/gravity/__init__.py b/src/api/python/src/python/gravity/__init__.py index 63dc6f740..c10ddee25 100644 --- a/src/api/python/src/python/gravity/__init__.py +++ b/src/api/python/src/python/gravity/__init__.py @@ -14,7 +14,11 @@ # License along with this program; # If not, see . # - +import os +if hasattr(os, "add_dll_directory"): # Python >=3.8 on Windows does not search using PATH + bin_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", "..", "bin") + os.add_dll_directory(bin_dir) + from .gravity import GravityNode, GravitySubscriber, GravityRequestor, GravityServiceProvider, GravityHeartbeatListener, Log, Logger, SpdLog from .GravityDataProduct import GravityDataProduct from .GravityLogHandler import GravityLogHandler