Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[devops] Unify and simplify provisionator provisioning. #21268

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ tests/bcl-test/SystemCoreXunit*.csproj
tests/bcl-test/SystemXunit.csproj
global.json
.idea
device-tests-provisioning.csx
build-provisioning.csx
provision-xcode.csx
provision-shared.csx
mono_crash.*.json
*.binlog
.vscode
39 changes: 4 additions & 35 deletions tools/devops/Makefile
Original file line number Diff line number Diff line change
@@ -1,44 +1,13 @@
TOP=../..
include $(TOP)/Make.config

device-tests-provisioning.csx: device-tests-provisioning.csx.in Makefile $(TOP)/Make.config
$(Q_GEN) sed \
-e 's#@XCODE_XIP_NAME@#$(notdir $(XCODE_URL))#g' \
-e 's#@MONO_PACKAGE@#$(MIN_MONO_URL)#g' \
-e 's#@MIN_SHARPIE_URL@#$(MIN_SHARPIE_URL)#g' \
-e 's#@INCLUDE_MAC@#$(INCLUDE_MAC)#g' \
-e 's#@INCLUDE_IOS@#$(INCLUDE_IOS)#g' \
-e 's#@INCLUDE_TVOS@#$(INCLUDE_TVOS)#g' \
-e 's#@INCLUDE_WATCH@#$(INCLUDE_WATCH)#g' \
$< > $@;
@echo "Generated $@:"
@cat $@

build-provisioning.csx: build-provisioning.csx.in Makefile $(TOP)/Make.config
provision-shared.csx: provision-shared.in.csx Makefile $(TOP)/Make.config
$(Q_GEN) sed \
-e 's#@XCODE_XIP_NAME@#$(notdir $(XCODE_URL))#g' \
-e 's#@XCODE_ROOT_PATH@#$(XCODE_DEVELOPER_ROOT)#g' \
-e 's#@MONO_PACKAGE@#$(MIN_MONO_URL)#g' \
-e 's#@MIN_SHARPIE_URL@#$(MIN_SHARPIE_URL)#g' \
$< > $@;
@echo "Generated $@:"
@cat $@

mac-tests-provisioning.csx: mac-tests-provisioning.csx.in Makefile $(TOP)/Make.config
$(Q_GEN) sed \
-e 's#@MONO_PACKAGE@#$(MIN_MONO_URL)#g' \
-e 's#@INCLUDE_MAC@#$(INCLUDE_MAC)#g' \
-e 's#@INCLUDE_IOS@#$(INCLUDE_IOS)#g' \
$< > $@;
@echo "Generated $@:"
@cat $@

provision-xcode.csx: provision-xcode.csx.in Makefile $(TOP)/Make.config
$(Q_GEN) sed \
-e 's#@XCODE_XIP_NAME@#$(notdir $(XCODE_URL))#g' \
-e 's#@XCODE_ROOT_PATH@#$(XCODE_DEVELOPER_ROOT)#g' \
$< > $@;
@echo "Generated $@:"
@cat $@
$< > $@

LocProject.json: LocProject.json.in Makefile $(TOP)/Make.config
$(Q_GEN) sed \
Expand All @@ -65,4 +34,4 @@ print-variable:
print-variable-value-to-file:
@echo $($(VARIABLE)) > "$(FILE)"

provisioning: build-provisioning.csx device-tests-provisioning.csx provision-xcode.csx
provisioning: provision-shared.csx
12 changes: 1 addition & 11 deletions tools/devops/automation/templates/build/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,8 @@ steps:
MacDeveloper: $(mac-developer)
HostedMacKeychainPassword: ${{ parameters.keyringPass }}

- task: xamops.azdevex.provisionator-task.provisionator@2
displayName: 'Provision Brew components'
inputs:
provisioning_script: $(Build.SourcesDirectory)/xamarin-macios/tools/devops/provision-brew-packages.csx
provisioning_extra_args: '-vvvv'
github_token: ${{ parameters.gitHubToken }}
timeoutInMinutes: 30
enabled: true
continueOnError: true # brew installation can be temperamental, and things usually work even if the installation fail.

- bash: |
make -C $(Build.SourcesDirectory)/xamarin-macios/tools/devops build-provisioning.csx
make -C $(Build.SourcesDirectory)/xamarin-macios/tools/devops provisioning
displayName: 'Generate provisionator files.'

- task: xamops.azdevex.provisionator-task.provisionator@2
Expand Down
16 changes: 2 additions & 14 deletions tools/devops/automation/templates/tests/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ steps:
timeoutInMinutes: 5

- bash: |
make -C $(System.DefaultWorkingDirectory)/xamarin-macios/tools/devops/ device-tests-provisioning.csx
make -C $(System.DefaultWorkingDirectory)/xamarin-macios/tools/devops/ provisioning
displayName: 'Generate Provisionator csx file'

# Executed ONLY if we want to clear the provisionator cache.
Expand All @@ -234,19 +234,7 @@ steps:
- task: xamops.azdevex.provisionator-task.provisionator@2
displayName: 'Provision dependencies'
inputs:
provisioning_script: $(System.DefaultWorkingDirectory)/xamarin-macios/tools/devops/device-tests-provisioning.csx
provisioning_extra_args: '-vvvv'
github_token: ${{ parameters.gitHubToken }}
timeoutInMinutes: 250

- bash: |
make -C $(System.DefaultWorkingDirectory)/xamarin-macios/tools/devops/ mac-tests-provisioning.csx
displayName: 'Generate Provisionator csx file for macOS'

- task: xamops.azdevex.provisionator-task.provisionator@2
displayName: 'Provision Xamarin.Mac'
inputs:
provisioning_script: $(Build.SourcesDirectory)/xamarin-macios/tools/devops/mac-tests-provisioning.csx
provisioning_script: $(System.DefaultWorkingDirectory)/xamarin-macios/tools/devops/build-provisioning.csx
provisioning_extra_args: '-vvvv'
github_token: ${{ parameters.gitHubToken }}
timeoutInMinutes: 250
Expand Down
2 changes: 1 addition & 1 deletion tools/devops/automation/templates/windows/reserve-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ steps:
$vsts.Agents.SetEnabled($pool, $agent, $False)
displayName: "Disable macOS bot from pool"

- bash: make -C $(Build.SourcesDirectory)/xamarin-macios/tools/devops provision-xcode.csx
- bash: make -C $(Build.SourcesDirectory)/xamarin-macios/tools/devops provisioning
displayName: 'Generate Xcode provisioning csx file'

- task: xamops.azdevex.provisionator-task.provisionator@2
Expand Down
8 changes: 8 additions & 0 deletions tools/devops/build-provisioning.csx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#load "provision-shared.csx"

if (!ProvisionXcode ())
return 1;
ProvisionMono ();
ProvisionSharpie ();
ProvisionBrewPackages ();
SetDefaultXcodeInVSMac ();
38 changes: 0 additions & 38 deletions tools/devops/build-provisioning.csx.in

This file was deleted.

15 changes: 0 additions & 15 deletions tools/devops/device-tests-provisioning.csx.in

This file was deleted.

34 changes: 0 additions & 34 deletions tools/devops/mac-tests-provisioning.csx.in

This file was deleted.

12 changes: 3 additions & 9 deletions tools/devops/provision-brew-packages.csx
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
BrewPackages (
"shellcheck",
"yamllint",
"cmake",
"p7zip",
"msitools",
"wget",
"azure-cli"
);
#load "provision-shared.csx"

ProvisionBrewPackages ();
103 changes: 0 additions & 103 deletions tools/devops/provision-shared.csx

This file was deleted.

Loading
Loading