Skip to content

Commit

Permalink
Fix nuget warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
peters committed Apr 13, 2023
1 parent 3aa2f10 commit 323edb7
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 182 deletions.
54 changes: 1 addition & 53 deletions .github/workflows/dotnetcore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,21 +99,14 @@ jobs:
env:
SNAPX_UNIX_SETUP_ZIP_REL_DIR: build/dotnet/${{ matrix.rid }}/Snap.Installer/${{ env.SNAPX_DOTNET_FRAMEWORK_VERSION }}/${{ matrix.configuration }}/publish
SNAPX_UNIX_CORERUN_REL_DIR: build/native/Unix/${{ matrix.rid }}/${{ matrix.configuration }}/Snap.CoreRun
SNAPX_UNIX_CORERUN_TESTS_REL_DIR: build/native/Unix/${{ matrix.rid }}/${{ matrix.configuration }}/Snap.CoreRun.Tests
SNAPX_UNIX_PAL_REL_DIR: build/native/Unix/${{ matrix.rid }}/${{ matrix.configuration }}/Snap.CoreRun.Pal
SNAPX_UNIX_BSDIFF_REL_DIR: build/native/Unix/${{ matrix.rid }}/${{ matrix.configuration }}/Snap.Bsdiff
run: |
mkdir -p ${{ github.workspace }}/artifacts/${{ env.SNAPX_UNIX_SETUP_ZIP_REL_DIR }}
cp ${{ github.workspace }}/${{ env.SNAPX_UNIX_SETUP_ZIP_REL_DIR }}/Setup-${{ matrix.rid }}.zip ${{ github.workspace }}/artifacts/${{ env.SNAPX_UNIX_SETUP_ZIP_REL_DIR }}/Setup-${{ matrix.rid }}.zip
mkdir -p ${{ github.workspace }}/artifacts/${{ env.SNAPX_UNIX_CORERUN_REL_DIR }}
cp ${{ github.workspace }}/${{ env.SNAPX_UNIX_CORERUN_REL_DIR }}/corerun ${{ github.workspace }}/artifacts/${{ env.SNAPX_UNIX_CORERUN_REL_DIR }}/corerun
mkdir -p ${{ github.workspace }}/artifacts/${{ env.SNAPX_UNIX_CORERUN_TESTS_REL_DIR }}
cp ${{ github.workspace }}/${{ env.SNAPX_UNIX_CORERUN_TESTS_REL_DIR }}/corerun ${{ github.workspace }}/artifacts/${{ env.SNAPX_UNIX_CORERUN_TESTS_REL_DIR }}/corerun
cp ${{ github.workspace }}/${{ env.SNAPX_UNIX_CORERUN_TESTS_REL_DIR }}/corerun_demoapp ${{ github.workspace }}/artifacts/${{ env.SNAPX_UNIX_CORERUN_TESTS_REL_DIR }}/corerun_demoapp
cp ${{ github.workspace }}/${{ env.SNAPX_UNIX_CORERUN_TESTS_REL_DIR }}/corerun_tests ${{ github.workspace }}/artifacts/${{ env.SNAPX_UNIX_CORERUN_TESTS_REL_DIR }}/corerun_tests
cp ${{ github.workspace }}/${{ env.SNAPX_UNIX_CORERUN_TESTS_REL_DIR }}/test.ico ${{ github.workspace }}/artifacts/${{ env.SNAPX_UNIX_CORERUN_TESTS_REL_DIR }}/test.ico
cp ${{ github.workspace }}/${{ env.SNAPX_UNIX_CORERUN_REL_DIR }}/corerun ${{ github.workspace }}/artifacts/${{ env.SNAPX_UNIX_CORERUN_REL_DIR }}/corerun.bin
mkdir -p ${{ github.workspace }}/artifacts/${{ env.SNAPX_UNIX_PAL_REL_DIR }}
cp ${{ github.workspace }}/${{ env.SNAPX_UNIX_PAL_REL_DIR }}/libpal.so ${{ github.workspace }}/artifacts/${{ env.SNAPX_UNIX_PAL_REL_DIR }}/libpal.so
Expand Down Expand Up @@ -191,51 +184,6 @@ jobs:
name: ${{ matrix.os }}-${{ matrix.rid }}-${{ matrix.configuration }}
path: ${{ github.workspace }}/artifacts/**/*

#test-linux-arm64:
# name: Test ${{ matrix.rid }}-${{ matrix.configuration }}
# runs-on: [self-hosted, linux, ARM64]
# needs: [setup, linux]
# strategy:
# matrix:
# include:
# - rid: linux-arm64
# configuration: Debug
# - rid: linux-arm64
# configuration: Release
# env:
# SNAPX_UNIX_CORERUN_TESTS_REL_DIR: build/native/Unix/${{ matrix.rid }}/${{ matrix.configuration }}/Snap.CoreRun.Tests
# SNAPX_VERSION: ${{ needs.setup.outputs.SNAPX_VERSION }}
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# with:
# fetch-depth: 0
#
# - name: Download ubuntu-latest-${{ matrix.rid }}-${{ matrix.configuration }} artifacts
# uses: actions/download-artifact@v3
# with:
# name: ubuntu-latest-${{ matrix.rid }}-${{ matrix.configuration }}
# path: ${{ github.workspace }}
#

# - name: Setup .NET
# uses: actions/[email protected]
# with:
# dotnet-version: |
# ${{ env.DOTNET_NET60_VERSION }}
# ${{ env.DOTNET_NET70_VERSION }}
# ${{ env.DOTNET_NET80_VERSION }}

#
# - name: Test native
# run: |
# chmod +x ${{ env.SNAPX_UNIX_CORERUN_TESTS_REL_DIR }}/corerun_tests
# ./${{ env.SNAPX_UNIX_CORERUN_TESTS_REL_DIR }}/corerun_tests
#
# - name: Test .NET
# shell: pwsh
# run: ./build.ps1 Run-Dotnet-UnitTests -Version ${{ env.SNAPX_VERSION }} -Configuration ${{ matrix.configuration }} -CIBuild -NetCoreAppVersion ${{ env.SNAPX_DOTNET_FRAMEWORK_VERSION }} -Rid ${{ matrix.rid }}

publish:
if: success()
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions src/Snap.CoreRun/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ if(WIN32)
endif()

pal_mitigate_dll_hijacking_for_targets(corerun corerun_demoapp)
elseif(UNIX)
# For historical reasons, NuGet & MSBuild treat paths without an extension as directories.
add_custom_command(TARGET corerun POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:corerun> $<TARGET_FILE_DIR:corerun>/corerun.bin
)
endif()

set_property(TARGET corerun corerun_static corerun_demoapp PROPERTY CXX_STANDARD 17)
Expand Down
42 changes: 21 additions & 21 deletions src/Snap/Snap.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,35 +27,35 @@

<!-- Windows-->
<ItemGroup Condition="!$(SnapBootstrap) AND $(OsPlatform) == 'Windows' AND $(SnapRid) == 'win-x86'">
<Content Include="../../build/native/Windows/win-x86/$(Configuration)/Snap.CoreRun/$(Configuration)/corerun.exe" Pack="true" Link="runtimes/win-x86/native/SnapxStub-win-x86.exe">
<Content Include="../../build/native/Windows/win-x86/$(Configuration)/Snap.CoreRun/$(Configuration)/corerun.exe" Pack="false" Link="runtimes/win-x86/native/SnapxStub-win-x86.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<PackageCopyToOutput>true</PackageCopyToOutput>
</Content>
<Content Include="../../build/native/Windows/win-x86/$(Configuration)/Snap.CoreRun.Pal/$(Configuration)/pal.dll" Pack="true" Link="runtimes/win-x86/native/SnapxLibPal-win-x86.dll">
<Content Include="../../build/native/Windows/win-x86/$(Configuration)/Snap.CoreRun.Pal/$(Configuration)/pal.dll" Pack="false" Link="runtimes/win-x86/native/SnapxLibPal-win-x86.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<PackageCopyToOutput>true</PackageCopyToOutput>
</Content>
<Content Include="../../build/native/Windows/win-x86/$(Configuration)/Snap.Bsdiff/$(Configuration)/snap_bsdiff.dll" Pack="true" Link="runtimes/win-x86/native/SnapxLibBsdiff-win-x86.dll">
<Content Include="../../build/native/Windows/win-x86/$(Configuration)/Snap.Bsdiff/$(Configuration)/snap_bsdiff.dll" Pack="false" Link="runtimes/win-x86/native/SnapxLibBsdiff-win-x86.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<PackageCopyToOutput>true</PackageCopyToOutput>
</Content>
</ItemGroup>

