Skip to content

Commit 5586611

Browse files
committed
- update appveyor build to VS2022
- added GH action CI build - removed binary data available from releases - fixed AssemblyInfo.cs version
1 parent 369666f commit 5586611

8 files changed

Lines changed: 108 additions & 28 deletions

File tree

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
9+
# Maintain dependencies for GitHub Actions
10+
- package-ecosystem: "github-actions"
11+
directory: "/"
12+
schedule:
13+
interval: "monthly"

.github/workflows/CI_build.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: CI_build
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: windows-latest
9+
strategy:
10+
max-parallel: 6
11+
matrix:
12+
build_configuration: [Release, Debug]
13+
build_platform: [x64, Any CPU]
14+
15+
steps:
16+
- name: Checkout repo
17+
uses: actions/checkout@v3
18+
19+
- name: Add msbuild to PATH
20+
uses: microsoft/setup-msbuild@v1
21+
22+
- name: MSBuild of plugin dll
23+
working-directory: .
24+
run: msbuild BracketsCheck.sln /m /p:configuration="${{ matrix.build_configuration }}" /p:platform="${{ matrix.build_platform }}"
25+
26+
- name: Archive artifacts for x64
27+
if: matrix.build_platform == 'x64' && matrix.build_configuration == 'Release'
28+
uses: actions/upload-artifact@v3
29+
with:
30+
name: plugin_dll_x64
31+
path: BracketsCheck\bin\${{ matrix.build_platform }}\${{ matrix.build_configuration }}\BracketsCheck.dll
32+
33+
- name: Archive artifacts for AnyCPU
34+
if: matrix.build_platform == 'AnyCPU' && matrix.build_configuration == 'Release'
35+
uses: actions/upload-artifact@v3
36+
with:
37+
name: plugin_dll_x86
38+
path: BracketsCheck\bin\${{ matrix.build_configuration }}\BracketsCheck.dll
39+
40+
- uses: olegtarasov/get-tag@v2.1.2
41+
id: tagName
42+
43+
- name: Release for x64
44+
uses: softprops/action-gh-release@v1
45+
if: startsWith(github.ref, 'refs/tags/') && matrix.build_platform == 'x64'
46+
with:
47+
files: BracketsCheck-${{ steps.tagName.outputs.tag }}-x64.zip
48+
49+
- name: Release for x86
50+
uses: softprops/action-gh-release@v1
51+
if: startsWith(github.ref, 'refs/tags/') && matrix.build_platform == 'AnyCPU'
52+
with:
53+
files: BracketsCheck-${{ steps.tagName.outputs.tag }}-x86.zip
54+

BracketsCheck/BracketsCheck.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<RootNamespace>BracketsCheck</RootNamespace>
1111
<AssemblyName>BracketsCheck</AssemblyName>
1212
<OutputPath>bin\Debug\</OutputPath>
13-
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
13+
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
1414
<FileUpgradeFlags>
1515
</FileUpgradeFlags>
1616
<OldToolsVersion>3.5</OldToolsVersion>
@@ -48,6 +48,7 @@
4848
<ErrorReport>prompt</ErrorReport>
4949
<CodeAnalysisIgnoreGeneratedCode>false</CodeAnalysisIgnoreGeneratedCode>
5050
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
51+
<Prefer32Bit>false</Prefer32Bit>
5152
</PropertyGroup>
5253
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
5354
<OutputPath>bin\x64\Release\</OutputPath>
@@ -57,6 +58,7 @@
5758
<PlatformTarget>x64</PlatformTarget>
5859
<ErrorReport>prompt</ErrorReport>
5960
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
61+
<Prefer32Bit>false</Prefer32Bit>
6062
</PropertyGroup>
6163
<ItemGroup>
6264
<Reference Include="System" />

BracketsCheck/DllExport/NppPlugin.DllExport.targets

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
<Target Name="AfterBuild"
66
DependsOnTargets="GetFrameworkPaths"
77
>
8+
<PropertyGroup>
9+
<!-- LibToolPath is optional - it's needed to debug C++, but you can still debug the C# code without it
10+
If you don't have the C++ toolchain installed this is missing, but then you can't' debug C++ anyway -->
11+
<LibToolPath Condition="Exists('$(DevEnvDir)\..\..\VC\bin')">$(DevEnvDir)\..\..\VC\bin</LibToolPath>
12+
</PropertyGroup>
813
<DllExportTask Platform="$(Platform)"
914
PlatformTarget="$(PlatformTarget)"
1015
CpuType="$(CpuType)"
@@ -17,7 +22,7 @@
1722
ProjectDirectory="$(MSBuildProjectDirectory)"
1823
InputFileName="$(TargetPath)"
1924
FrameworkPath="$(TargetedFrameworkDir);$(TargetFrameworkDirectory)"
20-
LibToolPath="$(DevEnvDir)\..\..\VC\bin"
25+
LibToolPath="$(LibToolPath)"
2126
LibToolDllPath="$(DevEnvDir)"
2227
SdkPath="$(SDK40ToolsPath)"/>
2328
</Target>

BracketsCheck/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.2.1")]
36-
[assembly: AssemblyFileVersion("1.2.1.0")]
35+
[assembly: AssemblyVersion("1.2.3")]
36+
[assembly: AssemblyFileVersion("1.2.3.0")]
-70.5 KB
Binary file not shown.
-28.8 KB
Binary file not shown.

