Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI #116

Open
wants to merge 3 commits into
base: master
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
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ tab_width = 4
insert_final_newline = true
charset = utf-8-bom

[*.{yaml,yml}]
indent_style = space
indent_size = 2

# XML project files
[*.{csproj,props,targets}]
indent_style = space
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

on:
push:
pull_request:

env:
DOTNET_CLI_TELEMETRY_OPTOUT: true

jobs:
build:
runs-on: windows-latest
name: Build
env:
CONFIGURATION: Release

strategy:
matrix:
platform:
- x86
- x64

steps:
- uses: actions/checkout@v4
- uses: microsoft/setup-msbuild@v2
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'

- run: msbuild /p:Platform=${{ matrix.platform }} src/d2dlib/D2DLib.vcxproj
- run: dotnet restore /p:Platform=${{ matrix.platform }} src/D2DLib.sln
- run: dotnet build -c $env:CONFIGURATION /p:Platform=${{ matrix.platform }} src/D2DLibExport/D2DLibExport.csproj
- run: dotnet build -c $env:CONFIGURATION /p:Platform=${{ matrix.platform }} src/D2DWinForm/D2DWinForm.csproj
- run: dotnet build -c $env:CONFIGURATION /p:GenerateResourceUsePreserializedResources=true /p:Platform=${{ matrix.platform }} src/Examples/Examples.csproj
2 changes: 1 addition & 1 deletion src/D2DLib.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29020.237
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "d2dlib", "d2dlib\d2dlib.vcxproj", "{E0A71FCE-69DD-40A6-87FB-2D63AB5D25C9}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "d2dlib", "d2dlib\D2DLib.vcxproj", "{E0A71FCE-69DD-40A6-87FB-2D63AB5D25C9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "D2DLibExport", "D2DLibExport\D2DLibExport.csproj", "{81DD53D8-FCF0-4384-A931-9370FA8E8E67}"
ProjectSection(ProjectDependencies) = postProject
Expand Down
2 changes: 1 addition & 1 deletion src/D2DWinForm/D2DWinForm.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<!-- Build properties -->
<PropertyGroup>
<TargetFrameworks>net462;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net462;net6.0-windows</TargetFrameworks>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.NET 6 is nearly out of support. We could move these to .NET 8.

<RootNamespace>unvell.D2DLib.WinForm</RootNamespace>
<AssemblyName>d2dwinform</AssemblyName>
<UseWindowsForms>true</UseWindowsForms>
Expand Down
6 changes: 2 additions & 4 deletions src/Examples/Examples.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">

<PropertyGroup>
<TargetFrameworks>net462;netcoreapp3.1;net6.0-windows</TargetFrameworks>
<TargetFrameworks>net462;net6.0-windows</TargetFrameworks>
<RootNamespace>unvell.D2DLib.Examples</RootNamespace>
<OutputType>WinExe</OutputType>
<UseWindowsForms>true</UseWindowsForms>
Expand Down Expand Up @@ -68,9 +68,7 @@
</ItemGroup>

<ItemGroup>
<Compile Update="SampleCode\MeasureAndDrawStringForm.cs">
<SubType>Form</SubType>
</Compile>
<PackageReference Include="System.Resources.Extensions" Version="8.0.0" />
</ItemGroup>

</Project>
14 changes: 4 additions & 10 deletions src/d2dlib/D2DLib.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove precompiled headers? I don't see an explanation for that change.

<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;D2DLIB_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
Expand All @@ -116,7 +116,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;D2DLIB_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
Expand All @@ -136,7 +136,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
Expand All @@ -155,7 +155,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
Expand Down Expand Up @@ -213,12 +213,6 @@
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="Effect.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="Test.cpp" />
<ClCompile Include="Transform.cpp" />
</ItemGroup>
Expand Down