Skip to content

Commit

Permalink
Merge pull request #62
Browse files Browse the repository at this point in the history
[MAN-440] Upgrade nordic native libs
  • Loading branch information
ksidirop-laerdal authored Nov 12, 2024
2 parents 41d3b00 + b865904 commit 40acd0b
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 21 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ env:
SCL_DEPENDENCY_TRACKER_SERVER_URL: ${{ secrets.SCL_DEPENDENCY_TRACKER_SERVER_URL }}
SCL_DEPENDENCY_TRACKER_SIGNING_PRIVATE_KEY: ${{ secrets.SCL_DEPENDENCY_TRACKER_SIGNING_PRIVATE_KEY }}

DOTNET_TARGET_WORKLOAD_VERSION: "8.0.402" # dont upgrade this lightheartedly the workload snapshot implicitly defines which versions of Android/iOS/MacCatalyst SDKs are supported


on:
workflow_call: # so that other workflows can trigger this
Expand Down Expand Up @@ -60,6 +62,7 @@ jobs:
chmod +x "${{env.BUILD_REPOSITORY_FOLDERPATH}}/Laerdal.Scripts/Laerdal.SetupBuildEnvironment.sh" \
&& \
"${{env.BUILD_REPOSITORY_FOLDERPATH}}/Laerdal.Scripts/Laerdal.SetupBuildEnvironment.sh" \
"${{env.DOTNET_TARGET_WORKLOAD_VERSION}}" \
"https://nuget.pkg.github.com/Laerdal/index.json" \
"${{ github.actor }}" \
"${{ github.token }}" \
Expand Down
11 changes: 5 additions & 6 deletions Laerdal.Dfu/Laerdal.Dfu.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<SupportedOSPlatformVersion Condition=" '$(IsForAndroid)' == 'true' ">21.0</SupportedOSPlatformVersion>

<!-- ios you will need specific workloads though dotnet workload install maui -/-version 8.0.402 -->
<TargetPlatformVersion Condition=" '$(IsForIOS)' == 'true' ">17.5</TargetPlatformVersion>
<TargetPlatformVersion Condition=" '$(IsForIOS)' == 'true' ">17.0</TargetPlatformVersion>
<TargetPlatformMinVersion Condition=" '$(IsForIOS)' == 'true' ">14.2</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition=" '$(IsForIOS)' == 'true' ">14.2</SupportedOSPlatformVersion>
</PropertyGroup>
Expand Down Expand Up @@ -82,12 +82,11 @@
<Import Project="Laerdal.targets"/>

<!-- =========================== PACKAGES ============================ -->
<ItemGroup Condition=" '$(IsForAndroid)' == 'true' ">
<PackageReference Include="Laerdal.Dfu.Bindings.Android" Version="2.5.0.43891"/>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0-android'">
<PackageReference Include="Laerdal.Dfu.Bindings.Android" Version="2.7.0.43895" />
</ItemGroup>

<ItemGroup Condition=" '$(IsForIOS)' == 'true' ">
<PackageReference Include="Laerdal.Dfu.Bindings.iOS" Version="4.13.0.43933"/>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0-ios'">
<PackageReference Include="Laerdal.Dfu.Bindings.iOS" Version="4.15.3.43947" />
</ItemGroup>
<!-- =========================== PACKAGES ============================ -->

Expand Down
34 changes: 19 additions & 15 deletions Laerdal.Scripts/Laerdal.SetupBuildEnvironment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,37 @@

# windows-2022 vmimages in azure have dotnet 8.0.100 preinstalled so we should be fine

declare -r DOTNET_TARGET_WORKLOAD_VERSION="$1"

declare -r NUGET_FEED_URL="$1"
declare -r NUGET_FEED_USERNAME="$2"
declare -r NUGET_FEED_ACCESSTOKEN="$3"
declare -r NUGET_FEED_URL="$2"
declare -r NUGET_FEED_USERNAME="$3"
declare -r NUGET_FEED_ACCESSTOKEN="$4"

declare -r ARTIFACTS_FOLDER_PATH="$4"
declare -r ARTIFACTS_FOLDER_PATH="$5"

if [ -z "${DOTNET_TARGET_WORKLOAD_VERSION}" ]; then
echo "##vso[task.logissue type=error]Missing 'DOTNET_TARGET_WORKLOAD_VERSION' which was expected to be parameter #1."
exit 1
fi

if [ -z "${NUGET_FEED_URL}" ]; then
echo "##vso[task.logissue type=error]Missing 'NUGET_FEED_URL' which was expected to be parameter #1."
exit 3
echo "##vso[task.logissue type=error]Missing 'NUGET_FEED_URL' which was expected to be parameter #2."
exit 2
fi

if [ -z "${NUGET_FEED_USERNAME}" ]; then
echo "##vso[task.logissue type=error]Missing 'NUGET_FEED_USERNAME' which was expected to be parameter #2."
exit 5
echo "##vso[task.logissue type=error]Missing 'NUGET_FEED_USERNAME' which was expected to be parameter #3."
exit 3
fi

if [ -z "${NUGET_FEED_ACCESSTOKEN}" ]; then
echo "##vso[task.logissue type=error]Missing 'NUGET_FEED_ACCESSTOKEN' which was expected to be parameter #3."
exit 6
echo "##vso[task.logissue type=error]Missing 'NUGET_FEED_ACCESSTOKEN' which was expected to be parameter #4."
exit 4
fi

if [ -z "${ARTIFACTS_FOLDER_PATH}" ]; then
echo "##vso[task.logissue type=error]Missing 'ARTIFACTS_FOLDER_PATH' which was expected to be parameter #4."
exit 7
echo "##vso[task.logissue type=error]Missing 'ARTIFACTS_FOLDER_PATH' which was expected to be parameter #5."
exit 5
fi


Expand Down Expand Up @@ -64,16 +70,14 @@ if [ $exitCode != 0 ]; then
exit 30
fi

# declare dotnet_8_workload_version="8.0.3"
dotnet \
workload \
install \
maui \
ios \
android \
maui-ios \
maui-android
# --from-rollback-file=https://maui.blob.core.windows.net/metadata/rollbacks/${dotnet_8_workload_version}.json # we need to install additional packages manually
maui-android --version "${DOTNET_TARGET_WORKLOAD_VERSION}"
declare exitCode=$?
if [ $exitCode != 0 ]; then
echo "##vso[task.logissue type=error]Failed to restore dotnet workloads."
Expand Down

0 comments on commit 40acd0b

Please sign in to comment.