Skip to content
Open
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ concurrency:
cancel-in-progress: true

env:
# Projects target a mix of net9.0, net10.0 and netstandard2.1, so both SDKs
# Projects target both net9.0 and net10.0 ([BUILD-MULTI-TARGET]), so both SDKs
# are installed everywhere .NET builds (see the setup-dotnet steps below).
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:

- name: Native AOT smoke tests (DataProviderMigrate)
env:
DATAPROVIDERMIGRATE_AOT_BIN: ${{ github.workspace }}/Migration/DataProviderMigrate/bin/Release/net9.0/linux-x64/publish/DataProviderMigrate
DATAPROVIDERMIGRATE_AOT_BIN: ${{ github.workspace }}/Migration/DataProviderMigrate/bin/Release/net10.0/linux-x64/publish/DataProviderMigrate
run: >-
dotnet test Migration/Nimblesite.DataProvider.Migration.Tests
--filter "FullyQualifiedName~NativeAotMigrateSmokeTests"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-dotnet-aot-multiplatform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
run: |
set -euo pipefail
dotnet publish "${{ inputs.project }}" \
-c Release -r "${{ matrix.rid }}" \
-c Release -f net10.0 -r "${{ matrix.rid }}" \
-p:PublishAot=true -p:InvariantGlobalization=true \
--self-contained \
-o "${GITHUB_WORKSPACE}/aot-out"
Expand Down
1 change: 0 additions & 1 deletion DataProvider/DataProvider/DataProvider.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<EnforceExtendedAnalyzerRules>false</EnforceExtendedAnalyzerRules>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
<TargetFramework>net9.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<LangVersion>preview</LangVersion>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,16 @@
</Content>
</ItemGroup>

<!-- The build target below builds each tool for this build's TargetFramework, so run
that framework's output. [BUILD-MULTI-TARGET] -->
<PropertyGroup>
<DataProviderMigrateToolDll>$(MSBuildThisFileDirectory)../../Migration/DataProviderMigrate/bin/$(Configuration)/net9.0/DataProviderMigrate.dll</DataProviderMigrateToolDll>
<LqlToolDll>$(MSBuildThisFileDirectory)../../Lql/Lql/bin/$(Configuration)/net9.0/Lql.dll</LqlToolDll>
<DataProviderToolDll>$(MSBuildThisFileDirectory)../DataProvider/bin/$(Configuration)/net10.0/DataProvider.dll</DataProviderToolDll>
<DataProviderMigrateToolDll>$(MSBuildThisFileDirectory)../../Migration/DataProviderMigrate/bin/$(Configuration)/$(TargetFramework)/DataProviderMigrate.dll</DataProviderMigrateToolDll>
<LqlToolDll>$(MSBuildThisFileDirectory)../../Lql/Lql/bin/$(Configuration)/$(TargetFramework)/Lql.dll</LqlToolDll>
<DataProviderToolDll>$(MSBuildThisFileDirectory)../DataProvider/bin/$(Configuration)/$(TargetFramework)/DataProvider.dll</DataProviderToolDll>
</PropertyGroup>

<ItemGroup>
<DataProviderToolAssemblies Include="$(MSBuildThisFileDirectory)../DataProvider/bin/$(Configuration)/net10.0/*.dll" />
<DataProviderToolAssemblies Include="$(MSBuildThisFileDirectory)../DataProvider/bin/$(Configuration)/$(TargetFramework)/*.dll" />
</ItemGroup>

<Target Name="BuildCodegenTools" BeforeTargets="CreateDatabaseSchema">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
<TargetFramework>net9.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<LangVersion>preview</LangVersion>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
Expand Down
3 changes: 2 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<PackageReadmeFile>README.md</PackageReadmeFile>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TargetFramework>net9.0</TargetFramework>
<!-- Every project builds for both runtimes unless it opts out. [BUILD-MULTI-TARGET] -->
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down
1 change: 0 additions & 1 deletion Lql/Nimblesite.Lql.Browser/Nimblesite.Lql.Browser.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<IsPackable>false</IsPackable>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<ApplicationManifest>app.manifest</ApplicationManifest>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand All @@ -26,9 +25,11 @@
<AdditionalFiles Include="DataProvider.json" />
</ItemGroup>