<ItemGroup Condition="!$(SnapBootstrap) AND $(OsPlatform) == 'Windows' AND $(SnapRid) == 'win-x64'">
<Content Include="../../build/native/Windows/win-x64/$(Configuration)/Snap.CoreRun/$(Configuration)/corerun.exe" Pack="true" Link="runtimes/win-x64/native/SnapxStub-win-x64.exe">
<Content Include="../../build/native/Windows/win-x64/$(Configuration)/Snap.CoreRun/$(Configuration)/corerun.exe" Pack="false" Link="runtimes/win-x64/native/SnapxStub-win-x64.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<PackageCopyToOutput>true</PackageCopyToOutput>
</Content>
<Content Include="../../build/native/Windows/win-x64/$(Configuration)/Snap.CoreRun.Pal/$(Configuration)/pal.dll" Pack="true" Link="runtimes/win-x64/native/SnapxLibPal-win-x64.dll">
<Content Include="../../build/native/Windows/win-x64/$(Configuration)/Snap.CoreRun.Pal/$(Configuration)/pal.dll" Pack="false" Link="runtimes/win-x64/native/SnapxLibPal-win-x64.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<PackageCopyToOutput>true</PackageCopyToOutput>
</Content>
<Content Include="../../build/native/Windows/win-x64/$(Configuration)/Snap.Bsdiff/$(Configuration)/snap_bsdiff.dll" Pack="true" Link="runtimes/win-x64/native/SnapxLibBsdiff-win-x64.dll">
<Content Include="../../build/native/Windows/win-x64/$(Configuration)/Snap.Bsdiff/$(Configuration)/snap_bsdiff.dll" Pack="false" Link="runtimes/win-x64/native/SnapxLibBsdiff-win-x64.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<PackageCopyToOutput>true</PackageCopyToOutput>
Expand All @@ -65,35 +65,35 @@
<ItemGroup Condition="!$(SnapBootstrap) AND $(OsPlatform) == 'Windows' AND $(SnapRid) == 'any'">

<!-- win-x86 -->
<Content Include="../../build/native/Windows/win-x86/$(Configuration)/Snap.CoreRun/$(Configuration)/corerun.exe" Pack="true" Link="runtimes/win-x86/native/SnapxStub-win-x86.exe">
<Content Include="../../build/native/Windows/win-x86/$(Configuration)/Snap.CoreRun/$(Configuration)/corerun.exe" Pack="false" Link="runtimes/win-x86/native/SnapxStub-win-x86.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<PackageCopyToOutput>true</PackageCopyToOutput>
</Content>
<Content Include="../../build/native/Windows/win-x86/$(Configuration)/Snap.CoreRun.Pal/$(Configuration)/pal.dll" Pack="true" Link="runtimes/win-x86/native/SnapxLibPal-win-x86.dll">
<Content Include="../../build/native/Windows/win-x86/$(Configuration)/Snap.CoreRun.Pal/$(Configuration)/pal.dll" Pack="false" Link="runtimes/win-x86/native/SnapxLibPal-win-x86.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<PackageCopyToOutput>true</PackageCopyToOutput>
</Content>
<Content Include="../../build/native/Windows/win-x86/$(Configuration)/Snap.Bsdiff/$(Configuration)/snap_bsdiff.dll" Pack="true" Link="runtimes/win-x86/native/SnapxLibBsdiff-win-x86.dll">
<Content Include="../../build/native/Windows/win-x86/$(Configuration)/Snap.Bsdiff/$(Configuration)/snap_bsdiff.dll" Pack="false" Link="runtimes/win-x86/native/SnapxLibBsdiff-win-x86.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<PackageCopyToOutput>true</PackageCopyToOutput>
</Content>
<!-- /win-x86 -->

<!-- win-x64 -->
<Content Include="../../build/native/Windows/win-x64/$(Configuration)/Snap.CoreRun/$(Configuration)/corerun.exe" Pack="true" Link="runtimes/win-x64/native/SnapxStub-win-x64.exe">
<Content Include="../../build/native/Windows/win-x64/$(Configuration)/Snap.CoreRun/$(Configuration)/corerun.exe" Pack="false" Link="runtimes/win-x64/native/SnapxStub-win-x64.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<PackageCopyToOutput>true</PackageCopyToOutput>
</Content>
<Content Include="../../build/native/Windows/win-x64/$(Configuration)/Snap.CoreRun.Pal/$(Configuration)/pal.dll" Pack="true" Link="runtimes/win-x64/native/SnapxLibPal-win-x64.dll">
<Content Include="../../build/native/Windows/win-x64/$(Configuration)/Snap.CoreRun.Pal/$(Configuration)/pal.dll" Pack="false" Link="runtimes/win-x64/native/SnapxLibPal-win-x64.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<PackageCopyToOutput>true</PackageCopyToOutput>
</Content>
<Content Include="../../build/native/Windows/win-x64/$(Configuration)/Snap.Bsdiff/$(Configuration)/snap_bsdiff.dll" Pack="true" Link="runtimes/win-x64/native/SnapxLibBsdiff-win-x64.dll">
<Content Include="../../build/native/Windows/win-x64/$(Configuration)/Snap.Bsdiff/$(Configuration)/snap_bsdiff.dll" Pack="false" Link="runtimes/win-x64/native/SnapxLibBsdiff-win-x64.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<PackageCopyToOutput>true</PackageCopyToOutput>
Expand All @@ -105,53 +105,53 @@

<!-- Unix -->
<ItemGroup Condition="!$(SnapBootstrap) AND $(OsPlatform) == 'Unix' AND $(SnapRid) == 'any'">
<Content Include="../../build/native/Unix/linux-x64/$(Configuration)/Snap.CoreRun/corerun" Pack="true" Link="runtimes/linux-x64/native/SnapxStub-linux-x64">
<Content Include="../../build/native/Unix/linux-x64/$(Configuration)/Snap.CoreRun/corerun.bin" Pack="false" Link="runtimes/linux-x64/native/SnapxStub-linux-x64">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<PackageCopyToOutput>true</PackageCopyToOutput>
</Content>
<Content Include="../../build/native/Unix/linux-x64/$(Configuration)/Snap.CoreRun.Pal/libpal.so" Pack="true" Link="runtimes/linux-x64/native/SnapxLibPal-linux-x64.so">
<Content Include="../../build/native/Unix/linux-x64/$(Configuration)/Snap.CoreRun.Pal/libpal.so" Pack="false" Link="runtimes/linux-x64/native/SnapxLibPal-linux-x64.so">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<PackageCopyToOutput>true</PackageCopyToOutput>
</Content>
<Content Include="../../build/native/Unix/linux-x64/$(Configuration)/Snap.Bsdiff/libsnap_bsdiff.so" Pack="true" Link="runtimes/linux-x64/native/SnapxLibBsdiff-linux-x64.so">
<Content Include="../../build/native/Unix/linux-x64/$(Configuration)/Snap.Bsdiff/libsnap_bsdiff.so" Pack="false" Link="runtimes/linux-x64/native/SnapxLibBsdiff-linux-x64.so">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<PackageCopyToOutput>true</PackageCopyToOutput>
</Content>
</ItemGroup>

