Skip to content

Commit

Permalink
Merge pull request #20 from max-ieremenko/release/4.1.0
Browse files Browse the repository at this point in the history
Release/4.1.0
  • Loading branch information
max-ieremenko committed Dec 25, 2021
2 parents e8a1255 + 71e1b4d commit ad89842
Show file tree
Hide file tree
Showing 239 changed files with 505 additions and 1,496 deletions.
7 changes: 4 additions & 3 deletions Build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
build.ps1 is designed to run on windows

- PowerShell Desktop 5.1
- PowerShell Core 6.* (.net core 2.2 tests), versions 7+ are optional
- InvokeBuild 5.7.2
- PowerShell [7.2.1](https://github.com/PowerShell/PowerShell/releases/tag/v7.2.1) for .net 6.0 tests
- PowerShell [7.1.5](https://github.com/PowerShell/PowerShell/releases/tag/v7.1.5) for .net 5.0 tests
- PowerShell [7.0.8](https://github.com/PowerShell/PowerShell/releases/tag/v7.0.8) for .net core 3.1 tests
- Install-Module -Name InvokeBuild -RequiredVersion 5.8.7
- ThirdPartyLibraries https://www.nuget.org/packages/ThirdPartyLibraries.GlobalTool/
- .net framework 4.7.2+ sdk
- .net core 2.2 sdk
- .net core 3.1 sdk
- .net 5.0 sdk
- docker, switched to linux containers
Expand Down
81 changes: 57 additions & 24 deletions Build/build-tasks.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -111,30 +111,28 @@ task PackManualDownload PackGlobalTool, PackPoweShellModule, {
$source = Join-Path $settings.artifactsPowerShell "*"
Compress-Archive -Path $source -DestinationPath $destination

# netcoreapp2.2 build does not create .exe, copy it from netcoreapp3.1
$exe = Join-Path $settings.bin "SqlDatabase\netcoreapp3.1\publish\SqlDatabase.exe"
$destination = Join-Path $out "SqlDatabase.$packageVersion-netcore21.zip"
$source = Join-Path $settings.bin "SqlDatabase\netcoreapp2.1\publish\*"
Compress-Archive -Path $source, $exe, $lic, $thirdParty -DestinationPath $destination

$destination = Join-Path $out "SqlDatabase.$packageVersion-netcore31.zip"
$source = Join-Path $settings.bin "SqlDatabase\netcoreapp3.1\publish\*"
Compress-Archive -Path $source, $lic, $thirdParty -DestinationPath $destination

$destination = Join-Path $out "SqlDatabase.$packageVersion-net50.zip"
$source = Join-Path $settings.bin "SqlDatabase\net5.0\publish\*"
Compress-Archive -Path $source, $lic, $thirdParty -DestinationPath $destination

$destination = Join-Path $out "SqlDatabase.$packageVersion-net60.zip"
$source = Join-Path $settings.bin "SqlDatabase\net6.0\publish\*"
Compress-Archive -Path $source, $lic, $thirdParty -DestinationPath $destination
}

task UnitTest {
$builds = @(
@{ File = "build-tasks.unit-test.ps1"; Task = "Test"; settings = $settings; targetFramework = "net472" }
@{ File = "build-tasks.unit-test.ps1"; Task = "Test"; settings = $settings; targetFramework = "netcoreapp2.1" }
@{ File = "build-tasks.unit-test.ps1"; Task = "Test"; settings = $settings; targetFramework = "netcoreapp3.1" }
@{ File = "build-tasks.unit-test.ps1"; Task = "Test"; settings = $settings; targetFramework = "net5.0" }
@{ File = "build-tasks.unit-test.ps1"; Task = "Test"; settings = $settings; targetFramework = "net6.0" }
)

Build-Parallel $builds -MaximumBuilds 4
Build-Parallel $builds -ShowParameter targetFramework -MaximumBuilds 4
}

task InitializeIntegrationTest {
Expand Down Expand Up @@ -164,9 +162,17 @@ task InitializeIntegrationTest {
}

task PsDesktopTest {
$builds = @()
foreach ($database in $databases) {
Invoke-Build -File "build-tasks.it-ps-desktop.ps1" -Task "Test" -settings $settings -database $database
$builds += @{
File = "build-tasks.it-ps-desktop.ps1";
Task = "Test";
settings = $settings;
database = $database;
}
}

Build-Parallel $builds -ShowParameter database -MaximumBuilds 1
}

task PsCoreTest {
Expand All @@ -190,65 +196,92 @@ task PsCoreTest {
, "mcr.microsoft.com/powershell:7.1.2-ubuntu-20.04"
, "mcr.microsoft.com/powershell:7.1.3-ubuntu-20.04"
, "mcr.microsoft.com/powershell:7.1.4-ubuntu-20.04"
, "mcr.microsoft.com/powershell:7.2.0-preview.10-ubuntu-20.04")
, "mcr.microsoft.com/powershell:7.2.0-ubuntu-20.04"
, "mcr.microsoft.com/powershell:7.2.1-ubuntu-20.04"
, "mcr.microsoft.com/powershell:7.3.0-preview.1-ubuntu-20.04")

$builds = @()
foreach ($image in $images) {
foreach ($database in $databases) {
$builds += @{ File = "build-tasks.it-ps-core.ps1"; Task = "Test"; settings = $settings; database = $database; image = $image }
$builds += @{
File = "build-tasks.it-ps-core.ps1";
Task = "Test";
settings = $settings;
database = $database;
image = $image;
}
}
}

Build-Parallel $builds -MaximumBuilds 4
Build-Parallel $builds -ShowParameter database, image -MaximumBuilds 4
}

task SdkToolTest {
$images = $(
"sqldatabase/dotnet_pwsh:2.1-sdk"
, "sqldatabase/dotnet_pwsh:3.1-sdk"
, "sqldatabase/dotnet_pwsh:5.0-sdk")
"sqldatabase/dotnet_pwsh:3.1-sdk"
, "sqldatabase/dotnet_pwsh:5.0-sdk"
, "sqldatabase/dotnet_pwsh:6.0-sdk")

$builds = @()
foreach ($image in $images) {
foreach ($database in $databases) {
$builds += @{ File = "build-tasks.it-tool-linux.ps1"; Task = "Test"; settings = $settings; database = $database; image = $image }
$builds += @{
File = "build-tasks.it-tool-linux.ps1";
Task = "Test";
settings = $settings;
database = $database;
image = $image;
}
}
}

Build-Parallel $builds -MaximumBuilds 4
Build-Parallel $builds -ShowParameter database, image -MaximumBuilds 4
}

task NetRuntimeLinuxTest {
$testCases = $(
@{ targetFramework = "netcore21"; image = "sqldatabase/dotnet_pwsh:2.1-runtime" }
, @{ targetFramework = "netcore31"; image = "sqldatabase/dotnet_pwsh:3.1-runtime" }
@{ targetFramework = "netcore31"; image = "sqldatabase/dotnet_pwsh:3.1-runtime" }
, @{ targetFramework = "net50"; image = "sqldatabase/dotnet_pwsh:5.0-runtime" }
, @{ targetFramework = "net60"; image = "sqldatabase/dotnet_pwsh:6.0-runtime" }
)

$builds = @()
foreach ($case in $testCases) {
foreach ($database in $databases) {
$builds += @{ File = "build-tasks.it-linux.ps1"; Task = "Test"; settings = $settings; targetFramework = $case.targetFramework; database = $database; image = $case.image }
$builds += @{
File = "build-tasks.it-linux.ps1";
Task = "Test";
settings = $settings;
targetFramework = $case.targetFramework;
database = $database;
image = $case.image;
}
}
}

Build-Parallel $builds -MaximumBuilds 4
Build-Parallel $builds -ShowParameter database, targetFramework, image -MaximumBuilds 4
}

task NetRuntimeWindowsTest {
$testCases = $(
"net452"
, "netcore21"
, "netcore31"
, "net50"
, "net60"
)

$builds = @()
foreach ($case in $testCases) {
foreach ($database in $databases) {
$builds += @{ File = "build-tasks.it-win.ps1"; Task = "Test"; settings = $settings; targetFramework = $case; database = $database }
$builds += @{
File = "build-tasks.it-win.ps1";
Task = "Test";
settings = $settings;
targetFramework = $case;
database = $database;
}
}
}

Build-Parallel $builds -MaximumBuilds 4
Build-Parallel $builds -ShowParameter database, targetFramework -MaximumBuilds 4
}
2 changes: 1 addition & 1 deletion Build/build.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Requires -Modules @{ModuleName='InvokeBuild'; RequiredVersion='5.7.2'}
#Requires -Modules @{ModuleName='InvokeBuild'; RequiredVersion='5.8.7'}

Set-StrictMode -Version Latest

Expand Down
55 changes: 28 additions & 27 deletions Build/create-images-tasks.ps1
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
task Default BuildDotnetSdk21 `
, BuildDotnetRuntime21 `
, BuildDotnetSdk31 `
, BuildDotnetRuntime31 `
, BuildDotnetSdk50 `
, BuildDotnetRuntime50 `
, BuildMsSqlDatabase `
, BuildPgSqlDatabase `
, BuildMySqlDatabase
task Default `
BuildDotnetSdk31 `
, BuildDotnetRuntime31 `
, BuildDotnetSdk50 `
, BuildDotnetRuntime50 `
, BuildDotnetSdk60 `
, BuildDotnetRuntime60 `
, BuildMsSqlDatabase `
, BuildPgSqlDatabase `
, BuildMySqlDatabase

task BuildMsSqlDatabase {
$context = Join-Path $PSScriptRoot "..\Sources\SqlDatabase.Test\Docker"
Expand Down Expand Up @@ -38,24 +39,6 @@ task BuildMySqlDatabase {
}
}

task BuildDotnetSdk21 {
exec {
docker build `
-f image-dotnet-sdk-2.1.dockerfile `
-t sqldatabase/dotnet_pwsh:2.1-sdk `
.
}
}

