Skip to content

Commit

Permalink
fix: Add native runtime dependencies to nuspec (#4216)
Browse files Browse the repository at this point in the history
Add native runtime dependencies to nuspec

This removes the need to manually reference the native runtime NuGets
  • Loading branch information
lokitoth authored Oct 13, 2022
1 parent 1c5cefb commit 28129af
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
30 changes: 29 additions & 1 deletion .github/workflows/dotnet_nugets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ jobs:
shell: bash
run: |
version=$(./utl/version_number.py)
version_trimmed=$(echo $version | sed 's/\+.*//')
echo "Generated version number: $version"
echo "::set-output name=version::$version"
echo "::set-output name=version_trimmed::$version_trimmed"
# Build .NET Core, all platforms
- name: Configure .NET Core
Expand All @@ -58,6 +60,7 @@ jobs:
-Dvw_DOTNET_USE_MSPROJECT=Off
-DVW_NUGET_PACKAGE_NAME=VowpalWabbit
-DVW_NUGET_PACKAGE_VERSION="${{ steps.get_version.outputs.version }}"
-DVW_NUGET_PACKAGE_VERSION_TRIMMED="${{ steps.get_version.outputs.version_trimmed }}"
-DBUILD_FLATBUFFERS=Off
-DRAPIDJSON_SYS_DEP=Off
-DFMT_SYS_DEP=Off
Expand All @@ -83,6 +86,7 @@ jobs:
-Dvw_BUILD_NET_FRAMEWORK=On
-DVW_NUGET_PACKAGE_NAME=VowpalWabbit
-DVW_NUGET_PACKAGE_VERSION="${{ steps.get_version.outputs.version }}"
-DVW_NUGET_PACKAGE_VERSION_TRIMMED="${{ steps.get_version.outputs.version_trimmed }}"
-DBUILD_FLATBUFFERS=Off
-DRAPIDJSON_SYS_DEP=Off
-DFMT_SYS_DEP=Off
Expand Down Expand Up @@ -169,7 +173,15 @@ jobs:
path: downloaded_nugets
- uses: actions/download-artifact@v1
with:
name: VowpalWabbit.runtime.${{matrix.config.runtime_id}}.${{steps.get_version.outputs.version}}.nupkg
name: VowpalWabbit.runtime.win-x64.${{steps.get_version.outputs.version}}.nupkg
path: downloaded_nugets
- uses: actions/download-artifact@v1
with:
name: VowpalWabbit.runtime.linux-x64.${{steps.get_version.outputs.version}}.nupkg
path: downloaded_nugets
- uses: actions/download-artifact@v1
with:
name: VowpalWabbit.runtime.osx-x64.${{steps.get_version.outputs.version}}.nupkg
path: downloaded_nugets
- name: List downloaded packages
run: ls downloaded_nugets
Expand Down Expand Up @@ -222,6 +234,14 @@ jobs:
with:
name: VowpalWabbit.runtime.win-x64.${{steps.get_version.outputs.version}}.nupkg
path: downloaded_nugets
- uses: actions/download-artifact@v1
with:
name: VowpalWabbit.runtime.linux-x64.${{steps.get_version.outputs.version}}.nupkg
path: downloaded_nugets
- uses: actions/download-artifact@v1
with:
name: VowpalWabbit.runtime.osx-x64.${{steps.get_version.outputs.version}}.nupkg
path: downloaded_nugets
- name: List downloaded packages
run: ls downloaded_nugets

Expand Down Expand Up @@ -279,6 +299,14 @@ jobs:
with:
name: VowpalWabbit.runtime.win-x64.${{steps.get_version.outputs.version}}.nupkg
path: downloaded_nugets
- uses: actions/download-artifact@v1
with:
name: VowpalWabbit.runtime.linux-x64.${{steps.get_version.outputs.version}}.nupkg
path: downloaded_nugets
- uses: actions/download-artifact@v1
with:
name: VowpalWabbit.runtime.osx-x64.${{steps.get_version.outputs.version}}.nupkg
path: downloaded_nugets
- name: List downloaded packages
run: ls downloaded_nugets

Expand Down
4 changes: 4 additions & 0 deletions nuget/dotnet/dotnet.nuspec.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
<dependency id="System.Threading.Tasks.Dataflow" version="4.11.1" exclude="Build,Analyzers" />
<dependency id="System.Runtime.Caching" version="4.7.0" exclude="Build,Analyzers" />
<dependency id="Microsoft.NETCore.Platforms" version="6.0.5" exclude="Build,Analyzers" />

<dependency id="VowpalWabbit.runtime.linux-x64" version="@VW_NUGET_PACKAGE_VERSION_TRIMMED@" />
<dependency id="VowpalWabbit.runtime.win-x64" version="@VW_NUGET_PACKAGE_VERSION_TRIMMED@" />
<dependency id="VowpalWabbit.runtime.osx-x64" version="@VW_NUGET_PACKAGE_VERSION_TRIMMED@" />
</group>
<group targetFramework=".NETFramework@VW_NET_FRAMEWORK_VERSION@">
<dependency id="Newtonsoft.Json" version="9.0.1" exclude="Build,Analyzers" />
Expand Down
4 changes: 4 additions & 0 deletions nuget/dotnet/dotnetcore.nuspec.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
<dependency id="System.Threading.Tasks.Dataflow" version="4.11.1" exclude="Build,Analyzers" />
<dependency id="System.Runtime.Caching" version="4.7.0" exclude="Build,Analyzers" />
<dependency id="Microsoft.NETCore.Platforms" version="6.0.5" exclude="Build,Analyzers" />

<dependency id="VowpalWabbit.runtime.linux-x64" version="@VW_NUGET_PACKAGE_VERSION_TRIMMED@" />
<dependency id="VowpalWabbit.runtime.win-x64" version="@VW_NUGET_PACKAGE_VERSION_TRIMMED@" />
<dependency id="VowpalWabbit.runtime.osx-x64" version="@VW_NUGET_PACKAGE_VERSION_TRIMMED@" />
</group>
</dependencies>
</metadata>
Expand Down

0 comments on commit 28129af

Please sign in to comment.