Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/copilot-setup-steps.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -81,7 +81,7 @@ jobs:
id: android-build
continue-on-error: true
run: |
make jenkins PREPARE_CI=1 PREPARE_AUTOPROVISION=1 CONFIGURATION=Debug
make jenkins PREPARE_CI=1 CONFIGURATION=Debug
timeout-minutes: 60

- name: Log disk space (after android build)
Expand Down
2 changes: 0 additions & 2 deletions Configuration.props
Original file line numberDiff line numberDiff line change
Expand Up@@ -56,8 +56,6 @@
</PropertyGroup>
<PropertyGroup>
<MicrosoftAndroidPacksRootDir>$(BuildOutputDirectory)lib\packs\</MicrosoftAndroidPacksRootDir>
<AutoProvision Condition=" '$(AutoProvision)' == '' ">False</AutoProvision>
<AutoProvisionUsesSudo Condition=" '$(AutoProvisionUsesSudo)' == '' ">False</AutoProvisionUsesSudo>
<_XABinRelativeInstallPrefix>lib\xamarin.android</_XABinRelativeInstallPrefix>
<XAInstallPrefix Condition=" '$(XAInstallPrefix)' == '' ">$(MSBuildThisFileDirectory)bin\$(Configuration)\$(_XABinRelativeInstallPrefix)\</XAInstallPrefix>
<_MonoAndroidNETOutputRoot>$(XAInstallPrefix)xbuild-frameworks\Microsoft.Android\</_MonoAndroidNETOutputRoot>
Expand Down
5 changes: 0 additions & 5 deletions Documentation/building/configuration.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,11 +29,6 @@ and will override any default values specified in `Configuration.props`.

Overridable MSBuild properties include:

* `$(AutoProvision)`: Automatically install required dependencies, if possible.
Only supported on macOS and certain Linux distros.

* `$(AutoProvisionUsesSudo)`: Use `sudo` when installing dependencies.

