mirror of
https://github.com/Z3Prover/z3
synced 2026-02-14 21:01:49 +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
d5fdcb8fcd
commit
7e452d9379
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
|
||||
dotnet new console
|
||||
dotnet add package Microsoft.Z3 --source ../nuget-packages --prerelease
|
||||
# Add RuntimeIdentifier to ensure native library is loaded correctly
|
||||
sed -i '' '/<\/PropertyGroup>/i\
|
||||
<RuntimeIdentifier>osx-x64</RuntimeIdentifier>\
|
||||
' test-nuget.csproj
|
||||
# Configure project to properly load native dependencies on macOS x64
|
||||
# Use full csproj rewrite to avoid sed escaping issues and ensure correct configuration
|
||||
cat > test-nuget.csproj << '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
|
||||
run: |
|
||||
|
|
@ -224,10 +237,23 @@ jobs:
|
|||
cd test-nuget
|
||||
dotnet new console
|
||||
dotnet add package Microsoft.Z3 --source ../nuget-packages --prerelease
|
||||
# Add RuntimeIdentifier to ensure native library is loaded correctly
|
||||
sed -i '' '/<\/PropertyGroup>/i\
|
||||
<RuntimeIdentifier>osx-arm64</RuntimeIdentifier>\
|
||||
' test-nuget.csproj
|
||||
# Configure project to properly load native dependencies on macOS ARM64
|
||||
# Use full csproj rewrite to avoid sed escaping issues and ensure correct configuration
|
||||
cat > test-nuget.csproj << '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
|
||||
run: |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue