Skip to content

Commit

Permalink
build: Simplify project configurations and fix workflow
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
felipebz committed Jan 4, 2024
1 parent 9d728ef commit 0207e25
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 95 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Expand Up @@ -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/\(<Version>\([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" samples/CreateModuleDemo/CreateModuleDemo.x86.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"
Expand Down
44 changes: 18 additions & 26 deletions Ndapi.sln
Expand Up @@ -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}
Expand Down
41 changes: 0 additions & 41 deletions Ndapi/Ndapi.csproj
Expand Up @@ -2,7 +2,6 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Configurations>Release;Debug_12_2_1_3;Debug_6_0_8;Release_12_2_1_3;Release_6_0_8</Configurations>
<Description>A .NET wrapper for Oracle Forms 12c Open API</Description>
<Authors>Felipe Zorzo</Authors>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand All @@ -16,48 +15,8 @@
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Debug_6_0_8' ">
<OutputPath>bin\Debug\6.0.8</OutputPath>
<NdapiFormsVersion>6.0.8</NdapiFormsVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release_6_0_8' ">
<OutputPath>bin\Release\6.0.8</OutputPath>
<Optimize>true</Optimize>
<NdapiFormsVersion>6.0.8</NdapiFormsVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Debug_12_2_1_3' ">
<OutputPath>bin\Debug\12.2.1.3</OutputPath>
<NdapiFormsVersion>12.2.1.3</NdapiFormsVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release_12_2_1_3' ">
<OutputPath>bin\Release\12.2.1.3</OutputPath>
<Optimize>true</Optimize>
<NdapiFormsVersion>12.2.1.3</NdapiFormsVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(NdapiFormsVersion)' == '6.0.8' ">
<DefineConstants>FORMS_608;FORMS_6;FORMS_6_OR_GREATER</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(NdapiFormsVersion)' == '12.2.1.3' ">
<DefineConstants>FORMS_12213;FORMS_12;FORMS_12_OR_GREATER</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<IncludeBuildOutput>false</IncludeBuildOutput>
</PropertyGroup>

<ItemGroup>
<None Include="..\README.md" Pack="true" PackagePath="\"/>
</ItemGroup>

<ItemGroup Condition=" '$(Configuration)' == 'Release' ">
<None Include="bin\Release\6.0.8\net8.0\Ndapi.dll" Pack="true" PackagePath="build\6.0.8\net8.0\Ndapi.dll"/>
<None Include="bin\Release\12.2.1.3\net8.0\Ndapi.dll" Pack="true" PackagePath="build\12.2.1.3\net8.0\Ndapi.dll"/>
<Content Include="Ndapi.targets" Pack="true" PackagePath="build\Ndapi.targets"/>
</ItemGroup>

</Project>
19 changes: 0 additions & 19 deletions Ndapi/Ndapi.targets

This file was deleted.

Expand Up @@ -2,9 +2,8 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Platforms>x64;x86</Platforms>
<Platforms>x64</Platforms>
<OutputType>Exe</OutputType>
<Configurations>Debug;Release;Debug_12_2_1_3;Debug_6_0_8;Release_12_2_1_3;Release_6_0_8</Configurations>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
14 changes: 14 additions & 0 deletions samples/CreateModuleDemo/CreateModuleDemo.x86.csproj
@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Platforms>x86</Platforms>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\Ndapi\Ndapi.csproj" />
<TrimmerRootAssembly Include="Ndapi" />
</ItemGroup>
</Project>

0 comments on commit 0207e25

Please sign in to comment.