Skip to content

Commit 4c03086

Browse files
committed
Update codeql.yml to manually build solution
Make it build better in linux
1 parent 64caef0 commit 4c03086

File tree

13 files changed

+189
-298
lines changed

13 files changed

+189
-298
lines changed

.github/workflows/codeql.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
matrix:
4545
include:
4646
- language: csharp
47-
build-mode: autobuild
47+
build-mode: manual
4848
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
4949
# Use `c-cpp` to analyze code written in C, C++ or both
5050
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
@@ -70,21 +70,14 @@ jobs:
7070
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
7171
# queries: security-extended,security-and-quality
7272

73-
# If the analyze step fails for one of the languages you are analyzing with
74-
# "We were unable to automatically build your code", modify the matrix above
75-
# to set the build mode to "manual" for that language. Then modify this step
76-
# to build your code.
77-
# ℹ️ Command-line programs to run using the OS shell.
78-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
73+
- name: Setup .NET 6.0
74+
uses: actions/setup-dotnet@v4
75+
with:
76+
dotnet-version: 6.0.427
77+
7978
- if: matrix.build-mode == 'manual'
8079
shell: bash
81-
run: |
82-
echo 'If you are using a "manual" build mode for one or more of the' \
83-
'languages you are analyzing, replace this with the commands to build' \
84-
'your code, for example:'
85-
echo ' make bootstrap'
86-
echo ' make release'
87-
exit 1
80+
run: dotnet build --configuration Release -v:m
8881

8982
- name: Perform CodeQL Analysis
9083
uses: github/codeql-action/analyze@v3

SvgDocTest/SvgDocTest.csproj

Lines changed: 58 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -1,117 +1,59 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
3-
<PropertyGroup>
4-
<ProjectType>Local</ProjectType>
5-
<ProductVersion>8.0.30319</ProductVersion>
6-
<SchemaVersion>2.0</SchemaVersion>
7-
<ProjectGuid>{6A203A21-673D-45E1-A7F5-D7112E114D6E}</ProjectGuid>
8-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
9-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
10-
<ApplicationIcon>App.ico</ApplicationIcon>
11-
<AssemblyKeyContainerName />
12-
<AssemblyName>SvgDocTest</AssemblyName>
13-
<AssemblyOriginatorKeyFile />
14-
<DefaultClientScript>JScript</DefaultClientScript>
15-
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
16-
<DefaultTargetSchema>IE50</DefaultTargetSchema>
17-
<DelaySign>false</DelaySign>
18-
<OutputType>WinExe</OutputType>
19-
<RootNamespace>SvgDocTest</RootNamespace>
20-
<StartupObject />
21-
<FileUpgradeFlags>
22-
</FileUpgradeFlags>
23-
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
24-
<OldToolsVersion>0.0</OldToolsVersion>
25-
<UpgradeBackupLocation />
26-
<TargetFrameworkProfile />
27-
</PropertyGroup>
28-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
29-
<OutputPath>bin\Debug\</OutputPath>
30-
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
31-
<BaseAddress>285212672</BaseAddress>
32-
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
33-
<ConfigurationOverrideFile />
34-
<DefineConstants>DEBUG;TRACE</DefineConstants>
35-
<DocumentationFile />
36-
<DebugSymbols>true</DebugSymbols>
37-
<FileAlignment>4096</FileAlignment>
38-
<Optimize>false</Optimize>
39-
<RegisterForComInterop>false</RegisterForComInterop>
40-
<RemoveIntegerChecks>false</RemoveIntegerChecks>
41-
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
42-
<WarningLevel>4</WarningLevel>
43-
<DebugType>full</DebugType>
44-
<ErrorReport>prompt</ErrorReport>
45-
<NoWarn>CS1591</NoWarn>
46-
<Prefer32Bit>false</Prefer32Bit>
47-
</PropertyGroup>
48-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
49-
<OutputPath>bin\Release\</OutputPath>
50-
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
51-
<BaseAddress>285212672</BaseAddress>
52-
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
53-
<ConfigurationOverrideFile />
54-
<DefineConstants>TRACE</DefineConstants>
55-
<DocumentationFile />
56-
<DebugSymbols>false</DebugSymbols>
57-
<FileAlignment>4096</FileAlignment>
58-
<Optimize>true</Optimize>
59-
<RegisterForComInterop>false</RegisterForComInterop>
60-
<RemoveIntegerChecks>false</RemoveIntegerChecks>
61-
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
62-
<WarningLevel>4</WarningLevel>
63-
<DebugType>none</DebugType>
64-
<ErrorReport>prompt</ErrorReport>
65-
<NoWarn>CS1591</NoWarn>
66-
<Prefer32Bit>false</Prefer32Bit>
67-
</PropertyGroup>
68-
<ItemGroup>
69-
<ProjectReference Include="..\SvgNet\SvgNet.csproj">
70-
<Name>SvgNet</Name>
71-
<Project>{BB4C8021-B5E1-4DE2-82CB-14BDFB9837E4}</Project>
72-
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
73-
</ProjectReference>
74-
<Reference Include="System">
75-
<Name>System</Name>
76-
</Reference>
77-
<Reference Include="System.Data">
78-
<Name>System.Data</Name>
79-
</Reference>
80-
<Reference Include="System.Drawing">
81-
<Name>System.Drawing</Name>
82-
</Reference>
83-
<Reference Include="System.Windows.Forms">
84-
<Name>System.Windows.Forms</Name>
85-
</Reference>
86-
<Reference Include="System.Xml">
87-
<Name>System.XML</Name>
88-
</Reference>
89-
</ItemGroup>
90-
<ItemGroup>
91-
<Compile Include="AssemblyInfo.cs">
92-
<SubType>Code</SubType>
93-
</Compile>
94-
<Compile Include="Assert.cs" />
95-
<Compile Include="DocForm.cs">
96-
<SubType>Form</SubType>
97-
</Compile>
98-
<Compile Include="DocForm.Designer.cs">
99-
<DependentUpon>DocForm.cs</DependentUpon>
100-
</Compile>
101-
<Compile Include="StringExtensions.cs" />
102-
<Content Include="App.ico" />
103-
<EmbeddedResource Include="DocForm.resx">
104-
<DependentUpon>DocForm.cs</DependentUpon>
105-
</EmbeddedResource>
106-
</ItemGroup>
107-
<ItemGroup>
108-
<None Include="app.config" />
109-
</ItemGroup>
110-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
111-
<PropertyGroup>
112-
<PreBuildEvent />
113-
<PostBuildEvent />
114-
</PropertyGroup>
115-
<Target Name="NugetOrg" />
116-
<Target Name="TagSources" />
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<Target Name="Build" Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true'">
3+
<Message Importance="high" Text="Nothing to build" />
4+
</Target>
5+
<PropertyGroup>
6+
<TargetFramework>net471</TargetFramework>
7+
<ProjectType>Local</ProjectType>
8+
<ApplicationIcon>App.ico</ApplicationIcon>
9+
<AssemblyKeyContainerName />
10+
<AssemblyOriginatorKeyFile />
11+
<DefaultClientScript>JScript</DefaultClientScript>
12+
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
13+
<DefaultTargetSchema>IE50</DefaultTargetSchema>
14+
<DelaySign>false</DelaySign>
15+
<OutputType>WinExe</OutputType>
16+
<StartupObject />
17+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
18+
<UseWindowsForms>true</UseWindowsForms>
19+
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
20+
</PropertyGroup>
21+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
22+
<BaseAddress>285212672</BaseAddress>
23+
<ConfigurationOverrideFile />
24+
<FileAlignment>4096</FileAlignment>
25+
<RegisterForComInterop>false</RegisterForComInterop>
26+
<RemoveIntegerChecks>false</RemoveIntegerChecks>
27+
<NoWarn>CS1591</NoWarn>
28+
</PropertyGroup>
29+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
30+
<BaseAddress>285212672</BaseAddress>
31+
<ConfigurationOverrideFile />
32+
<FileAlignment>4096</FileAlignment>
33+
<RegisterForComInterop>false</RegisterForComInterop>
34+
<RemoveIntegerChecks>false</RemoveIntegerChecks>
35+
<DebugType>none</DebugType>
36+
<NoWarn>CS1591</NoWarn>
37+
</PropertyGroup>
38+
<ItemGroup>
39+
<ProjectReference Include="..\SvgNet\SvgNet.csproj" />
40+
<Reference Update="System">
41+
<Name>System</Name>
42+
</Reference>
43+
<Reference Update="System.Data">
44+
<Name>System.Data</Name>
45+
</Reference>
46+
<Reference Update="System.Drawing">
47+
<Name>System.Drawing</Name>
48+
</Reference>
49+
<Reference Update="System.Xml">
50+
<Name>System.XML</Name>
51+
</Reference>
52+
</ItemGroup>
53+
<ItemGroup>
54+
<Content Include="App.ico" />
55+
</ItemGroup>
56+
<PropertyGroup />
57+
<Target Name="NugetOrg" />
58+
<Target Name="TagSources" />
11759
</Project>

