Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into FixJitCompileInIOs
Browse files Browse the repository at this point in the history
  • Loading branch information
inforithmics committed Mar 28, 2024
2 parents 2464447 + 5f72241 commit 88f0cf6
Show file tree
Hide file tree
Showing 18 changed files with 186 additions and 140 deletions.
25 changes: 20 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
build:

runs-on: macOS-latest
runs-on: ubuntu-latest

steps:

Expand All @@ -21,19 +21,33 @@ jobs:
env:
VERSION_BUILD: ${{github.run_number}}
run: |
sed -i bak "s:</VersionPrefix>:.$VERSION_BUILD</VersionPrefix>:g" Directory.Build.props
sed -i.bak "s:</VersionPrefix>:.$VERSION_BUILD</VersionPrefix>:g" Directory.Build.props
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json

- name: Install Code Coverarage Tool
run: dotnet tool install --global dotnet-reportgenerator-globaltool

- name: Restore NuGets
run: nuget restore SQLite.sln
run: dotnet restore SQLite.sln

- name: Build and Test
run: |
set -e
cd tests/SQLite.Tests
dotnet test /p:AltCover=true /p:AltCoverForce=true "/p:AltCoverTypeFilter=SQLite.Tests.*"
- name: Verify Async API Matches Sync API
run: |
set -e
dotnet run --project tests/ApiDiff/ApiDiff.csproj
- name: Generate Code Coverage Report
uses: danielpalme/[email protected]
uses: danielpalme/[email protected]
if: github.event_name == 'push'
with:
reports: 'tests/SQLite.Tests/coverage.xml' # REQUIRED # The coverage reports that should be parsed (separated by semicolon). Globbing is supported.
targetdir: 'CoverageReport' # REQUIRED # The directory where the generated report should be saved.
Expand All @@ -59,11 +73,12 @@ jobs:
enable_jekyll: true

- name: Package
if: github.event_name == 'push'
run: |
make nuget
- uses: actions/upload-artifact@master
if: github.event_name == 'push'
with:
name: Packages
path: PackagesOut

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -265,3 +265,6 @@ paket-files/
# CodeRush
.cr/

# NCrunch
*.ncrunchsolution
*.ncrunchproject
4 changes: 3 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<VersionPrefix>1.9</VersionPrefix>
<VersionSuffix>beta</VersionSuffix>
<VersionSuffix></VersionSuffix>

<PackageIcon>Logo-low.png</PackageIcon>
<PackageProjectUrl>https://github.com/praeclarum/sqlite-net</PackageProjectUrl>
Expand All @@ -12,6 +12,8 @@
<Company>Krueger Systems, Inc.</Company>

<Deterministic>true</Deterministic>

<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<None Include="..\Logo-low.png" Pack="true" PackagePath=""/>
Expand Down
13 changes: 1 addition & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,7 @@ SRC=src/SQLite.cs src/SQLiteAsync.cs

PACKAGES_OUT=$(abspath PackagesOut)

all: test nuget

test: tests/bin/Release/SQLite.Tests.dll tests/ApiDiff/bin/Release/ApiDiff.exe
mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe tests/bin/Release/SQLite.Tests.dll --labels=On --trace=Info
mono tests/ApiDiff/bin/Release/ApiDiff.exe

tests/bin/Release/SQLite.Tests.dll: tests/SQLite.Tests.csproj $(SRC)
nuget restore SQLite.sln
msbuild /p:Configuration=Release tests/SQLite.Tests.csproj

tests/ApiDiff/bin/Release/ApiDiff.exe: tests/ApiDiff/ApiDiff.csproj $(SRC)
msbuild /p:Configuration=Release tests/ApiDiff/ApiDiff.csproj
all: nuget