appveyor.yml

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
version: 1.0.{build}
2-
image: Visual Studio 2015
1+
version: 1.2.3.{build}
2+
image: Visual Studio 2022
33

44

55
platform:
@@ -8,48 +8,54 @@ platform:
88
- x64
99

1010
configuration:
11-
- Debug
1211
- Release
12+
- Debug
1313

1414
install:
15-
- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
15+
- if "%platform%"=="x64" set archi=amd64
16+
- if "%platform%"=="x64" set platform_input=x64
17+
18+
- if "%platform%"=="x86" set archi=x86
19+
- if "%platform%"=="x86" set platform_input=x86
1620

17-
build:
18-
parallel: true # enable MSBuild parallel builds
19-
verbosity: minimal
21+
- if "%platform%"=="AnyCPU" set archi=x86
22+
- if "%platform%"=="AnyCPU" set platform_input=AnyCPU
23+
24+
25+
- call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" %archi%
2026

2127
build_script:
2228
- cd "%APPVEYOR_BUILD_FOLDER%\BracketsCheck"
23-
- msbuild BracketsCheck.csproj /m /p:configuration="%configuration%" /p:platform="%platform%"
29+
- msbuild BracketsCheck.csproj /m /p:configuration="%configuration%" /p:platform="%platform_input%"
2430

2531
after_build:
26-
- cd "%APPVEYOR_BUILD_FOLDER%\BracketsCheck"
32+
- cd "%APPVEYOR_BUILD_FOLDER%"
2733
- ps: >-
2834
29-
if ($env:PLATFORM -eq "x64") {
30-
Push-AppveyorArtifact "bin\$($env:PLATFORM)\$($env:CONFIGURATION)\BracketsCheck.dll" -FileName BracketsCheck.dll
35+
if ($env:PLATFORM_INPUT -eq "x64") {
36+
Push-AppveyorArtifact "BracketsCheck\bin\$($env:PLATFORM_INPUT)\$($env:CONFIGURATION)\BracketsCheck.dll" -FileName BracketsCheck.dll
3137
}
3238
33-
if ($env:PLATFORM -eq "x86" ) {
34-
Push-AppveyorArtifact "bin\$($env:PLATFORM)\$($env:CONFIGURATION)\BracketsCheck.dll" -FileName BracketsCheck.dll
39+
if ($env:PLATFORM_INPUT -eq "x86" ) {
40+
Push-AppveyorArtifact "BracketsCheck\bin\$($env:PLATFORM_INPUT)\$($env:CONFIGURATION)\BracketsCheck.dll" -FileName BracketsCheck.dll
3541
}
3642
37-
if ($env:PLATFORM -eq "AnyCPU" ) {
38-
Push-AppveyorArtifact "bin\$($env:CONFIGURATION)\BracketsCheck.dll" -FileName BracketsCheck.dll
43+
if ($env:PLATFORM_INPUT -eq "AnyCPU" ) {
44+
Push-AppveyorArtifact "BracketsCheck\bin\$($env:CONFIGURATION)\BracketsCheck.dll" -FileName BracketsCheck.dll
3945
}
4046
4147
if ($($env:APPVEYOR_REPO_TAG) -eq "true" -and $env:CONFIGURATION -eq "Release") {
42-
if($env:PLATFORM -eq "x64"){
43-
$ZipFileName = "NppHash_$($env:APPVEYOR_REPO_TAG_NAME)_x64.zip"
44-
7z a $ZipFileName bin\$env:PLATFORM\$env:CONFIGURATION\BracketsCheck.dll
48+
if($env:PLATFORM_INPUT -eq "x64"){
49+
$ZipFileName = "BracketsCheck_$($env:APPVEYOR_REPO_TAG_NAME)_x64.zip"
50+
7z a $ZipFileName "$($env:APPVEYOR_BUILD_FOLDER)\BracketsCheck\bin\$env:PLATFORM_INPUT\$env:CONFIGURATION\BracketsCheck.dll"
4551
}
46-
if($env:PLATFORM -eq "x86"){
47-
$ZipFileName = "NppHash_$($env:APPVEYOR_REPO_TAG_NAME)_x86.zip"
48-
7z a $ZipFileName bin\$env:PLATFORM\$env:CONFIGURATION\BracketsCheck.dll
52+
if($env:PLATFORM_INPUT -eq "x86"){
53+
$ZipFileName = "BracketsCheck_$($env:APPVEYOR_REPO_TAG_NAME)_x86.zip"
54+
7z a $ZipFileName "$($env:APPVEYOR_BUILD_FOLDER)\BracketsCheck\bin\$env:PLATFORM_INPUT\$env:CONFIGURATION\BracketsCheck.dll"
4955
}
50-
if($env:PLATFORM -eq "AnyCPU"){
51-
$ZipFileName = "NppHash_$($env:APPVEYOR_REPO_TAG_NAME)_x86.zip"
52-
7z a $ZipFileName bin\$env:CONFIGURATION\BracketsCheck.dll
56+
if($env:PLATFORM_INPUT -eq "AnyCPU"){
57+
$ZipFileName = "BracketsCheck_$($env:APPVEYOR_REPO_TAG_NAME)_x86.zip"
58+
7z a $ZipFileName "$($env:APPVEYOR_BUILD_FOLDER)\BracketsCheck\bin\$env:CONFIGURATION\BracketsCheck.dll"
5359
}
5460
}
5561

0 commit comments

Comments
 (0)