From e7ed1232465445764e36fe6619466e3aa7914875 Mon Sep 17 00:00:00 2001 From: Felipe Zorzo Date: Wed, 3 Jan 2024 23:56:06 -0300 Subject: [PATCH] build: Simplify project configurations and fix workflow Deleted project configurations for different versions of Forms in Ndapi/Ndapi.csproj and updated the build workflow accordingly. Split the CreateModuleDemo project into two separate projects for handling x86 and x64 platforms respectively. --- .github/workflows/build.yml | 14 +++--- Ndapi.sln | 44 ++++++++----------- Ndapi/Ndapi.csproj | 41 ----------------- Ndapi/Ndapi.targets | 19 -------- ...emo.csproj => CreateModuleDemo.x64.csproj} | 3 +- .../CreateModuleDemo.x86.csproj | 14 ++++++ 6 files changed, 40 insertions(+), 95 deletions(-) delete mode 100644 Ndapi/Ndapi.targets rename samples/CreateModuleDemo/{CreateModuleDemo.csproj => CreateModuleDemo.x64.csproj} (69%) create mode 100644 samples/CreateModuleDemo/CreateModuleDemo.x86.csproj diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 37309c4..4f800e3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,22 +16,22 @@ jobs: with: dotnet-version: 8.0.x - - name: Build dll for Forms 6.0.8 - run: dotnet build -c Release_6_0_8 - - name: Set version run: | echo "Buid version is ${{github.run_number}}" sed -i "s/\(\([0-9]\+\.\)\{2\}\)\([0-9]\+\)/\1${{github.run_number}}/" Ndapi/Ndapi.csproj - - name: Build dll for Forms 12.2.1.3 - run: dotnet build -c Release_12_2_1_3 -p:Platform=x64 + - name: Build + run: dotnet build -c Release - name: Build NuGet package run: dotnet pack -c Release --no-build - - name: Build trimmed sample with NativeAOT - run: dotnet publish -c Release_12_2_1_3 -p:"Platform=x64;PublishAot=true" -r linux-x64 + - name: Build trimmed sample for Forms 6i + run: dotnet publish -c Release -p:"Platform=x86;PublishTrimmed=true;PublishSingleFile=true" -r linux-x86 .\samples\CreateModuleDemo\CreateModuleDemo.x64.csproj + + - name: Build trimmed sample with NativeAOT for Forms 12c + run: dotnet publish -c Release -p:"Platform=x64;PublishAot=true" -r linux-x64 .\samples\CreateModuleDemo\CreateModuleDemo.x64.csproj - name: Add NuGet source run: dotnet nuget add source --username felipebz --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/felipebz/index.json" diff --git a/Ndapi.sln b/Ndapi.sln index 4a8585a..a716669 100644 --- a/Ndapi.sln +++ b/Ndapi.sln @@ -7,43 +7,35 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ndapi", "Ndapi\Ndapi.csproj EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{4723020B-11B3-4F47-8B03-9202932B1664}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CreateModuleDemo", "samples\CreateModuleDemo\CreateModuleDemo.csproj", "{B19FAA09-7A39-4E23-B1CF-E93A02B41D9E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CreateModuleDemo.x86", "samples\CreateModuleDemo\CreateModuleDemo.x86.csproj", "{B19FAA09-7A39-4E23-B1CF-E93A02B41D9E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CreateModuleDemo.x64", "samples\CreateModuleDemo\CreateModuleDemo.x64.csproj", "{F7C6E4D9-86E5-40EF-82C1-E71B68CA1119}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Release_6_0_8|x86 = Release_6_0_8|x86 - Release_12_2_1_3|x64 = Release_12_2_1_3|x64 - Debug_12_2_1_3|x64 = Debug_12_2_1_3|x64 - Debug_6_0_8|x86 = Debug_6_0_8|x86 - Release|x86 = Release|x86 + Release|Any CPU = Release|Any CPU + Debug|Any CPU = Debug|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B19FAA09-7A39-4E23-B1CF-E93A02B41D9E}.Release_6_0_8|x86.ActiveCfg = Release_6_0_8|x86 - {B19FAA09-7A39-4E23-B1CF-E93A02B41D9E}.Release_6_0_8|x86.Build.0 = Release_6_0_8|x86 - {B19FAA09-7A39-4E23-B1CF-E93A02B41D9E}.Release_12_2_1_3|x64.ActiveCfg = Release_12_2_1_3|x64 - {B19FAA09-7A39-4E23-B1CF-E93A02B41D9E}.Release_12_2_1_3|x64.Build.0 = Release_12_2_1_3|x64 - {B19FAA09-7A39-4E23-B1CF-E93A02B41D9E}.Debug_12_2_1_3|x64.ActiveCfg = Debug_12_2_1_3|x64 - {B19FAA09-7A39-4E23-B1CF-E93A02B41D9E}.Debug_12_2_1_3|x64.Build.0 = Debug_12_2_1_3|x64 - {B19FAA09-7A39-4E23-B1CF-E93A02B41D9E}.Debug_6_0_8|x86.ActiveCfg = Debug_6_0_8|x86 - {B19FAA09-7A39-4E23-B1CF-E93A02B41D9E}.Debug_6_0_8|x86.Build.0 = Debug_6_0_8|x86 - {B19FAA09-7A39-4E23-B1CF-E93A02B41D9E}.Release|x86.ActiveCfg = Release|x86 - {B19FAA09-7A39-4E23-B1CF-E93A02B41D9E}.Release|x86.Build.0 = Release|x86 - {9DEBDE14-7C3C-4EBB-A3E9-5C8FBB7E0C04}.Debug_12_2_1_3|x64.ActiveCfg = Debug_12_2_1_3|Any CPU - {9DEBDE14-7C3C-4EBB-A3E9-5C8FBB7E0C04}.Debug_12_2_1_3|x64.Build.0 = Debug_12_2_1_3|Any CPU - {9DEBDE14-7C3C-4EBB-A3E9-5C8FBB7E0C04}.Debug_6_0_8|x86.ActiveCfg = Debug_6_0_8|Any CPU - {9DEBDE14-7C3C-4EBB-A3E9-5C8FBB7E0C04}.Debug_6_0_8|x86.Build.0 = Debug_6_0_8|Any CPU - {9DEBDE14-7C3C-4EBB-A3E9-5C8FBB7E0C04}.Release|x86.ActiveCfg = Release|Any CPU - {9DEBDE14-7C3C-4EBB-A3E9-5C8FBB7E0C04}.Release|x86.Build.0 = Release|Any CPU - {9DEBDE14-7C3C-4EBB-A3E9-5C8FBB7E0C04}.Release_12_2_1_3|x64.ActiveCfg = Release_12_2_1_3|Any CPU - {9DEBDE14-7C3C-4EBB-A3E9-5C8FBB7E0C04}.Release_12_2_1_3|x64.Build.0 = Release_12_2_1_3|Any CPU - {9DEBDE14-7C3C-4EBB-A3E9-5C8FBB7E0C04}.Release_6_0_8|x86.ActiveCfg = Release_6_0_8|Any CPU - {9DEBDE14-7C3C-4EBB-A3E9-5C8FBB7E0C04}.Release_6_0_8|x86.Build.0 = Release_6_0_8|Any CPU + {F7C6E4D9-86E5-40EF-82C1-E71B68CA1119}.Release|Any CPU.ActiveCfg = Release|x64 + {F7C6E4D9-86E5-40EF-82C1-E71B68CA1119}.Release|Any CPU.Build.0 = Release|x64 + {F7C6E4D9-86E5-40EF-82C1-E71B68CA1119}.Debug|Any CPU.ActiveCfg = Debug|x64 + {F7C6E4D9-86E5-40EF-82C1-E71B68CA1119}.Debug|Any CPU.Build.0 = Debug|x64 + {B19FAA09-7A39-4E23-B1CF-E93A02B41D9E}.Release|Any CPU.ActiveCfg = Release|x86 + {B19FAA09-7A39-4E23-B1CF-E93A02B41D9E}.Release|Any CPU.Build.0 = Release|x86 + {B19FAA09-7A39-4E23-B1CF-E93A02B41D9E}.Debug|Any CPU.ActiveCfg = Debug|x86 + {B19FAA09-7A39-4E23-B1CF-E93A02B41D9E}.Debug|Any CPU.Build.0 = Debug|x86 + {9DEBDE14-7C3C-4EBB-A3E9-5C8FBB7E0C04}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9DEBDE14-7C3C-4EBB-A3E9-5C8FBB7E0C04}.Release|Any CPU.Build.0 = Release|Any CPU + {9DEBDE14-7C3C-4EBB-A3E9-5C8FBB7E0C04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9DEBDE14-7C3C-4EBB-A3E9-5C8FBB7E0C04}.Debug|Any CPU.Build.0 = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {B19FAA09-7A39-4E23-B1CF-E93A02B41D9E} = {4723020B-11B3-4F47-8B03-9202932B1664} + {F7C6E4D9-86E5-40EF-82C1-E71B68CA1119} = {4723020B-11B3-4F47-8B03-9202932B1664} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {37C516EE-8914-4519-BCF6-600667E2AA2A} diff --git a/Ndapi/Ndapi.csproj b/Ndapi/Ndapi.csproj index ea886a4..4f4ccd1 100644 --- a/Ndapi/Ndapi.csproj +++ b/Ndapi/Ndapi.csproj @@ -2,7 +2,6 @@ net8.0 - Release;Debug_12_2_1_3;Debug_6_0_8;Release_12_2_1_3;Release_6_0_8 A .NET wrapper for Oracle Forms 12c Open API Felipe Zorzo MIT @@ -16,48 +15,8 @@ true - - bin\Debug\6.0.8 - 6.0.8 - - - - bin\Release\6.0.8 - true - 6.0.8 - - - - bin\Debug\12.2.1.3 - 12.2.1.3 - - - - bin\Release\12.2.1.3 - true - 12.2.1.3 - - - - FORMS_608;FORMS_6;FORMS_6_OR_GREATER - - - - FORMS_12213;FORMS_12;FORMS_12_OR_GREATER - - - - false - - - - - - - - diff --git a/Ndapi/Ndapi.targets b/Ndapi/Ndapi.targets deleted file mode 100644 index 2a0968f..0000000 --- a/Ndapi/Ndapi.targets +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - $(MSBuildThisFileDirectory)$(NdapiFormsVersion)\net8.0\Ndapi.dll - - - - \ No newline at end of file diff --git a/samples/CreateModuleDemo/CreateModuleDemo.csproj b/samples/CreateModuleDemo/CreateModuleDemo.x64.csproj similarity index 69% rename from samples/CreateModuleDemo/CreateModuleDemo.csproj rename to samples/CreateModuleDemo/CreateModuleDemo.x64.csproj index 2efcb65..e3ad851 100644 --- a/samples/CreateModuleDemo/CreateModuleDemo.csproj +++ b/samples/CreateModuleDemo/CreateModuleDemo.x64.csproj @@ -2,9 +2,8 @@ net8.0 - x64;x86 + x64 Exe - Debug;Release;Debug_12_2_1_3;Debug_6_0_8;Release_12_2_1_3;Release_6_0_8 false diff --git a/samples/CreateModuleDemo/CreateModuleDemo.x86.csproj b/samples/CreateModuleDemo/CreateModuleDemo.x86.csproj new file mode 100644 index 0000000..db63511 --- /dev/null +++ b/samples/CreateModuleDemo/CreateModuleDemo.x86.csproj @@ -0,0 +1,14 @@ + + + + net8.0 + x86 + Exe + false + + + + + + +