Skip to content
This repository was archived by the owner on Nov 7, 2023. It is now read-only.

feature: cross-platform builds #199

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
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
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true

[*/**.csproj]
indent_style = space
indent_size = 2
50 changes: 50 additions & 0 deletions .github/workflows/dotnet-build-debug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build .NET (Debug)

on:
workflow_dispatch: # Enable manual trigger to run workflow.
push:
branches: ["main"]
pull_request:
branches: ["main"]
schedule:
- cron: "0 0 * * *" # https://crontab.guru/#0_0_*_*_*

jobs:
build-debug:
name: "Build Debug"
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore
run: dotnet restore
- name: Build
run: |
dotnet build \
${{ github.workspace }}/CosmosDbDataMigrationTool.sln \
--no-restore \
--configuration Debug \
--framework net6.0 \
--maxcpucount:1
- name: Test
run: |
dotnet test \
--configuration Debug \
--no-build \
--verbosity normal
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3
with:
name: debug-build
path: ${{ github.workspace }}/Core/Microsoft.DataTransfer.Core/bin/Debug/net6.0
50 changes: 50 additions & 0 deletions .github/workflows/dotnet-build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build .NET (Release)

on:
workflow_dispatch: # Enable manual trigger to run workflow.
push:
branches: ["main"]
pull_request:
branches: ["main"]
schedule:
- cron: "0 0 * * *" # https://crontab.guru/#0_0_*_*_*

jobs:
build-release:
name: "Build Release"
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore
run: dotnet restore
- name: Build
run: |
dotnet build \
${{ github.workspace }}/CosmosDbDataMigrationTool.sln \
--no-restore \
--configuration Release \
--framework net6.0 \
--maxcpucount:1
- name: Test
run: |
dotnet test \
--configuration Release \
--no-build \
--verbosity normal
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3
with:
name: release-build
path: ${{ github.workspace }}/Core/Microsoft.DataTransfer.Core/bin/Release/net6.0
33 changes: 0 additions & 33 deletions .github/workflows/dotnet-build-test.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Interfaces\Microsoft.DataTransfer.Interfaces\Microsoft.DataTransfer.Interfaces.csproj" />
<ProjectReference
Include="..\..\Interfaces\Microsoft.DataTransfer.Interfaces\Microsoft.DataTransfer.Interfaces.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
18 changes: 6 additions & 12 deletions Core/Microsoft.DataTransfer.Core/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
{
"JsonSourceSettings": {
},
"JsonSinkSettings": {
},
"JsonSourceSettings": {},
"JsonSinkSettings": {},
"CosmosSourceSettings": {
"ConnectionString": "<Add in User Secrets>"
},
"CosmosSinkSettings": {
"ConnectionString": "<Add in User Secrets>"
},
"MongoSourceSettings": {
},
"MongoSinkSettings": {
},
"AzureTableAPISourceSettings": {
},
"AzureTableAPISinkSettings": {
},
"MongoSourceSettings": {},
"MongoSinkSettings": {},
"AzureTableAPISourceSettings": {},
"AzureTableAPISinkSettings": {},
"SqlServerSourceSettings": {
"ConnectionString": "<Add in User Secrets>"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\Extensions\AzureTableAPI\Microsoft.DataTransfer.AzureTableAPIExtension\Microsoft.DataTransfer.AzureTableAPIExtension.csproj" />
<ProjectReference Include="..\..\..\Interfaces\Microsoft.DataTransfer.Interfaces\Microsoft.DataTransfer.Interfaces.csproj" />
<ProjectReference
Include="..\..\..\Extensions\AzureTableAPI\Microsoft.DataTransfer.AzureTableAPIExtension\Microsoft.DataTransfer.AzureTableAPIExtension.csproj" />
<ProjectReference
Include="..\..\..\Interfaces\Microsoft.DataTransfer.Interfaces\Microsoft.DataTransfer.Interfaces.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<OutputType>Exe</OutputType>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.Data.Tables" Version="12.6.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0" />
<PackageReference Include="System.ComponentModel.Composition" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Azure.Data.Tables" Version="12.6.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0" />
<PackageReference Include="System.ComponentModel.Composition" Version="6.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\Interfaces\Microsoft.DataTransfer.Interfaces\Microsoft.DataTransfer.Interfaces.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference
Include="..\..\..\Interfaces\Microsoft.DataTransfer.Interfaces\Microsoft.DataTransfer.Interfaces.csproj" />
</ItemGroup>

<Target Name="PublishDebug" AfterTargets="Build" Condition=" '$(Configuration)' == 'Debug' ">
<Exec Command="dotnet publish --no-build -p:PublishProfile=LocalDebugFolder" />
</Target>
<Target Name="PublishDebug" AfterTargets="Build" Condition=" '$(Configuration)' == 'Debug' ">
<Exec
Command="dotnet publish --configuration Debug --no-build -p:PublishProfile=LocalDebugFolder" />
</Target>
<Target Name="PublishRelease" AfterTargets="Build" Condition=" '$(Configuration)' == 'Release' ">
<Exec
Command="dotnet publish --configuration Release --no-build -p:PublishProfile=LocalReleaseFolder" />
</Target>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>..\..\..\Core\Microsoft.DataTransfer.Core\bin\Release\net6.0\Extensions</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<TargetFramework>net6.0</TargetFramework>
<SelfContained>false</SelfContained>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Microsoft.DataTransfer.CosmosExtension\Microsoft.DataTransfer.CosmosExtension.csproj" />
<ProjectReference
Include="..\Microsoft.DataTransfer.CosmosExtension\Microsoft.DataTransfer.CosmosExtension.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,35 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<OutputType>Exe</OutputType>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.29.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0" />
<PackageReference Include="Polly" Version="7.2.3" />
<PackageReference Include="System.ComponentModel.Composition" Version="6.0.0" />
<PackageReference Include="System.Interactive.Async" Version="6.0.1" />
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.29.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0" />
<PackageReference Include="Polly" Version="7.2.3" />
<PackageReference Include="System.ComponentModel.Composition" Version="6.0.0" />
<PackageReference Include="System.Interactive.Async" Version="6.0.1" />
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\Interfaces\Microsoft.DataTransfer.Interfaces\Microsoft.DataTransfer.Interfaces.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference
Include="..\..\..\Interfaces\Microsoft.DataTransfer.Interfaces\Microsoft.DataTransfer.Interfaces.csproj" />
</ItemGroup>

<Target Name="PublishDebug" AfterTargets="Build" Condition=" '$(Configuration)' == 'Debug' ">
<Exec
Command="dotnet publish --configuration Debug --no-build -p:PublishProfile=LocalDebugFolder" />
</Target>
<Target Name="PublishRelease" AfterTargets="Build" Condition=" '$(Configuration)' == 'Release' ">
<Exec
Command="dotnet publish --configuration Release --no-build -p:PublishProfile=LocalReleaseFolder" />
</Target>

<Target Name="PublishDebug" AfterTargets="Build" Condition=" '$(Configuration)' == 'Debug' ">
<Exec Command="dotnet publish --no-build -p:PublishProfile=LocalDebugFolder" />
</Target>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>..\..\..\Core\Microsoft.DataTransfer.Core\bin\Release\net6.0\Extensions</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<TargetFramework>net6.0</TargetFramework>
<SelfContained>false</SelfContained>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Microsoft.DataTransfer.JsonExtension\Microsoft.DataTransfer.JsonExtension.csproj" />
<ProjectReference
Include="..\Microsoft.DataTransfer.JsonExtension\Microsoft.DataTransfer.JsonExtension.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading