mirror of
https://github.com/Z3Prover/z3
synced 2026-04-27 06:13:35 +00:00
Fix test-nuget on macOS by rewriting csproj with proper configuration
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
parent
c392c460ad
commit
1ea2b0865a
1 changed files with 34 additions and 8 deletions
42
.github/workflows/nightly-validation.yml
vendored
42
.github/workflows/nightly-validation.yml
vendored
|
|
@ -165,10 +165,23 @@ jobs:
|
||||||
cd test-nuget
|
cd test-nuget
|
||||||
dotnet new console
|
dotnet new console
|
||||||
dotnet add package Microsoft.Z3 --source ../nuget-packages --prerelease
|
dotnet add package Microsoft.Z3 --source ../nuget-packages --prerelease
|
||||||
# Add RuntimeIdentifier to ensure native library is loaded correctly
|
# Configure project to properly load native dependencies on macOS x64
|
||||||
sed -i '' '/<\/PropertyGroup>/i\
|
# Use full csproj rewrite to avoid sed escaping issues and ensure correct configuration
|
||||||
<RuntimeIdentifier>osx-x64</RuntimeIdentifier>\
|
cat > test-nuget.csproj << 'CSPROJ'
|
||||||
' test-nuget.csproj
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<RuntimeIdentifier>osx-x64</RuntimeIdentifier>
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.Z3" Version="*" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
|
CSPROJ
|
||||||
|
|
||||||
- name: Create test code
|
- name: Create test code
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -224,10 +237,23 @@ jobs:
|
||||||
cd test-nuget
|
cd test-nuget
|
||||||
dotnet new console
|
dotnet new console
|
||||||
dotnet add package Microsoft.Z3 --source ../nuget-packages --prerelease
|
dotnet add package Microsoft.Z3 --source ../nuget-packages --prerelease
|
||||||
# Add RuntimeIdentifier to ensure native library is loaded correctly
|
# Configure project to properly load native dependencies on macOS ARM64
|
||||||
sed -i '' '/<\/PropertyGroup>/i\
|
# Use full csproj rewrite to avoid sed escaping issues and ensure correct configuration
|
||||||
<RuntimeIdentifier>osx-arm64</RuntimeIdentifier>\
|
cat > test-nuget.csproj << 'CSPROJ'
|
||||||
' test-nuget.csproj
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<RuntimeIdentifier>osx-arm64</RuntimeIdentifier>
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.Z3" Version="*" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
|
CSPROJ
|
||||||
|
|
||||||
- name: Create test code
|
- name: Create test code
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue