mirror of
https://github.com/bitwarden/mobile
synced 2025-01-03 12:29:51 +01:00
[PM-13356] Fix iOS build by pinning dotnet and MAUI version (#3410)
* Pinning MauiVersion hardcoded to 8.0.7 to avoid using the MauiVersion variable. Also pinning .NET version to use to 8.0.7 so it's the same one as the latest public release. * Pinned dotnet version to 8.0.303 which was the latest one of the latest public release * Added global json to pin .NET version to use and added diagnostic logs on dotnet publish, also commented other workflows. * Set TargetPlatformVersion in Directory Build props * test moving global.json * Check out the repo first so global.json is available * Remove workloadVersion from global.json * pin maui install version * Try workload restore * Adding workload restore * Use ios workload instead * Set specific MAUI workload to install to 8.0.402 * Fix MAUI workload install to 8.0.300 * Add step to remove dotnet * Update sdk / maui to 8.0.402 * Bumped xcode to 15.4 * Revert build.yml comments * Revert csproj and build.props * Remove diag flag * Android / F-droid: Install pinned version of maui workload instead of latest * Android / F-Droid: checkout repo earlier in the build process so global.json is used --------- Co-authored-by: Federico Maccaroni <fedemkr@gmail.com>
This commit is contained in:
parent
53a5a9caaa
commit
e1f3f3dfd9
50
.github/workflows/build.yml
vendored
50
.github/workflows/build.yml
vendored
@ -14,6 +14,8 @@ env:
|
|||||||
main_app_folder_path: src/App
|
main_app_folder_path: src/App
|
||||||
main_app_project_path: src/App/App.csproj
|
main_app_project_path: src/App/App.csproj
|
||||||
target-net-version: net8.0
|
target-net-version: net8.0
|
||||||
|
dotnet-version: '8.0.402'
|
||||||
|
maui-workload-version: '8.0.402'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
cloc:
|
cloc:
|
||||||
@ -72,6 +74,11 @@ jobs:
|
|||||||
android_folder_path: src\App\Platforms\Android
|
android_folder_path: src\App\Platforms\Android
|
||||||
android_folder_path_bash: src/App/Platforms/Android
|
android_folder_path_bash: src/App/Platforms/Android
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup NuGet
|
- name: Setup NuGet
|
||||||
uses: nuget/setup-nuget@a21f25cd3998bf370fde17e3f1b4c12c175172f9 # v2.0.0
|
uses: nuget/setup-nuget@a21f25cd3998bf370fde17e3f1b4c12c175172f9 # v2.0.0
|
||||||
with:
|
with:
|
||||||
@ -80,7 +87,11 @@ jobs:
|
|||||||
- name: Set up .NET
|
- name: Set up .NET
|
||||||
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4.0.1
|
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4.0.1
|
||||||
with:
|
with:
|
||||||
dotnet-version: '8.0.x'
|
dotnet-version: ${{ env.dotnet-version }}
|
||||||
|
|
||||||
|
- name: Install MAUI Workload
|
||||||
|
run: |
|
||||||
|
dotnet workload install maui --version ${{ env.maui-workload-version }}
|
||||||
|
|
||||||
- name: Set up MSBuild
|
- name: Set up MSBuild
|
||||||
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
|
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
|
||||||
@ -103,11 +114,6 @@ jobs:
|
|||||||
echo "GitHub ref: $GITHUB_REF"
|
echo "GitHub ref: $GITHUB_REF"
|
||||||
echo "GitHub event: $GITHUB_EVENT"
|
echo "GitHub event: $GITHUB_EVENT"
|
||||||
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Login to Azure - CI Subscription
|
- name: Login to Azure - CI Subscription
|
||||||
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
|
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
|
||||||
with:
|
with:
|
||||||
@ -294,6 +300,11 @@ jobs:
|
|||||||
android_folder_path_bash: src/App/Platforms/Android
|
android_folder_path_bash: src/App/Platforms/Android
|
||||||
android_manifest_path: src/App/Platforms/Android/AndroidManifest.xml
|
android_manifest_path: src/App/Platforms/Android/AndroidManifest.xml
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup NuGet
|
- name: Setup NuGet
|
||||||
uses: nuget/setup-nuget@a21f25cd3998bf370fde17e3f1b4c12c175172f9 # v2.0.0
|
uses: nuget/setup-nuget@a21f25cd3998bf370fde17e3f1b4c12c175172f9 # v2.0.0
|
||||||
with:
|
with:
|
||||||
@ -302,7 +313,11 @@ jobs:
|
|||||||
- name: Set up .NET
|
- name: Set up .NET
|
||||||
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4.0.1
|
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4.0.1
|
||||||
with:
|
with:
|
||||||
dotnet-version: '8.0.x'
|
dotnet-version: ${{ env.dotnet-version }}
|
||||||
|
|
||||||
|
- name: Install MAUI Workload
|
||||||
|
run: |
|
||||||
|
dotnet workload install maui --version ${{ env.maui-workload-version }}
|
||||||
|
|
||||||
- name: Set up MSBuild
|
- name: Set up MSBuild
|
||||||
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
|
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
|
||||||
@ -324,9 +339,6 @@ jobs:
|
|||||||
echo "GitHub ref: $GITHUB_REF"
|
echo "GitHub ref: $GITHUB_REF"
|
||||||
echo "GitHub event: $GITHUB_EVENT"
|
echo "GitHub event: $GITHUB_EVENT"
|
||||||
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
||||||
|
|
||||||
- name: Login to Azure - CI Subscription
|
- name: Login to Azure - CI Subscription
|
||||||
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
|
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
|
||||||
with:
|
with:
|
||||||
@ -432,10 +444,15 @@ jobs:
|
|||||||
app_output_name: App
|
app_output_name: App
|
||||||
app_ci_output_filename: App_x64_Debug
|
app_ci_output_filename: App_x64_Debug
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||||
|
with:
|
||||||
|
submodules: 'true'
|
||||||
|
|
||||||
- name: Set XCode version
|
- name: Set XCode version
|
||||||
uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
|
uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
|
||||||
with:
|
with:
|
||||||
xcode-version: 15.1
|
xcode-version: 15.4
|
||||||
|
|
||||||
- name: Setup NuGet
|
- name: Setup NuGet
|
||||||
uses: nuget/setup-nuget@a21f25cd3998bf370fde17e3f1b4c12c175172f9 # v2.0.0
|
uses: nuget/setup-nuget@a21f25cd3998bf370fde17e3f1b4c12c175172f9 # v2.0.0
|
||||||
@ -445,12 +462,10 @@ jobs:
|
|||||||
- name: Set up .NET
|
- name: Set up .NET
|
||||||
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4.0.1
|
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4.0.1
|
||||||
with:
|
with:
|
||||||
dotnet-version: '8.0.x'
|
dotnet-version: ${{ env.dotnet-version }}
|
||||||
|
|
||||||
# This step might be obsolete at some point as .NET MAUI workloads
|
|
||||||
# are starting to come pre-installed on the GH Actions build agents.
|
|
||||||
- name: Install MAUI Workload
|
- name: Install MAUI Workload
|
||||||
run: dotnet workload install maui --ignore-failed-sources
|
run: dotnet workload install maui --version ${{ env.maui-workload-version }}
|
||||||
|
|
||||||
- name: Print environment
|
- name: Print environment
|
||||||
run: |
|
run: |
|
||||||
@ -459,11 +474,6 @@ jobs:
|
|||||||
echo "GitHub ref: $GITHUB_REF"
|
echo "GitHub ref: $GITHUB_REF"
|
||||||
echo "GitHub event: $GITHUB_EVENT"
|
echo "GitHub event: $GITHUB_EVENT"
|
||||||
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
||||||
with:
|
|
||||||
submodules: 'true'
|
|
||||||
|
|
||||||
- name: Login to Azure - CI Subscription
|
- name: Login to Azure - CI Subscription
|
||||||
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
|
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
|
||||||
with:
|
with:
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
<IncludeBitwardeniOSExtensions>True</IncludeBitwardeniOSExtensions>
|
<IncludeBitwardeniOSExtensions>True</IncludeBitwardeniOSExtensions>
|
||||||
<IncludeBitwardenWatchOSApp>True</IncludeBitwardenWatchOSApp>
|
<IncludeBitwardenWatchOSApp>True</IncludeBitwardenWatchOSApp>
|
||||||
<Argon2IdLoadMtouchExtraArgs>-gcc_flags "-L$(ProjectDir)../../lib/ios -largon2 -force_load $(ProjectDir)../../lib/ios/libargon2.a"</Argon2IdLoadMtouchExtraArgs>
|
<Argon2IdLoadMtouchExtraArgs>-gcc_flags "-L$(ProjectDir)../../lib/ios -largon2 -force_load $(ProjectDir)../../lib/ios/libargon2.a"</Argon2IdLoadMtouchExtraArgs>
|
||||||
|
|
||||||
<!-- Uncomment this when Unit Testing-->
|
<!-- Uncomment this when Unit Testing-->
|
||||||
<!-- <CustomConstants>UT</CustomConstants> -->
|
<!-- <CustomConstants>UT</CustomConstants> -->
|
||||||
|
|
||||||
|
6
global.json
Normal file
6
global.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"sdk": {
|
||||||
|
"version": "8.0.402",
|
||||||
|
"rollForward": "disable"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user