nuget: pclnuget basenuget sqlciphernuget staticnuget

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Use one of these packages:
| [![NuGet Package](https://img.shields.io/nuget/v/sqlite-net-pcl.svg)](https://www.nuget.org/packages/sqlite-net-pcl) | [sqlite-net-pcl](https://www.nuget.org/packages/sqlite-net-pcl) | .NET Standard Library |
| [![NuGet Package with Encryption](https://img.shields.io/nuget/v/sqlite-net-sqlcipher.svg)](https://www.nuget.org/packages/sqlite-net-sqlcipher) | [sqlite-net-sqlcipher](https://www.nuget.org/packages/sqlite-net-sqlcipher) | With Encryption Support |
| [![NuGet Package using P/Invoke](https://img.shields.io/nuget/v/sqlite-net-static.svg)](https://www.nuget.org/packages/sqlite-net-static) | [sqlite-net-static](https://www.nuget.org/packages/sqlite-net-static) | Special version that uses P/Invokes to platform-provided sqlite3 |
| [![NuGet Package without a SQLitePCLRaw bundle](https://img.shields.io/nuget/v/sqlite-net-base.svg)](https://www.nuget.org/packages/sqlite-net-base) | [sqlite-net-base](https://www.nuget.org/packages/sqlite-net-base) | wothout a SQLitePCLRaw bundle so you can choose your own provider |
| [![NuGet Package without a SQLitePCLRaw bundle](https://img.shields.io/nuget/v/sqlite-net-base.svg)](https://www.nuget.org/packages/sqlite-net-base) | [sqlite-net-base](https://www.nuget.org/packages/sqlite-net-base) | without a SQLitePCLRaw bundle so you can choose your own provider |

SQLite-net is an open source, minimal library to allow .NET, .NET Core, and Mono applications to store data in
[SQLite 3 databases](http://www.sqlite.org). It was first designed to work with [Xamarin.iOS](http://xamarin.com),
Expand Down Expand Up @@ -63,6 +63,8 @@ public class Valuation
public int StockId { get; set; }
public DateTime Time { get; set; }
public decimal Price { get; set; }
[Ignore]
public string IgnoreField { get; set; }
}
```

Expand Down
15 changes: 0 additions & 15 deletions SQLite.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{FECC0E44-E626-49CB-BD8B-0CFBD93FBEFF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SQLiteTestsiOS", "tests\SQLite.Tests.iOS\SQLiteTestsiOS.csproj", "{81850129-71C3-40C7-A48B-AA5D2C2E365E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SQLite-net-std", "nuget\SQLite-net-std\SQLite-net-std.csproj", "{081D08D6-10F1-431B-88FE-469FD9FE898C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApiDiff", "tests\ApiDiff\ApiDiff.csproj", "{1DEF735C-B973-4ED9-8446-7FFA6D0B410B}"
Expand All @@ -33,18 +31,6 @@ Global
Debug|iPhone = Debug|iPhone
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{81850129-71C3-40C7-A48B-AA5D2C2E365E}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
{81850129-71C3-40C7-A48B-AA5D2C2E365E}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
{81850129-71C3-40C7-A48B-AA5D2C2E365E}.Release|Any CPU.ActiveCfg = Release|iPhone
{81850129-71C3-40C7-A48B-AA5D2C2E365E}.Release|Any CPU.Build.0 = Release|iPhone
{81850129-71C3-40C7-A48B-AA5D2C2E365E}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{81850129-71C3-40C7-A48B-AA5D2C2E365E}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{81850129-71C3-40C7-A48B-AA5D2C2E365E}.Release|iPhone.ActiveCfg = Release|iPhone
{81850129-71C3-40C7-A48B-AA5D2C2E365E}.Release|iPhone.Build.0 = Release|iPhone
{81850129-71C3-40C7-A48B-AA5D2C2E365E}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{81850129-71C3-40C7-A48B-AA5D2C2E365E}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{81850129-71C3-40C7-A48B-AA5D2C2E365E}.Debug|iPhone.ActiveCfg = Debug|iPhone
{81850129-71C3-40C7-A48B-AA5D2C2E365E}.Debug|iPhone.Build.0 = Debug|iPhone
{081D08D6-10F1-431B-88FE-469FD9FE898C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{081D08D6-10F1-431B-88FE-469FD9FE898C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{081D08D6-10F1-431B-88FE-469FD9FE898C}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -119,7 +105,6 @@ Global
{7CD60DAE-D505-4C2E-80B3-296556CE711E}.Debug|iPhone.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{81850129-71C3-40C7-A48B-AA5D2C2E365E} = {FECC0E44-E626-49CB-BD8B-0CFBD93FBEFF}
{1DEF735C-B973-4ED9-8446-7FFA6D0B410B} = {FECC0E44-E626-49CB-BD8B-0CFBD93FBEFF}
{80B66A43-B358-4438-BF06-6351B86B121A} = {FECC0E44-E626-49CB-BD8B-0CFBD93FBEFF}
EndGlobalSection
Expand Down
5 changes: 5 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"sdk": {
"version": "8.0.100"
}
}
7 changes: 1 addition & 6 deletions nuget/SQLite-net-base/SQLite-net-base.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,17 @@
It is meant to give you all the power of SQLite-net but with the freedom to choose your own provider.
Please use the package sqlite-net-pcl if you have no idea what any of this means.
</Description>

<Configurations>Release;Debug</Configurations>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>false</DebugSymbols>
<DebugType></DebugType>
<DefineConstants>USE_SQLITEPCL_RAW;NO_SQLITEPCL_RAW_BATTERIES;RELEASE</DefineConstants>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DocumentationFile>bin\Release\netstandard2.0\SQLite-net.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DefineConstants>USE_SQLITEPCL_RAW;NO_SQLITEPCL_RAW_BATTERIES;DEBUG</DefineConstants>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DocumentationFile>bin\Debug\netstandard2.0\SQLite-net.xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="SQLitePCLRaw.core" Version="2.1.2" />
</ItemGroup>
Expand Down
6 changes: 1 addition & 5 deletions nuget/SQLite-net-sqlcipher/SQLite-net-sqlcipher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,17 @@
This enables secure access to the database with password (key) access.
</Description>
<PackageTags>sqlite-net;sqlite;database;orm;encryption;sqlcipher</PackageTags>
<Configurations>Release;Debug</Configurations>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>false</DebugSymbols>
<DebugType></DebugType>
<DefineConstants>USE_SQLITEPCL_RAW;RELEASE</DefineConstants>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DocumentationFile>bin\Release\netstandard2.0\SQLite-net.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DefineConstants>USE_SQLITEPCL_RAW;DEBUG</DefineConstants>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DocumentationFile>bin\Debug\netstandard2.0\SQLite-net.xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlcipher" Version="2.1.2" />
</ItemGroup>
Expand Down
5 changes: 1 addition & 4 deletions nuget/SQLite-net-static/SQLite-net-static.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,17 @@
This version uses P/Invokes to the "sqlite3" native library provided by the operating system.
This works on Xamarin.iOS, Xamarin.Mac, Wilderness Labs' Meadow, and any other platform that has a "sqlite3" library in the path.
</Description>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Configurations>Release;Debug</Configurations>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>false</DebugSymbols>
<DebugType></DebugType>
<DefineConstants>RELEASE</DefineConstants>
<DocumentationFile>bin\Release\netstandard2.0\SQLite-net.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DefineConstants>DEBUG</DefineConstants>
<DocumentationFile>bin\Debug\netstandard2.0\SQLite-net.xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\..\src\SQLite.cs">
<Link>SQLite.cs</Link>
Expand Down
8 changes: 1 addition & 7 deletions nuget/SQLite-net-std/SQLite-net-std.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,18 @@
<Description>
SQLite-net is an open source and light weight library providing easy SQLite database storage for .NET, Mono, and Xamarin applications.
This version uses SQLitePCLRaw to provide platform independent versions of SQLite.

</Description>

<Configurations>Release;Debug</Configurations>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>false</DebugSymbols>
<DebugType></DebugType>
<DefineConstants>USE_SQLITEPCL_RAW;RELEASE</DefineConstants>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DocumentationFile>bin\Release\netstandard2.0\SQLite-net.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DefineConstants>USE_SQLITEPCL_RAW;DEBUG</DefineConstants>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DocumentationFile>bin\Debug\netstandard2.0\SQLite-net.xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="SQLitePCLRaw.bundle_green" Version="2.1.2" />
</ItemGroup>
Expand Down
Loading

0 comments on commit 88f0cf6

Please sign in to comment.