Skip to content

Commit 04806d2

Browse files
committed
refactor(ci): 重构构建配置和CI工作流
统一项目构建输出路径结构,移除冗余的x86 Debug配置 简化CI工作流中的artifact上传逻辑,支持多架构构建 更新PR检查工作流名称以更准确反映其用途 Signed-off-by: doudou0720 <98651603+doudou0720@users.noreply.github.com>
1 parent 759a635 commit 04806d2

5 files changed

Lines changed: 23 additions & 62 deletions

File tree

.github/workflows/dotnet-desktop.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
- name: Check if exe file is generated
4747
id: check-exe
4848
run: |
49-
$exePath = "Ink Canvas\bin\Debug\net472\InkCanvasForClass.exe"
49+
$exePath = "Ink Canvas\bin\Debug\${{ matrix.architecture }}\net472\InkCanvasForClass.exe"
5050
5151
if (Test-Path $exePath) {
5252
echo "build_success=true" >> $env:GITHUB_OUTPUT
@@ -69,19 +69,12 @@ jobs:
6969
$version = "debug-$shortSha-$env:GITHUB_RUN_NUMBER"
7070
echo "archive_name=$version" >> $env:GITHUB_OUTPUT
7171
72-
- name: Upload Artifact(AnyCPU) (if build succeeded)
73-
if: steps.check-exe.outputs.build_success == 'true' && matrix.architecture == 'AnyCPU'
74-
uses: actions/upload-artifact@v7
75-
with:
76-
name: InkCanvasForClass.CE.debug
77-
path: "Ink Canvas/bin/Debug/net472/*"
78-
79-
- name: Upload Artifact(x86) (if build succeeded)
80-
if: steps.check-exe.outputs.build_success == 'true' && matrix.architecture == 'x86'
72+
- name: Upload Artifact (if build succeeded)
73+
if: steps.check-exe.outputs.build_success == 'true'
8174
uses: actions/upload-artifact@v7
8275
with:
83-
name: InkCanvasForClass.CE.debug.x86
84-
path: "Ink Canvas/bin/x86 Debug/net472/*"
76+
name: InkCanvasForClass.CE.debug.${{ matrix.architecture }}
77+
path: "Ink Canvas/bin/Debug/${{ matrix.architecture }}/net472/*"
8578

8679
- name: Create Summary
8780
if: always()

.github/workflows/prcheck.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: .NET Build & Package
1+
name: PR Check
22

33
on:
44
pull_request:
@@ -43,7 +43,7 @@ jobs:
4343
- name: Check if exe file is generated
4444
id: check-exe
4545
run: |
46-
$exePath = "Ink Canvas\bin\Debug\net472\InkCanvasForClass.exe"
46+
$exePath = "Ink Canvas\bin\Debug\${{ matrix.architecture }}\net472\InkCanvasForClass.exe"
4747
4848
if (Test-Path $exePath) {
4949
echo "build_success=true" >> $env:GITHUB_OUTPUT
@@ -66,19 +66,13 @@ jobs:
6666
$version = "debug-$shortSha-$env:GITHUB_RUN_NUMBER"
6767
echo "archive_name=$version" >> $env:GITHUB_OUTPUT
6868
69-
- name: Upload Artifact(AnyCPU) (if build succeeded)
70-
if: steps.check-exe.outputs.build_success == 'true' && matrix.architecture == 'AnyCPU'
69+
- name: Upload Artifact (if build succeeded)
70+
if: steps.check-exe.outputs.build_success == 'true'
7171
uses: actions/upload-artifact@v7
7272
with:
73-
name: InkCanvasForClass.CE.debug
74-
path: "Ink Canvas/bin/Debug/net472/*"
73+
name: InkCanvasForClass.CE.debug.${{ matrix.architecture }}
74+
path: "Ink Canvas/bin/Debug/${{ matrix.architecture }}/net472/*"
7575

76-
- name: Upload Artifact(x86) (if build succeeded)
77-
if: steps.check-exe.outputs.build_success == 'true' && matrix.architecture == 'x86'
78-
uses: actions/upload-artifact@v7
79-
with:
80-
name: InkCanvasForClass.CE.debug.x86
81-
path: "Ink Canvas/bin/x86 Debug/net472/*"
8276

8377
- name: Create Summary
8478
if: always()

Ink Canvas.sln

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ Global
2727
{8D0EDFC7-F974-4571-BC49-6F3A6653FE81}.Debug|ARM64.Build.0 = Debug|Any CPU
2828
{8D0EDFC7-F974-4571-BC49-6F3A6653FE81}.Debug|x64.ActiveCfg = Debug|Any CPU
2929
{8D0EDFC7-F974-4571-BC49-6F3A6653FE81}.Debug|x64.Build.0 = Debug|Any CPU
30-
{8D0EDFC7-F974-4571-BC49-6F3A6653FE81}.Debug|x86.ActiveCfg = x86 Debug|AnyCPU
31-
{8D0EDFC7-F974-4571-BC49-6F3A6653FE81}.Debug|x86.Build.0 = x86 Debug|AnyCPU
30+
{8D0EDFC7-F974-4571-BC49-6F3A6653FE81}.Debug|x86.ActiveCfg = Debug|x86
31+
{8D0EDFC7-F974-4571-BC49-6F3A6653FE81}.Debug|x86.Build.0 = Debug|x86
3232
{8D0EDFC7-F974-4571-BC49-6F3A6653FE81}.Release|Any CPU.ActiveCfg = Release|Any CPU
3333
{8D0EDFC7-F974-4571-BC49-6F3A6653FE81}.Release|Any CPU.Build.0 = Release|Any CPU
3434
{8D0EDFC7-F974-4571-BC49-6F3A6653FE81}.Release|ARM.ActiveCfg = Release|Any CPU

Ink Canvas/InkCanvasForClass.csproj

Lines changed: 9 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -25,45 +25,32 @@
2525
<BootstrapperEnabled>false</BootstrapperEnabled>
2626
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
2727
<UseWPF>true</UseWPF>
28-
<Configurations>Debug;Release;x86 Debug</Configurations>
28+
<Configurations>Debug;Release</Configurations>
2929
</PropertyGroup>
3030
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
3131
<DebugType>embedded</DebugType>
32-
<OutputPath>bin\$(Configuration)\</OutputPath>
32+
<OutputPath>bin\$(Configuration)\$(Platform)\</OutputPath>
3333
<PlatformTarget>AnyCPU</PlatformTarget>
3434
<Prefer32Bit>false</Prefer32Bit>
3535
</PropertyGroup>
36-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x86 Debug|AnyCPU'">
37-
<DebugType>embedded</DebugType>
38-
<OutputPath>bin\$(Configuration)\</OutputPath>
39-
<PlatformTarget>x86</PlatformTarget>
40-
<Prefer32Bit>true</Prefer32Bit>
41-
</PropertyGroup>
4236
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
4337
<DebugType>embedded</DebugType>
44-
<OutputPath>bin\$(Configuration)\</OutputPath>
38+
<OutputPath>bin\$(Configuration)\$(Platform)\</OutputPath>
4539
<PlatformTarget>AnyCPU</PlatformTarget>
4640
<Prefer32Bit>false</Prefer32Bit>
4741
</PropertyGroup>
4842
<PropertyGroup>
4943
<ApplicationIcon>Resources\icc.ico</ApplicationIcon>
5044
</PropertyGroup>
5145
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
52-
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
53-
<DebugType>full</DebugType>
54-
<LangVersion>7.3</LangVersion>
55-
<PlatformTarget>x86</PlatformTarget>
56-
<Prefer32Bit>true</Prefer32Bit>
57-
</PropertyGroup>
58-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x86 Debug|x86'">
59-
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
46+
<OutputPath>bin\$(Configuration)\$(Platform)\</OutputPath>
6047
<DebugType>full</DebugType>
6148
<LangVersion>7.3</LangVersion>
6249
<PlatformTarget>x86</PlatformTarget>
6350
<Prefer32Bit>true</Prefer32Bit>
6451
</PropertyGroup>
6552
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
66-
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
53+
<OutputPath>bin\$(Configuration)\$(Platform)\</OutputPath>
6754
<DebugType>pdbonly</DebugType>
6855
<LangVersion>7.3</LangVersion>
6956
<PlatformTarget>x86</PlatformTarget>
@@ -81,42 +68,28 @@
8168
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
8269
</PropertyGroup>
8370
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM64'">
84-
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
85-
<DebugType>full</DebugType>
86-
<LangVersion>7.3</LangVersion>
87-
<PlatformTarget>ARM64</PlatformTarget>
88-
<Prefer32Bit>false</Prefer32Bit>
89-
</PropertyGroup>
90-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x86 Debug|ARM64'">
91-
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
71+
<OutputPath>bin\$(Configuration)\$(Platform)\</OutputPath>
9272
<DebugType>full</DebugType>
9373
<LangVersion>7.3</LangVersion>
9474
<PlatformTarget>ARM64</PlatformTarget>
9575
<Prefer32Bit>false</Prefer32Bit>
9676
</PropertyGroup>
9777
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM64'">
98-
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
78+
<OutputPath>bin\$(Configuration)\$(Platform)\</OutputPath>
9979
<DebugType>pdbonly</DebugType>
10080
<LangVersion>7.3</LangVersion>
10181
<PlatformTarget>ARM64</PlatformTarget>
10282
<Prefer32Bit>false</Prefer32Bit>
10383
</PropertyGroup>
10484
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
105-
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
106-
<DebugType>full</DebugType>
107-
<LangVersion>7.3</LangVersion>
108-
<PlatformTarget>x64</PlatformTarget>
109-
<Prefer32Bit>false</Prefer32Bit>
110-
</PropertyGroup>
111-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x86 Debug|x64'">
112-
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
85+
<OutputPath>bin\$(Configuration)\$(Platform)\</OutputPath>
11386
<DebugType>full</DebugType>
11487
<LangVersion>7.3</LangVersion>
11588
<PlatformTarget>x64</PlatformTarget>
11689
<Prefer32Bit>false</Prefer32Bit>
11790
</PropertyGroup>
11891
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
119-
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
92+
<OutputPath>bin\$(Configuration)\$(Platform)\</OutputPath>
12093
<DebugType>pdbonly</DebugType>
12194
<LangVersion>7.3</LangVersion>
12295
<PlatformTarget>x64</PlatformTarget>

UI.WPF.Modern

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit d71cbc3609d51d67f41b9e50570ca4419defb212

0 commit comments

Comments
 (0)