<ItemGroup Condition="!$(SnapBootstrap) AND $(OsPlatform) == 'Unix' AND $(SnapRid) == 'linux-x64'">
<Content Include="../../build/native/Unix/linux-x64/$(Configuration)/Snap.CoreRun/corerun" Pack="true" Link="runtimes/linux-x64/native/SnapxStub-linux-x64">
<Content Include="../../build/native/Unix/linux-x64/$(Configuration)/Snap.CoreRun/corerun.bin" Pack="false" Link="runtimes/linux-x64/native/SnapxStub-linux-x64">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<PackageCopyToOutput>true</PackageCopyToOutput>
</Content>
<Content Include="../../build/native/Unix/linux-x64/$(Configuration)/Snap.CoreRun.Pal/libpal.so" Pack="true" Link="runtimes/linux-x64/native/SnapxLibPal-linux-x64.so">
<Content Include="../../build/native/Unix/linux-x64/$(Configuration)/Snap.CoreRun.Pal/libpal.so" Pack="false" Link="runtimes/linux-x64/native/SnapxLibPal-linux-x64.so">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<PackageCopyToOutput>true</PackageCopyToOutput>
</Content>
<Content Include="../../build/native/Unix/linux-x64/$(Configuration)/Snap.Bsdiff/libsnap_bsdiff.so" Pack="true" Link="runtimes/linux-x64/native/SnapxLibBsdiff-linux-x64.so">
<Content Include="../../build/native/Unix/linux-x64/$(Configuration)/Snap.Bsdiff/libsnap_bsdiff.so" Pack="false" Link="runtimes/linux-x64/native/SnapxLibBsdiff-linux-x64.so">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<PackageCopyToOutput>true</PackageCopyToOutput>
</Content>
</ItemGroup>

<ItemGroup Condition="!$(SnapBootstrap) AND $(OsPlatform) == 'Unix' AND $(SnapRid) == 'linux-arm64'">
<Content Include="../../build/native/Unix/linux-arm64/$(Configuration)/Snap.CoreRun/corerun" Pack="true" Link="runtimes/linux-arm64/native/SnapxStub-linux-arm64">
<Content Include="../../build/native/Unix/linux-arm64/$(Configuration)/Snap.CoreRun/corerun.bin" Pack="false" Link="runtimes/linux-arm64/native/SnapxStub-linux-arm64">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<PackageCopyToOutput>true</PackageCopyToOutput>
</Content>
<Content Include="../../build/native/Unix/linux-arm64/$(Configuration)/Snap.CoreRun.Pal/libpal.so" Pack="true" Link="runtimes/linux-arm64/native/SnapxLibPal-linux-arm64.so">
<Content Include="../../build/native/Unix/linux-arm64/$(Configuration)/Snap.CoreRun.Pal/libpal.so" Pack="false" Link="runtimes/linux-arm64/native/SnapxLibPal-linux-arm64.so">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<PackageCopyToOutput>true</PackageCopyToOutput>
</Content>
<Content Include="../../build/native/Unix/linux-arm64/$(Configuration)/Snap.Bsdiff/libsnap_bsdiff.so" Pack="true" Link="runtimes/linux-arm64/native/SnapxLibBsdiff-linux-arm64.so">
<Content Include="../../build/native/Unix/linux-arm64/$(Configuration)/Snap.Bsdiff/libsnap_bsdiff.so" Pack="false" Link="runtimes/linux-arm64/native/SnapxLibBsdiff-linux-arm64.so">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<PackageCopyToOutput>true</PackageCopyToOutput>
Expand Down
Loading

0 comments on commit 323edb7

Please sign in to comment.