* `$(AndroidApiLevel)`: The Android API level to bind in `src/Mono.Android`.
This is an integer value, e.g. `15` for
[API-15 (Android 4.0.3)](http://developer.android.com/about/versions/android-4.0.3.html).
Expand Down
18 changes: 8 additions & 10 deletions Documentation/building/unix/dependencies.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,19 +15,17 @@ Building .NET for Android requires:
[dotnetsdk]: https://docs.microsoft.com/de-de/dotnet/core/install/sdk

The `make prepare` build step (or `/t:Prepare` on Windows) will
check that all required dependencies are present.
If you would like `make prepare` to automatically install
required dependencies, set the `$(AutoProvision)` MSBuild property to True
and (if necessary) set the `$(AutoProvisionUsesSudo)` property to True.
(This is not supported on all operating systems;
see [configuration.md](../configuration.md) for details.)

If `$(AutoProvision)` is False (the default) and a dependency is missing,
then the build will fail and an error message will be displayed attempting
to provide install instructions to obtain the missing dependency, e.g.:
check that all required dependencies are present. If a dependency is
missing, the build will fail and an error message will be displayed
attempting to provide install instructions to obtain the missing
dependency, e.g.:

error : Could not find required program '7za'. Please run: brew install 'p7zip'.

Install any missing dependencies using your platform's package manager
(e.g. `brew install p7zip` on macOS, `sudo apt-get install p7zip-full`
on Debian/Ubuntu).

<a name="homebrew" />

## Homebrew
Expand Down
11 changes: 0 additions & 11 deletions Makefile
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,6 @@ PREPARE_MSBUILD_FLAGS = $(PREPARE_MSBUILD_ARGS) $(MSBUILD_ARGS)
PREPARE_SCENARIO =
PREPARE_CI_PR ?= 0
PREPARE_CI ?= 0
PREPARE_AUTOPROVISION ?= 0
LOCALIZE_TEMPLATES ?= 0

_PREPARE_CI_MODE_PR_ARGS = --no-emoji --run-mode=CI
Expand All@@ -31,12 +30,6 @@ ifeq ($(OS_ARCH),)
export OS_ARCH := $(shell uname -m)
endif

export NO_SUDO ?= false

ifneq ($(NO_SUDO),false)
_PREPARE_ARGS += --auto-provisioning-uses-sudo=false
endif

ifneq ($(V),0)
MONO_OPTIONS += --debug
NUGET_VERBOSITY = -Verbosity Detailed
Expand All@@ -51,10 +44,6 @@ ifneq ($(PREPARE_CI),0)
_PREPARE_ARGS += $(_PREPARE_CI_MODE_ARGS)
endif

ifneq ($(PREPARE_AUTOPROVISION),0)
_PREPARE_ARGS += --auto-provision=yes --auto-provision-uses-sudo=yes
endif

ifneq ($(PREPARE_SCENARIO),)
_PREPARE_ARGS += -s:"$(PREPARE_SCENARIO)"
endif
Expand Down
2 changes: 1 addition & 1 deletion build-tools/automation/azure-pipelines-apidocs.yaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -136,7 +136,7 @@ extends:
- script: boots https://download.mono-project.com/archive/6.12.0/macos-10-universal/MonoFramework-MDK-6.12.0.188.macos10.xamarin.universal.pkg
displayName: Install Mono

- script: make prepare CONFIGURATION=$(XA.Build.Configuration) PREPARE_CI=1 PREPARE_AUTOPROVISION=1
- script: make prepare CONFIGURATION=$(XA.Build.Configuration) PREPARE_CI=1
workingDirectory: $(Build.SourcesDirectory)
displayName: make prepare

Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,6 +11,13 @@ parameters:
steps:
- template: /build-tools/automation/yaml-templates/log-disk-space.yaml

- ${{ if ne(parameters.use1ESTemplate, true) }}:
- bash: |
set -e
sudo apt-get update
sudo apt-get install -y p7zip-full cmake ninja-build ccache
displayName: Install build dependencies on Linux

- template: /build-tools/automation/yaml-templates/setup-jdk-variables.yaml
parameters:
useAgentJdkPath: false
Expand All@@ -35,7 +42,7 @@ steps:
parameters:
xaSourcePath: ${{ parameters.xaSourcePath }}

- script: make jenkins PREPARE_CI=1 PREPARE_AUTOPROVISION=1 CONFIGURATION=$(XA.Build.Configuration) MSBUILD_ARGS='${{ parameters.makeMSBuildArgs }}'
- script: make jenkins PREPARE_CI=1 CONFIGURATION=$(XA.Build.Configuration) MSBUILD_ARGS='${{ parameters.makeMSBuildArgs }}'
workingDirectory: ${{ parameters.xaSourcePath }}
displayName: make jenkins
retryCountOnTaskFailure: 1
Expand Down
6 changes: 3 additions & 3 deletions build-tools/automation/yaml-templates/build-macos-steps.yaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,8 +17,8 @@ steps:
- ${{ if ne(parameters.use1ESTemplate, true) }}:
- bash: |
set -e
brew install p7zip
displayName: Install p7zip on macOS
brew install p7zip cmake ninja ccache
displayName: Install build dependencies on macOS

- template: /build-tools/automation/yaml-templates/setup-jdk-variables.yaml
parameters:
Expand All@@ -45,7 +45,7 @@ steps:
xaSourcePath: ${{ parameters.xaSourcePath }}

# Prepare and Build everything
- script: make jenkins CONFIGURATION=$(XA.Build.Configuration) PREPARE_CI=1 PREPARE_AUTOPROVISION=1 MSBUILD_ARGS='${{ parameters.makeMSBuildArgs }}'
- script: make jenkins CONFIGURATION=$(XA.Build.Configuration) PREPARE_CI=1 MSBUILD_ARGS='${{ parameters.makeMSBuildArgs }}'
workingDirectory: ${{ parameters.xaSourcePath }}
displayName: make jenkins
retryCountOnTaskFailure: 1
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -36,7 +36,7 @@ steps:
retryCountOnTaskFailure: 1
inputs:
projects: Xamarin.Android.sln
arguments: '-c $(XA.Build.Configuration) -t:Prepare --no-restore -p:AutoProvision=true -bl:$(System.DefaultWorkingDirectory)\bin\Build$(XA.Build.Configuration)\dotnet-build-prepare.binlog'
arguments: '-c $(XA.Build.Configuration) -t:Prepare --no-restore -bl:$(System.DefaultWorkingDirectory)\bin\Build$(XA.Build.Configuration)\dotnet-build-prepare.binlog'

# Build Xamarin.Android and configure local workloads to test improved local build loop
- template: /build-tools/automation/yaml-templates/run-dotnet-preview.yaml
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -31,7 +31,7 @@ steps:
condition: and(succeeded(), eq(variables['Codeql.Enabled'], 'true'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))

# Prepare and Build everything
- script: make jenkins CONFIGURATION=$(XA.Build.Configuration) PREPARE_CI=1 PREPARE_AUTOPROVISION=1 MSBUILD_ARGS='${{ parameters.makeMSBuildArgs }}'
- script: make jenkins CONFIGURATION=$(XA.Build.Configuration) PREPARE_CI=1 MSBUILD_ARGS='${{ parameters.makeMSBuildArgs }}'
workingDirectory: ${{ parameters.xaSourcePath }}
displayName: make jenkins

Expand Down
4 changes: 0 additions & 4 deletions build-tools/xaprepare/README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -150,10 +150,6 @@ You can append the following parameters to the command line:
All and any command line parameters accepted by the utility
- `PREPARE_SCENARIO=""`
Name of the "scenario" to run
- `PREPARE_AUTOPROVISION=0|1`
If set to `0` (the default), the utility will take notice of missing/outdated software the build depends on and exit with an error
should any such condition is detected. Setting the property to `1` will let the utility install the software (installation **may**
use `sudo` on Unix so you will need administrator/root credentials for it to work)
- `V=1`
Causes the run to output much more information (making output much more messy in the process) to the console. Normally this additional
information is placed only in the log files generated by the utility.
Expand Down
10 changes: 0 additions & 10 deletions build-tools/xaprepare/xaprepare/Application/Context.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -126,16 +126,6 @@ partial class Context : AppObject
/// </summary>
public bool NoEmoji { get; set; } = !Configurables.Defaults.UseEmoji;

/// <summary>
/// Automatically provision all the missing programs
/// </summary>
public bool AutoProvision { get; set; }

/// <summary>
/// If a program being provisioned automatically requires administrative rights to install, use sudo
/// </summary>
public bool AutoProvisionUsesSudo { get; set; }

/// <summary>
/// Current session execution mode. See <see cref="t:ExecutionMode" />
/// </summary>
Expand Down
Loading