Skip to content

Commit 57e7350

Browse files
authored
Merge pull request praeclarum#1217 from praeclarum/net8
Upgrade to .NET 8
2 parents 89bb0e3 + 3d25c8b commit 57e7350

File tree

10 files changed

+33
-101
lines changed

10 files changed

+33
-101
lines changed

.github/workflows/build.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
jobs:
1212
build:
1313

14-
runs-on: macOS-latest
14+
runs-on: ubuntu-latest
1515

1616
steps:
1717

@@ -21,19 +21,33 @@ jobs:
2121
env:
2222
VERSION_BUILD: ${{github.run_number}}
2323
run: |
24-
sed -i bak "s:</VersionPrefix>:.$VERSION_BUILD</VersionPrefix>:g" Directory.Build.props
24+
sed -i.bak "s:</VersionPrefix>:.$VERSION_BUILD</VersionPrefix>:g" Directory.Build.props
25+
26+
- name: Set up .NET
27+
uses: actions/setup-dotnet@v4
28+
with:
29+
global-json-file: global.json
30+
31+
- name: Install Code Coverarage Tool
32+
run: dotnet tool install --global dotnet-reportgenerator-globaltool
2533

2634
- name: Restore NuGets
27-
run: nuget restore SQLite.sln
35+
run: dotnet restore SQLite.sln
2836

2937
- name: Build and Test
3038
run: |
3139
set -e
3240
cd tests/SQLite.Tests
3341
dotnet test /p:AltCover=true /p:AltCoverForce=true "/p:AltCoverTypeFilter=SQLite.Tests.*"
42+
43+
- name: Verify Async API Matches Sync API
44+
run: |
45+
set -e
46+
dotnet run --project tests/ApiDiff/ApiDiff.csproj
3447
3548
- name: Generate Code Coverage Report
3649
uses: danielpalme/ReportGenerator-GitHub-Action@4.8.4
50+
if: github.event_name == 'push'
3751
with:
3852
reports: 'tests/SQLite.Tests/coverage.xml' # REQUIRED # The coverage reports that should be parsed (separated by semicolon). Globbing is supported.
3953
targetdir: 'CoverageReport' # REQUIRED # The directory where the generated report should be saved.
@@ -59,11 +73,12 @@ jobs:
5973
enable_jekyll: true
6074

6175
- name: Package
76+
if: github.event_name == 'push'
6277
run: |
6378
make nuget
6479
6580
- uses: actions/upload-artifact@master
81+
if: github.event_name == 'push'
6682
with:
6783
name: Packages
6884
path: PackagesOut
69-

Makefile

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,7 @@ SRC=src/SQLite.cs src/SQLiteAsync.cs
33

44
PACKAGES_OUT=$(abspath PackagesOut)
55

6-
all: test nuget
7-
8-
test: tests/bin/Release/SQLite.Tests.dll tests/ApiDiff/bin/Release/ApiDiff.exe
9-
mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe tests/bin/Release/SQLite.Tests.dll --labels=On --trace=Info
10-
mono tests/ApiDiff/bin/Release/ApiDiff.exe
11-
12-
tests/bin/Release/SQLite.Tests.dll: tests/SQLite.Tests.csproj $(SRC)
13-
nuget restore SQLite.sln
14-
msbuild /p:Configuration=Release tests/SQLite.Tests.csproj
15-
16-
tests/ApiDiff/bin/Release/ApiDiff.exe: tests/ApiDiff/ApiDiff.csproj $(SRC)
17-
msbuild /p:Configuration=Release tests/ApiDiff/ApiDiff.csproj
6+
all: nuget
187

198
nuget: pclnuget basenuget sqlciphernuget staticnuget
209

SQLite.sln

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
99
EndProject
1010
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{FECC0E44-E626-49CB-BD8B-0CFBD93FBEFF}"
1111
EndProject
12-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SQLiteTestsiOS", "tests\SQLite.Tests.iOS\SQLiteTestsiOS.csproj", "{81850129-71C3-40C7-A48B-AA5D2C2E365E}"
13-
EndProject
1412
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SQLite-net-std", "nuget\SQLite-net-std\SQLite-net-std.csproj", "{081D08D6-10F1-431B-88FE-469FD9FE898C}"
1513
EndProject
1614
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApiDiff", "tests\ApiDiff\ApiDiff.csproj", "{1DEF735C-B973-4ED9-8446-7FFA6D0B410B}"
@@ -33,18 +31,6 @@ Global
3331
Debug|iPhone = Debug|iPhone
3432
EndGlobalSection
3533
GlobalSection(ProjectConfigurationPlatforms) = postSolution
36-
{81850129-71C3-40C7-A48B-AA5D2C2E365E}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
37-
{81850129-71C3-40C7-A48B-AA5D2C2E365E}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
38-
{81850129-71C3-40C7-A48B-AA5D2C2E365E}.Release|Any CPU.ActiveCfg = Release|iPhone
39-
{81850129-71C3-40C7-A48B-AA5D2C2E365E}.Release|Any CPU.Build.0 = Release|iPhone
40-
{81850129-71C3-40C7-A48B-AA5D2C2E365E}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
41-
{81850129-71C3-40C7-A48B-AA5D2C2E365E}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
42-
{81850129-71C3-40C7-A48B-AA5D2C2E365E}.Release|iPhone.ActiveCfg = Release|iPhone
43-
{81850129-71C3-40C7-A48B-AA5D2C2E365E}.Release|iPhone.Build.0 = Release|iPhone
44-
{81850129-71C3-40C7-A48B-AA5D2C2E365E}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
45-
{81850129-71C3-40C7-A48B-AA5D2C2E365E}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
46-
{81850129-71C3-40C7-A48B-AA5D2C2E365E}.Debug|iPhone.ActiveCfg = Debug|iPhone
47-
{81850129-71C3-40C7-A48B-AA5D2C2E365E}.Debug|iPhone.Build.0 = Debug|iPhone
4834
{081D08D6-10F1-431B-88FE-469FD9FE898C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
4935
{081D08D6-10F1-431B-88FE-469FD9FE898C}.Debug|Any CPU.Build.0 = Debug|Any CPU
5036
{081D08D6-10F1-431B-88FE-469FD9FE898C}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -119,7 +105,6 @@ Global
119105
{7CD60DAE-D505-4C2E-80B3-296556CE711E}.Debug|iPhone.Build.0 = Debug|Any CPU
120106
EndGlobalSection
121107
GlobalSection(NestedProjects) = preSolution
122-
{81850129-71C3-40C7-A48B-AA5D2C2E365E} = {FECC0E44-E626-49CB-BD8B-0CFBD93FBEFF}
123108
{1DEF735C-B973-4ED9-8446-7FFA6D0B410B} = {FECC0E44-E626-49CB-BD8B-0CFBD93FBEFF}
124109
{80B66A43-B358-4438-BF06-6351B86B121A} = {FECC0E44-E626-49CB-BD8B-0CFBD93FBEFF}
125110
EndGlobalSection

global.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"sdk": {
3+
"version": "8.0.100"
4+
}
5+
}

src/SQLite.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright (c) 2009-2021 Krueger Systems, Inc.
2+
// Copyright (c) 2009-2024 Krueger Systems, Inc.
33
//
44
// Permission is hereby granted, free of charge, to any person obtaining a copy
55
// of this software and associated documentation files (the "Software"), to deal
@@ -2003,7 +2003,7 @@ public int Update (object obj, Type objType)
20032003
throw NotNullConstraintViolationException.New (ex, map, obj);
20042004
}
20052005

2006-
throw ex;
2006+
throw;
20072007
}
20082008

20092009
if (rowsAffected > 0)

src/SQLiteAsync.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright (c) 2012-2021 Krueger Systems, Inc.
2+
// Copyright (c) 2012-2024 Krueger Systems, Inc.
33
//
44
// Permission is hereby granted, free of charge, to any person obtaining a copy
55
// of this software and associated documentation files (the "Software"), to deal

tests/ApiDiff/ApiDiff.csproj

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,9 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1+
<Project Sdk="Microsoft.NET.Sdk">
32
<PropertyGroup>
4-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6-
<ProductVersion>8.0.30703</ProductVersion>
7-
<SchemaVersion>2.0</SchemaVersion>
8-
<ProjectGuid>{1DEF735C-B973-4ED9-8446-7FFA6D0B410B}</ProjectGuid>
3+
<TargetFramework>net8.0</TargetFramework>
94
<OutputType>Exe</OutputType>
10-
<RootNamespace>ApiDiff</RootNamespace>
11-
<AssemblyName>ApiDiff</AssemblyName>
12-
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
135
</PropertyGroup>
14-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
15-
<DebugSymbols>true</DebugSymbols>
16-
<DebugType>full</DebugType>
17-
<Optimize>false</Optimize>
18-
<OutputPath>bin\Debug</OutputPath>
19-
<DefineConstants>DEBUG;</DefineConstants>
20-
<ErrorReport>prompt</ErrorReport>
21-
<WarningLevel>4</WarningLevel>
22-
<ExternalConsole>true</ExternalConsole>
23-
</PropertyGroup>
24-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
25-
<Optimize>true</Optimize>
26-
<OutputPath>bin\Release</OutputPath>
27-
<ErrorReport>prompt</ErrorReport>
28-
<WarningLevel>4</WarningLevel>
29-
<ExternalConsole>true</ExternalConsole>
30-
</PropertyGroup>
31-
<ItemGroup>
32-
<Reference Include="System" />
33-
<Reference Include="ListDiff">
34-
<HintPath>..\..\packages\ListDiff.1.0.7\lib\netstandard1.0\ListDiff.dll</HintPath>
35-
</Reference>
36-
</ItemGroup>
376
<ItemGroup>
38-
<Compile Include="Program.cs" />
39-
<Compile Include="Properties\AssemblyInfo.cs" />
407
<Compile Include="..\..\src\SQLite.cs">
418
<Link>SQLite.cs</Link>
429
</Compile>
@@ -45,7 +12,6 @@
4512
</Compile>
4613
</ItemGroup>
4714
<ItemGroup>
48-
<None Include="packages.config" />
15+
<PackageReference Include="ListDiff" Version="1.2.10" />
4916
</ItemGroup>
50-
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
5117
</Project>

tests/ApiDiff/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 24 deletions
This file was deleted.

tests/ApiDiff/packages.config

Lines changed: 0 additions & 4 deletions
This file was deleted.

tests/SQLite.Tests/SQLite.Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55

66
<IsPackable>false</IsPackable>
77

88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="AltCover" Version="7.3.802" />
11+
<PackageReference Include="AltCover" Version="8.7.3" />
1212
<PackageReference Include="NUnit" Version="3.12.0" />
1313
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1" />
1414
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />

0 commit comments

Comments
 (0)