SvgGdiTest/SvgGdiTest.csproj

Lines changed: 65 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -1,118 +1,66 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
3-
<PropertyGroup>
4-
<ProjectType>Local</ProjectType>
5-
<ProductVersion>8.0.30319</ProductVersion>
6-
<SchemaVersion>2.0</SchemaVersion>
7-
<LangVersion>12</LangVersion>
8-
<ProjectGuid>{0C963EB6-C1B4-453D-B694-E81EC26D3AB9}</ProjectGuid>
9-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
10-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
11-
<ApplicationIcon>App.ico</ApplicationIcon>
12-
<AssemblyKeyContainerName />
13-
<AssemblyName>SvgGdiTest</AssemblyName>
14-
<AssemblyOriginatorKeyFile />
15-
<DefaultClientScript>JScript</DefaultClientScript>
16-
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
17-
<DefaultTargetSchema>IE50</DefaultTargetSchema>
18-
<DelaySign>false</DelaySign>
19-
<OutputType>WinExe</OutputType>
20-
<RootNamespace>SvgGdiTest</RootNamespace>
21-
<StartupObject />
22-
<FileUpgradeFlags>
23-
</FileUpgradeFlags>
24-
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
25-
<OldToolsVersion>0.0</OldToolsVersion>
26-
<UpgradeBackupLocation />
27-
<TargetFrameworkProfile />
28-
</PropertyGroup>
29-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
30-
<OutputPath>bin\Debug\</OutputPath>
31-
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
32-
<BaseAddress>285212672</BaseAddress>
33-
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
34-
<ConfigurationOverrideFile />
35-
<DefineConstants>DEBUG;TRACE</DefineConstants>
36-
<DocumentationFile>testdoc.xml</DocumentationFile>
37-
<DebugSymbols>true</DebugSymbols>
38-
<FileAlignment>4096</FileAlignment>
39-
<Optimize>false</Optimize>
40-
<RegisterForComInterop>false</RegisterForComInterop>
41-
<RemoveIntegerChecks>false</RemoveIntegerChecks>
42-
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
43-
<WarningLevel>4</WarningLevel>
44-
<DebugType>full</DebugType>
45-
<ErrorReport>prompt</ErrorReport>
46-
<Prefer32Bit>false</Prefer32Bit>
47-
<NoWarn>CS1591</NoWarn>
48-
</PropertyGroup>
49-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
50-
<OutputPath>bin\Release\</OutputPath>
51-
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
52-
<BaseAddress>285212672</BaseAddress>
53-
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
54-
<ConfigurationOverrideFile />
55-
<DefineConstants>TRACE</DefineConstants>
56-
<DocumentationFile />
57-
<DebugSymbols>false</DebugSymbols>
58-
<FileAlignment>4096</FileAlignment>
59-
<Optimize>true</Optimize>
60-
<RegisterForComInterop>false</RegisterForComInterop>
61-
<RemoveIntegerChecks>false</RemoveIntegerChecks>
62-
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
63-
<WarningLevel>4</WarningLevel>
64-
<DebugType>none</DebugType>
65-
<ErrorReport>prompt</ErrorReport>
66-
<Prefer32Bit>false</Prefer32Bit>
67-
<NoWarn>CS1591</NoWarn>
68-
</PropertyGroup>
69-
<ItemGroup>
70-
<Reference Include="System">
71-
<Name>System</Name>
72-
</Reference>
73-
<Reference Include="System.Data">
74-
<Name>System.Data</Name>
75-
</Reference>
76-
<Reference Include="System.Drawing">
77-
<Name>System.Drawing</Name>
78-
</Reference>
79-
<Reference Include="System.Windows.Forms">
80-
<Name>System.Windows.Forms</Name>
81-
</Reference>
82-
<Reference Include="System.Xml">
83-
<Name>System.XML</Name>
84-
</Reference>
85-
</ItemGroup>
86-
<ItemGroup>
87-
<Compile Include="RectAlignedTextTest.cs" />
88-
<Compile Include="..\TestShared\TestShared.cs">
89-
<Link>TestShared.cs</Link>
90-
</Compile>
91-
<Compile Include="AssemblyInfo.cs">
92-
<SubType>Code</SubType>
93-
</Compile>
94-
<Compile Include="SvgGdiTestForm.Designer.cs">
95-
<DependentUpon>SvgGdiTestForm.cs</DependentUpon>
96-
</Compile>
97-
<Compile Include="SvgGdiTestForm.cs">
98-
<SubType>Form</SubType>
99-
</Compile>
100-
<EmbeddedResource Include="App.ico" />
101-
<EmbeddedResource Include="SvgGdiTestForm.resx">
102-
<DependentUpon>SvgGdiTestForm.cs</DependentUpon>
103-
</EmbeddedResource>
104-
<EmbeddedResource Include="test.bmp" />
105-
</ItemGroup>
106-
<ItemGroup>
107-
<ProjectReference Include="..\SvgNet\SvgNet.csproj">
108-
<Project>{bb4c8021-b5e1-4de2-82cb-14bdfb9837e4}</Project>
109-
<Name>SvgNet</Name>
110-
</ProjectReference>
111-
</ItemGroup>
112-
<ItemGroup>
113-
<None Include="app.config" />
114-
</ItemGroup>
115-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
116-
<Target Name="NugetOrg" />
117-
<Target Name="TagSources" />
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<Target Name="Build" Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true'">
3+
<Message Importance="high" Text="Nothing to build" />
4+
</Target>
5+
<PropertyGroup>
6+
<TargetFramework>net471</TargetFramework>
7+
<ProjectType>Local</ProjectType>
8+
<LangVersion>12</LangVersion>
9+
<ApplicationIcon>App.ico</ApplicationIcon>
10+
<AssemblyKeyContainerName />
11+
<AssemblyOriginatorKeyFile />
12+
<DefaultClientScript>JScript</DefaultClientScript>
13+
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
14+
<DefaultTargetSchema>IE50</DefaultTargetSchema>
15+
<DelaySign>false</DelaySign>
16+
<OutputType>WinExe</OutputType>
17+
<StartupObject />
18+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
19+
<UseWindowsForms>true</UseWindowsForms>
20+
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
21+
</PropertyGroup>
22+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
23+
<BaseAddress>285212672</BaseAddress>
24+
<ConfigurationOverrideFile />
25+
<DocumentationFile>testdoc.xml</DocumentationFile>
26+
<FileAlignment>4096</FileAlignment>
27+
<RegisterForComInterop>false</RegisterForComInterop>
28+
<RemoveIntegerChecks>false</RemoveIntegerChecks>
29+
<NoWarn>CS1591</NoWarn>
30+
</PropertyGroup>
31+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
32+
<BaseAddress>285212672</BaseAddress>
33+
<ConfigurationOverrideFile />
34+
<FileAlignment>4096</FileAlignment>
35+
<RegisterForComInterop>false</RegisterForComInterop>
36+
<RemoveIntegerChecks>false</RemoveIntegerChecks>
37+
<DebugType>none</DebugType>
38+
<NoWarn>CS1591</NoWarn>
39+
</PropertyGroup>
40+
<ItemGroup>
41+
<Reference Update="System">
42+
<Name>System</Name>
43+
</Reference>
44+
<Reference Update="System.Data">
45+
<Name>System.Data</Name>
46+
</Reference>
47+
<Reference Update="System.Drawing">
48+
<Name>System.Drawing</Name>
49+
</Reference>
50+
<Reference Update="System.Xml">
51+
<Name>System.XML</Name>
52+
</Reference>
53+
</ItemGroup>
54+
<ItemGroup>
55+
<Compile Include="..\TestShared\TestShared.cs">
56+
<Link>TestShared.cs</Link>
57+
</Compile>
58+
<EmbeddedResource Include="App.ico" />
59+
<EmbeddedResource Include="test.bmp" />
60+
</ItemGroup>
61+
<ItemGroup>
62+
<ProjectReference Include="..\SvgNet\SvgNet.csproj" />
63+
</ItemGroup>
64+
<Target Name="NugetOrg" />
65+
<Target Name="TagSources" />
11866
</Project>

0 commit comments

Comments
 (0)