<!-- The build target below builds each tool for this build's TargetFramework, so run
that framework's output. [BUILD-MULTI-TARGET] -->
<PropertyGroup>
<DataProviderMigrateToolDll>$(MSBuildThisFileDirectory)../../Migration/DataProviderMigrate/bin/$(Configuration)/net9.0/DataProviderMigrate.dll</DataProviderMigrateToolDll>
<DataProviderToolDll>$(MSBuildThisFileDirectory)../../DataProvider/DataProvider/bin/$(Configuration)/net10.0/DataProvider.dll</DataProviderToolDll>
<DataProviderMigrateToolDll>$(MSBuildThisFileDirectory)../../Migration/DataProviderMigrate/bin/$(Configuration)/$(TargetFramework)/DataProviderMigrate.dll</DataProviderMigrateToolDll>
<DataProviderToolDll>$(MSBuildThisFileDirectory)../../DataProvider/DataProvider/bin/$(Configuration)/$(TargetFramework)/DataProvider.dll</DataProviderToolDll>
</PropertyGroup>

<Target Name="BuildCodegenTools" BeforeTargets="CreateDatabaseSchema">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<LangVersion>preview</LangVersion>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
Expand Down Expand Up @@ -40,8 +39,10 @@
<ProjectReference Include="../Nimblesite.Lql.TypeProvider.FSharp.Tests.Data/Nimblesite.Lql.TypeProvider.FSharp.Tests.Data.csproj" />
</ItemGroup>

<!-- The build target below builds each tool for this build's TargetFramework, so run
that framework's output. [BUILD-MULTI-TARGET] -->
<PropertyGroup>
<DataProviderMigrateToolDll>$(MSBuildThisFileDirectory)../../Migration/DataProviderMigrate/bin/$(Configuration)/net9.0/DataProviderMigrate.dll</DataProviderMigrateToolDll>
<DataProviderMigrateToolDll>$(MSBuildThisFileDirectory)../../Migration/DataProviderMigrate/bin/$(Configuration)/$(TargetFramework)/DataProviderMigrate.dll</DataProviderMigrateToolDll>
</PropertyGroup>

