Skip to content

Commit

Permalink
Merge branch 'main' of github.com:AwineshKumar/Laerdal.Dfu into suppo…
Browse files Browse the repository at this point in the history
…rt-android-14-api34
  • Loading branch information
AwineshKumar committed Sep 13, 2024
2 parents b8a2c04 + aed344d commit 9409165
Show file tree
Hide file tree
Showing 7 changed files with 429 additions and 113 deletions.
44 changes: 29 additions & 15 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ env:
SCL_NUGET_ORG_FEED_API_KEY: ${{ secrets.NUGET_ORG_FEED_API_KEY }}
SCL_GITHUB_NUGET_FEED_USERNAME: ${{ secrets.SCL_GITHUB_NUGET_FEED_USERNAME }}

SCL_DEPENDENCY_TRACKER_API_KEY: ${{ secrets.SCL_DEPENDENCY_TRACKER_API_KEY }}
SCL_DEPENDENCY_TRACKER_SERVER_URL: ${{ secrets.SCL_DEPENDENCY_TRACKER_SERVER_URL }}
SCL_DEPENDENCY_TRACKER_SIGNING_PRIVATE_KEY: ${{ secrets.SCL_DEPENDENCY_TRACKER_SIGNING_PRIVATE_KEY }}


on:
workflow_call: # so that other workflows can trigger this
Expand All @@ -30,7 +34,7 @@ on:
branches:
- '**' # '*' matches zero or more characters but does not match the `/` character '**' matches zero or more of any character

pull_request:
pull_request: # we need to build on pull requests so that we can generate and upload the sbom before merging onto main/develop branches
branches:
- '**'

Expand All @@ -39,7 +43,7 @@ jobs:

build:

runs-on: 'windows-2022'
runs-on: 'macos-14'
timeout-minutes: 20

steps:
Expand All @@ -57,8 +61,8 @@ jobs:
&& \
"${{env.BUILD_REPOSITORY_FOLDERPATH}}/Laerdal.Scripts/Laerdal.SetupBuildEnvironment.sh" \
"https://nuget.pkg.github.com/Laerdal/index.json" \
"${{ env.SCL_GITHUB_NUGET_FEED_USERNAME }}" \
"${{ env.SCL_GITHUB_ACCESS_TOKEN }}" \
"${{ github.actor }}" \
"${{ github.token }}" \
"${{ env.BUILD_REPOSITORY_FOLDERPATH }}/Artifacts"
# we need to manually install java11 because it is needed by the latest windows vm-images that run on
Expand All @@ -73,16 +77,26 @@ jobs:
- name: '🏗 📦 Build, Pack & Announce New Release (if appropriate)'
shell: 'bash'
run: |
cd "${{env.BUILD_REPOSITORY_FOLDERPATH}}/Laerdal.Scripts" \
&& \
dotnet \
msbuild \
"Laerdal.Builder.targets" \
\
-p:PackageOutputPath="${{ env.BUILD_REPOSITORY_FOLDERPATH }}/Artifacts" \
-p:Laerdal_Source_Branch="${{ env.LAERDAL_SOURCE_BRANCH }}" \
-p:Laerdal_Repository_Path="${{ env.LAERDAL_REPOSITORY_PATH }}" \
-p:Laerdal_Github_Access_Token="${{ env.SCL_GITHUB_ACCESS_TOKEN }}"
cd "${{env.BUILD_REPOSITORY_FOLDERPATH}}/Laerdal.Scripts" \
&& \
echo "${{env.SCL_DEPENDENCY_TRACKER_API_KEY}}" > "./dependency_tracker_api_key.ppk" \
&& \
echo "${{env.SCL_DEPENDENCY_TRACKER_SIGNING_PRIVATE_KEY}}" > "./dependency_tracker_private_signing_key.ppk" \
&& \
dotnet \
msbuild \
"Laerdal.Builder.targets" \
\
-p:PackageOutputPath="${{ env.BUILD_REPOSITORY_FOLDERPATH }}/Artifacts" \
-p:Laerdal_Source_Branch="${{ env.LAERDAL_SOURCE_BRANCH }}" \
-p:Laerdal_Repository_Path="${{ env.LAERDAL_REPOSITORY_PATH }}" \
-p:Laerdal_Github_Access_Token="${{ env.SCL_GITHUB_ACCESS_TOKEN }}" \
\
-p:Laerdal_Dependency_Tracker_Server_Url="${{ env.SCL_DEPENDENCY_TRACKER_SERVER_URL }}" \
-p:Laerdal_Dependency_Tracker_Api_Key_File_Path="${{ env.BUILD_REPOSITORY_FOLDERPATH }}/Laerdal.Scripts/dependency_tracker_api_key.ppk" \
-p:Laerdal_Dependency_Tracker_Private_Signing_Key_File_Path="${{ env.BUILD_REPOSITORY_FOLDERPATH }}/Laerdal.Scripts/dependency_tracker_private_signing_key.ppk" \
&& \
rm "./dependency_tracker_private_signing_key.ppk" "./dependency_tracker_api_key.ppk"
- name: '⬆️ Upload Artifacts' # to share with other workflows https://stackoverflow.com/a/77663335/863651
uses: 'actions/upload-artifact@v4'
Expand All @@ -93,7 +107,7 @@ jobs:

