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 and upload Windows libs. #9

Merged
merged 1 commit into from
Feb 16, 2022
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
24 changes: 24 additions & 0 deletions .github/workflows/build-libs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,27 @@ jobs:
path: "libsndfile.dylib"
retention-days: 7
if-no-files-found: error

build-libs-windows:
runs-on: windows-2016
strategy:
matrix:
include:
- triplet: "x64-windows-custom"
libname: "libsndfile_x64.dll"
- triplet: "x86-windows-custom"
libname: "libsndfile_x86.dll"
fail-fast: true

steps:
- uses: actions/checkout@v2
- name: Build library
run: "vcpkg install libsndfile:${{ matrix.triplet }} --overlay-triplets=triplets"
- name: Copy library
run: "Copy-Item c:/vcpkg/installed/${{ matrix.triplet }}/bin/sndfile.dll -Destination ${{ matrix.libname }}"
- uses: actions/upload-artifact@v2
with:
name: lib
path: ${{ matrix.libname }}
retention-days: 7
if-no-files-found: error
4 changes: 4 additions & 0 deletions triplets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Custom triplets for Vcpkg.

https://vcpkg.readthedocs.io/en/latest/users/triplets/
https://vcpkg.readthedocs.io/en/latest/examples/overlay-triplets-linux-dynamic/
9 changes: 9 additions & 0 deletions triplets/x64-windows-custom.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic) # Runtime always dynamically linked.
set(VCPKG_LIBRARY_LINKAGE static) # Libs are static by default.
set(VCPKG_PLATFORM_TOOLSET v140) # Enforce v140 toolset.
set(VCPKG_BUILD_TYPE release) # Skip debug builds.

if (PORT STREQUAL libsndfile) # Only libsndfile is dynamic.
set(VCPKG_LIBRARY_LINKAGE dynamic)
endif()
9 changes: 9 additions & 0 deletions triplets/x86-windows-custom.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
set(VCPKG_TARGET_ARCHITECTURE x86)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_PLATFORM_TOOLSET v140)
set(VCPKG_BUILD_TYPE release)

if (PORT STREQUAL libsndfile)
set(VCPKG_LIBRARY_LINKAGE dynamic)
endif()