<Target Name="BuildMigrationTool" BeforeTargets="CreateTestDatabase">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<LangVersion>preview</LangVersion>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
Expand Down
2 changes: 2 additions & 0 deletions Lql/Nimblesite.Lql.Website/Nimblesite.Lql.Website.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
<PropertyGroup>
<!-- Deployed Blazor WebAssembly site: one runtime. [BUILD-MULTI-TARGET] -->
<TargetFrameworks></TargetFrameworks>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down
29 changes: 18 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -208,16 +208,21 @@ _test_dotnet:
echo "FAIL [$$SRC_KEY]: Tests failed ($$test_proj)"; \
exit 1; \
fi; \
COBERTURA=$$(find "$$test_proj/TestResults" -name "coverage.cobertura.xml" -type f 2>/dev/null | head -1); \
if [ -z "$$COBERTURA" ]; then \
COBERTURA_FILES=$$(find "$$test_proj/TestResults" -name "coverage.cobertura.xml" -type f 2>/dev/null); \
if [ -z "$$COBERTURA_FILES" ]; then \
echo "FAIL [$$SRC_KEY]: No coverage file produced ($$test_proj)"; \
exit 1; \
fi; \
LINE_RATE=$$(sed -n 's/.*line-rate="\([0-9.]*\)".*/\1/p' "$$COBERTURA" | head -1); \
if [ -z "$$LINE_RATE" ]; then \
echo "FAIL [$$SRC_KEY]: Could not parse line-rate from $$COBERTURA"; \
exit 1; \
fi; \
LINE_RATE=""; \
for COBERTURA in $$COBERTURA_FILES; do \
RATE=$$(sed -n 's/.*line-rate="\([0-9.]*\)".*/\1/p' "$$COBERTURA" | head -1); \
if [ -z "$$RATE" ]; then \
echo "FAIL [$$SRC_KEY]: Could not parse line-rate from $$COBERTURA"; \
exit 1; \
fi; \
echo " Coverage report $$COBERTURA: line-rate $$RATE"; \
if [ -z "$$LINE_RATE" ] || [ "$$(echo "$$RATE < $$LINE_RATE" | bc -l)" = "1" ]; then LINE_RATE=$$RATE; fi; \
done; \
COVERAGE=$$(echo "$$LINE_RATE * 100" | bc -l); \
COVERAGE_FMT=$$(printf "%.2f" $$COVERAGE); \
echo ""; \
Expand Down Expand Up @@ -277,24 +282,26 @@ _setup_dotnet:
# as a black-box smoke test against a throwaway SQLite database. Implements
# [MIG-AOT-CI]. RID auto-detects per platform; override with `make aot RID=...`.
AOT_PROJ := Migration/DataProviderMigrate/DataProviderMigrate.csproj
# The native binary is self-contained, so it ships one runtime: .NET 10 (LTS). [BUILD-MULTI-TARGET]
AOT_TFM := net10.0
ifeq ($(OS),Windows_NT)
RID ?= win-x64
AOT_EXE := Migration/DataProviderMigrate/bin/Release/net9.0/$(RID)/publish/DataProviderMigrate.exe
AOT_EXE := Migration/DataProviderMigrate/bin/Release/$(AOT_TFM)/$(RID)/publish/DataProviderMigrate.exe
else ifeq ($(shell uname -s),Darwin)
ifeq ($(shell uname -m),arm64)
RID ?= osx-arm64
else
RID ?= osx-x64
endif
AOT_EXE := Migration/DataProviderMigrate/bin/Release/net9.0/$(RID)/publish/DataProviderMigrate
AOT_EXE := Migration/DataProviderMigrate/bin/Release/$(AOT_TFM)/$(RID)/publish/DataProviderMigrate
else
RID ?= linux-x64
AOT_EXE := Migration/DataProviderMigrate/bin/Release/net9.0/$(RID)/publish/DataProviderMigrate
AOT_EXE := Migration/DataProviderMigrate/bin/Release/$(AOT_TFM)/$(RID)/publish/DataProviderMigrate
endif

_aot_dotnet:
@echo "==> Publishing Native AOT ($(RID))..."
dotnet publish $(AOT_PROJ) -c Release -r $(RID) -p:PublishAot=true --self-contained $(DOTNET_BUILD_FLAGS)
dotnet publish $(AOT_PROJ) -c Release -f $(AOT_TFM) -r $(RID) -p:PublishAot=true --self-contained $(DOTNET_BUILD_FLAGS)
@echo "==> Native smoke test: migrate example schema to SQLite..."
$(AOT_EXE) migrate --schema Migration/DataProviderMigrate/example-schema.yaml \
--output $(AOT_SMOKE_DB) --provider sqlite
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<OutputType>Library</OutputType>
<IsTestProject>true</IsTestProject>
<IsPackable>false</IsPackable>
Expand All @@ -17,7 +16,17 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.0" />
<!-- Mvc.Testing ships one framework per major version. [BUILD-MULTI-TARGET] -->
<PackageReference
Include="Microsoft.AspNetCore.Mvc.Testing"
Version="9.0.3"
Condition="'$(TargetFramework)' == 'net9.0'"
/>
<PackageReference
Include="Microsoft.AspNetCore.Mvc.Testing"
Version="10.0.0"
Condition="'$(TargetFramework)' == 'net10.0'"
/>
<PackageReference Include="Microsoft.Playwright" Version="1.50.0" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="10.0.3" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="6.0.1" />
Expand Down
Loading
Loading