- name: '🚀 Publish to the Laerdal Nuget Server on Github' # https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-nuget-registry
shell: 'bash'
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/ksidirop/MAN-335-ios-runtime-error-fix-about-you-should-not-call-this-method'
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'
run: |
cd "${{env.BUILD_REPOSITORY_FOLDERPATH}}/Artifacts/" \
&& \
Expand Down
21 changes: 4 additions & 17 deletions Laerdal.Dfu/Laerdal.Dfu.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

<PropertyGroup>
<!-- todo add support for maccatalyst -->
<TargetFrameworks>net8.0-ios;net8.0-android;netstandard2.1;</TargetFrameworks>
<TargetFrameworks>net8.0-ios;net8.0-android</TargetFrameworks>

<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>

<LangVersion>11.0</LangVersion>

<TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>

<SupportedOSPlatformVersion Condition=" '$(TargetPlatformIdentifier)' == 'ios' ">14.2</SupportedOSPlatformVersion>
Expand All @@ -29,23 +29,10 @@
<Laerdal_Version_Minor Condition=" '$(Laerdal_Version_Minor)' == '' ">27</Laerdal_Version_Minor>
<Laerdal_Version_Build Condition=" '$(Laerdal_Version_Build)' == '' ">0</Laerdal_Version_Build>

<Laerdal_Version Condition=" '$(Laerdal_Version)' == '' ">$(Laerdal_Version_Major).$(Laerdal_Version_Minor).$(Laerdal_Version_Build)</Laerdal_Version>
<Laerdal_Version_Full Condition=" '$(Laerdal_Version_Full)' == '' ">$(Laerdal_Version_Major).$(Laerdal_Version_Minor).$(Laerdal_Version_Build)</Laerdal_Version_Full>
</PropertyGroup>
<!-- ============================ VERSION ============================ -->


<!-- ==================== NETSTANDARD PlACEHOLDER ==================== -->
<ItemGroup Condition=" '$(TargetFramework.StartsWith(netstandard))' == 'true' ">
<Compile Remove="Platforms\**\**">
</Compile>
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework.StartsWith(netstandard))' != 'true' ">
<Compile Remove="Platforms.NetStandard\**">
</Compile>
</ItemGroup>
<!-- ==================== NETSTANDARD PlACEHOLDER ==================== -->

<Import Project="Laerdal.targets"/>

<!-- =========================== PACKAGES ============================ -->
Expand Down
33 changes: 27 additions & 6 deletions Laerdal.Dfu/Laerdal.targets
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,35 @@
<Message Importance="High" Text="Version: $(Version)" />
</Target>

<!-- ==================== MAUI for .NET8 changes ==================== -->
<ItemGroup>
<!-- Warning MA002 : Starting with .NET 8, setting <UseMaui>true</UseMaui> does not automatically include NuGet package references in your project.
Update your project by including this item: <PackageReference Include="Microsoft.Maui.Controls" Version="8.0.21" />.
You can skip this warning by setting <SkipValidateMauiImplicitPackageReferences>true</SkipValidateMauiImplicitPackageReferences> in your project file. -->
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)"/>
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)"/>
<!-- Warning MA002 : Starting with .NET 8, setting <UseMauiEssentials>true</UseMauiEssentials> does not automatically include NuGet package references in your project.
Update your project by including this item: <PackageReference Include="Microsoft.Maui.Essentials" Version="8.0.21" />.
You can skip this warning by setting <SkipValidateMauiImplicitPackageReferences>true</SkipValidateMauiImplicitPackageReferences> in your project file.
<PackageReference Include="Microsoft.Maui.Essentials" Version="8.0.21" />-->
</ItemGroup>

<PropertyGroup>
<UseMaui>true</UseMaui>
<SkipValidateMauiImplicitPackageReferences>true</SkipValidateMauiImplicitPackageReferences>
</PropertyGroup>

<!-- ==================== VERSION ==================== -->
<PropertyGroup>
<Laerdal_Version Condition="'$(Laerdal_Version)' == ''">1.0.0-local.0</Laerdal_Version>
<Laerdal_Version_Full Condition=" '$(Laerdal_Version_Full)' == '' ">1.0.0</Laerdal_Version_Full>
<Laerdal_Version_Assembly Condition=" '$(Laerdal_Version_Assembly)' == '' ">$(Laerdal_Version_Full).0</Laerdal_Version_Assembly>

<!-- Apply Version parts according to packaging standards -->
<AssemblyVersion>$(Laerdal_Version)</AssemblyVersion>
<AssemblyFileVersion>$(Laerdal_Version)</AssemblyFileVersion>
<AssemblyInformationalVersion>$(Laerdal_Version)</AssemblyInformationalVersion>
<Version>$(Laerdal_Version)</Version>
<PackageVersion>$(Laerdal_Version)</PackageVersion>
<Version>$(Laerdal_Version_Full)</Version>
<PackageVersion>$(Laerdal_Version_Full)</PackageVersion>

<AssemblyVersion>$(Laerdal_Version_Full)</AssemblyVersion>
<AssemblyFileVersion>$(Laerdal_Version_Full)</AssemblyFileVersion>
<AssemblyInformationalVersion>$(Laerdal_Version_Full)</AssemblyInformationalVersion>
</PropertyGroup>
</Project>
15 changes: 0 additions & 15 deletions Laerdal.Dfu/Platforms.NetStandard/DfuInstallation.cs

This file was deleted.

Loading

0 comments on commit 9409165

Please sign in to comment.