From a2bf3b55dc352e57a3f687c25bcd604622f5d00d Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Fri, 5 Feb 2021 19:55:08 -0500 Subject: [PATCH 1/2] Add a vcpkg manifest and move some Windows CI to GHA. --- .github/workflows/windows-ci.yml | 77 ++++++++++++++++++++++++++++++++ appveyor.yml | 20 +++------ vcpkg.json | 22 +++++++++ 3 files changed, 104 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/windows-ci.yml create mode 100644 vcpkg.json diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml new file mode 100644 index 000000000..25b6abc5b --- /dev/null +++ b/.github/workflows/windows-ci.yml @@ -0,0 +1,77 @@ +name: Windows-CI +on: [push, pull_request] + +jobs: + build: + runs-on: ${{ matrix.platform.image }} + strategy: + matrix: + platform: + - { image: windows-2019, generator: Visual Studio 16 2019, cmake-arch: Win32, arch: x86, python: 3.9, str: windows-x86-v142 } + - { image: windows-2019, generator: Visual Studio 16 2019, cmake-arch: x64, arch: x64, python: 3.8, str: windows-x64-v142 } + - { image: windows-2016, generator: Visual Studio 15 2017, cmake-arch: Win32, arch: x86, python: 3.7, str: windows-x86-v141 } + - { image: windows-2016, generator: Visual Studio 15 2017, cmake-arch: x64, arch: x64, python: 3.6, str: windows-x64-v141 } + env: + VCPKG_BINARY_SOURCES: 'clear' + + steps: + - name: Checkout HSPlasma + uses: actions/checkout@v2 + - name: Checkout vcpkg + uses: actions/checkout@v2 + with: + repository: microsoft/vcpkg + path: vcpkg + + # Use actions/cache for our library cache because we use multiple compilers per triplet. + # This would cause package hash collisions in the NuGet store, triggering upload race failures. + - name: Determine vcpkg rev + id: vcpkg-rev + run: | + Set-Location vcpkg + Write-Host "::set-output name=ref::$(git rev-parse HEAD)" + + - name: Restore Dependency Libraries + uses: actions/cache@v2 + with: + path: build/vcpkg_installed + key: vcpkg-${{ matrix.platform.str }} ${{ steps.vcpkg-rev.outputs.ref }} ${{ hashFiles('vcpkg.json') }} + restore-keys: | + vcpkg-${{ matrix.platform.str }} ${{ steps.vcpkg-rev.outputs.ref }} + vcpkg-${{ matrix.platform.str }} + + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.platform.python }} + architecture: ${{ matrix.platform.arch }} + + - name: Configure + run: | + cmake ` + -G "${{ matrix.platform.generator }}" -A "${{ matrix.platform.cmake-arch }}" ` + -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}"/vcpkg/scripts/buildsystems/vcpkg.cmake ` + -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/build/install" ` + -DVCPKG_TARGET_TRIPLET=${{ matrix.platform.arch }}-windows-static-md ` + -DPYTHON_EXECUTABLE="${{ env.pythonLocation }}/python.exe" ` + -DPYTHON_LIBRARY="${{ env.pythonLocation }}/libs/python$("${{ matrix.platform.python }}".replace('.', '')).lib" ` + -S . -B build + + - name: Build + run: | + cmake --build build --config Release -j 2 + + - name: Install + run: | + cmake --build build --target INSTALL --config Release -j 2 + + - name: Test + run: | + Set-Location build/install/bin + python -c "import PyHSPlasma; print(dir(PyHSPlasma))" + + - name: Upload Artifacts + uses: actions/upload-artifact@v2 + with: + name: libhsplasma-${{ matrix.platform.str }}-py${{ matrix.platform.python }} + path: build/install diff --git a/appveyor.yml b/appveyor.yml index ed8093674..35e435804 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -18,22 +18,12 @@ environment: - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 VisualStudioVersion: 14.0 CMAKE_GENERATOR: Visual Studio 14 2015 - PYTHON_PREFIX: C:\Python36 - CMAKE_PARAMS: -DPYTHON_INCLUDE_DIR=C:/Python36/include - -DPYTHON_LIBRARY=C:/Python36/libs/python36.lib - -DPYTHON_EXECUTABLE=C:/Python36/python.exe + PYTHON_PREFIX: C:\Python35 + CMAKE_PARAMS: -DPYTHON_INCLUDE_DIR=C:/Python35/include + -DPYTHON_LIBRARY=C:/Python35/libs/python35.lib + -DPYTHON_EXECUTABLE=C:/Python35/python.exe PREFIX_TARGET: vc2015-x86-static - DIST_SUFFIX: '%PREFIX_TARGET%-py36' - - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - VisualStudioVersion: 15.0 - CMAKE_GENERATOR: Visual Studio 15 2017 Win64 - PYTHON_PREFIX: C:\Python36-x64 - CMAKE_PARAMS: -DPYTHON_INCLUDE_DIR=C:/Python36-x64/include - -DPYTHON_LIBRARY=C:/Python36-x64/libs/python36.lib - -DPYTHON_EXECUTABLE=C:/Python36-x64/python.exe - PREFIX_TARGET: vc2017-x64-static - DIST_SUFFIX: '%PREFIX_TARGET%-py36' + DIST_SUFFIX: '%PREFIX_TARGET%-py35' before_build: # Download prefix libs diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 000000000..4e3a8b901 --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "libhsplasma", + "version-string": "2021.02.05", + "description": "Cross-platform Plasma data and network library", + "dependencies": [ + "libjpeg-turbo", + "libpng", + "string-theory", + "zlib" + ], + "features": { + "net": { + "description": "MOUL networking support", + "dependencies": [ + "openssl" + ] + } + }, + "default-features": [ + "net" + ] +} \ No newline at end of file From 5c43c314896387e2a231a6f0dfdb8ad5cfb3124c Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sun, 7 Mar 2021 23:18:18 -0500 Subject: [PATCH 2/2] Remove stale VS 2015 AppVeyor build. --- appveyor.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 35e435804..1d49c997f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -15,16 +15,6 @@ environment: PREFIX_TARGET: vc2013-x86-static DIST_SUFFIX: '%PREFIX_TARGET%-py27' - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - VisualStudioVersion: 14.0 - CMAKE_GENERATOR: Visual Studio 14 2015 - PYTHON_PREFIX: C:\Python35 - CMAKE_PARAMS: -DPYTHON_INCLUDE_DIR=C:/Python35/include - -DPYTHON_LIBRARY=C:/Python35/libs/python35.lib - -DPYTHON_EXECUTABLE=C:/Python35/python.exe - PREFIX_TARGET: vc2015-x86-static - DIST_SUFFIX: '%PREFIX_TARGET%-py35' - before_build: # Download prefix libs - mkdir build_deps && cd build_deps