task BuildDotnetRuntime21 {
exec {
docker build `
-f image-dotnet-runtime-2.1.dockerfile `
-t sqldatabase/dotnet_pwsh:2.1-runtime `
.
}
}

task BuildDotnetSdk31 {
exec {
docker build `
Expand Down Expand Up @@ -91,3 +74,21 @@ task BuildDotnetRuntime50 {
.
}
}

task BuildDotnetSdk60 {
exec {
docker build `
-f image-dotnet-sdk-6.0.dockerfile `
-t sqldatabase/dotnet_pwsh:6.0-sdk `
.
}
}

task BuildDotnetRuntime60 {
exec {
docker build `
-f image-dotnet-runtime-6.0.dockerfile `
-t sqldatabase/dotnet_pwsh:6.0-runtime `
.
}
}
2 changes: 1 addition & 1 deletion Build/create-images.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Requires -Modules @{ModuleName='InvokeBuild'; RequiredVersion='5.7.2'}
#Requires -Modules @{ModuleName='InvokeBuild'; RequiredVersion='5.8.7'}

Set-StrictMode -Version Latest

Expand Down
6 changes: 0 additions & 6 deletions Build/image-dotnet-runtime-2.1.dockerfile

This file was deleted.

8 changes: 8 additions & 0 deletions Build/image-dotnet-runtime-6.0.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM mcr.microsoft.com/dotnet/runtime:6.0

RUN apt-get update && \
apt-get install -y liblttng-ust0 curl && \
curl -L https://github.com/PowerShell/PowerShell/releases/download/v7.2.1/powershell_7.2.1-1.deb_amd64.deb --output powershell.deb && \
dpkg -i powershell.deb && \
apt-get install -f && \
rm -f powershell.deb
6 changes: 0 additions & 6 deletions Build/image-dotnet-sdk-2.1.dockerfile

This file was deleted.

8 changes: 8 additions & 0 deletions Build/image-dotnet-sdk-6.0.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM mcr.microsoft.com/dotnet/sdk:6.0

RUN apt-get update && \
apt-get install -y liblttng-ust0 && \
curl -L https://github.com/PowerShell/PowerShell/releases/download/v7.2.1/powershell_7.2.1-1.deb_amd64.deb --output powershell.deb && \
dpkg -i powershell.deb && \
apt-get install -f && \
rm -f powershell.deb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"Name": "SqlDatabase",
"InternalOnly": true,
"TargetFrameworks": [
"netcoreapp2.1",
"netcoreapp3.1",
"net5.0",
"net6.0",
"net472"
],
"Dependencies": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Castle.Core [4.4.0](https://www.nuget.org/packages/Castle.Core/4.4.0)

Used by: SqlDatabase internal

Target frameworks: net472, net5.0, netcoreapp2.1, netcoreapp3.1
Target frameworks: net472, net5.0, net6.0, netcoreapp3.1

License: [Apache-2.0](../../../../licenses/apache-2.0)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"Name": "SqlDatabase",
"InternalOnly": true,
"TargetFrameworks": [
"netcoreapp2.1",
"netcoreapp3.1",
"net5.0",
"net6.0",
"net472"
]
}
Expand All @@ -25,14 +25,14 @@
{
"Subject": "repository",
"Code": null,
"HRef": "https://github.com/StackExchange/Dapper",
"Description": "License should be verified on https://github.com/StackExchange/Dapper"
"HRef": "https://github.com/DapperLib/Dapper",
"Description": "License should be verified on https://github.com/DapperLib/Dapper"
},
{
"Subject": "project",
"Code": null,
"HRef": "https://github.com/StackExchange/Dapper",
"Description": "License should be verified on https://github.com/StackExchange/Dapper"
"HRef": "https://github.com/DapperLib/Dapper",
"Description": "License should be verified on https://github.com/DapperLib/Dapper"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,26 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>Dapper.StrongName</id>
<version>2.0.78</version>
<version>2.0.123</version>
<title>Dapper (Strong Named)</title>
<authors>Sam Saffron,Marc Gravell,Nick Craver</authors>
<owners>Sam Saffron,Marc Gravell,Nick Craver</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="expression">Apache-2.0</license>
<licenseUrl>https://licenses.nuget.org/Apache-2.0</licenseUrl>
<projectUrl>https://github.com/StackExchange/Dapper</projectUrl>
<projectUrl>https://github.com/DapperLib/Dapper</projectUrl>
<description>A high performance Micro-ORM supporting SQL Server, MySQL, Sqlite, SqlCE, Firebird etc..</description>
<releaseNotes>https://stackexchange.github.io/Dapper/</releaseNotes>
<releaseNotes>https://dapperlib.github.io/Dapper/</releaseNotes>
<copyright>2019 Stack Exchange, Inc.</copyright>
<tags>orm sql micro-orm</tags>
<repository type="git" url="https://github.com/StackExchange/Dapper" commit="6ab170c160f0689e2e2bf7e6eb603447f734d454" />
<repository type="git" url="https://github.com/DapperLib/Dapper" commit="2a837ad7d036671ac9a75c9945bb970aa41b7de9" />
<dependencies>
<group targetFramework=".NETFramework4.6.1" />
<group targetFramework=".NETFramework5.0" />
<group targetFramework=".NETStandard2.0">
<dependency id="System.Reflection.Emit.Lightweight" version="4.7.0" exclude="Build,Analyzers" />
</group>
</dependencies>
<icon>Dapper.png</icon>
</metadata>
</package>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
The Dapper library and tools are licenced under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0

The Dapper logo is copyright Marc Gravell 2021 onwards; it is fine to use the Dapper logo when referencing the Dapper library and utilities, but
the Dapper logo (including derivatives) must not be used in a way that misrepresents an external product or library as being affiliated or endorsed
with Dapper. For example, you must not use the Dapper logo as the package icon on your own external tool (even if it uses Dapper internally),
without written permission. If in doubt: ask.
Loading

0 comments on commit ad89842

Please sign in to comment.