Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: xamarin/xamarin-macios
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 794f6cd1c5b38b85c25387cde8aae682dc79a954
Choose a base ref
..
head repository: xamarin/xamarin-macios
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0fe18a16d5a009aa647c1bfa04d40195169adbd1
Choose a head ref
Showing 642 changed files with 41,387 additions and 24,266 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/autoformat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Autoformat code
on: pull_request

#
# The autoformat action is a 2-parter:
# Part 1 (this file):
# * This is done in a safe context with no secrets (target: pull_request)
# * We clone the repo and check out the pull request
# * We run 'dotnet format' to format incorrectly formatted code (this is the potentially unsafe action, since who knows what kind of attach vector 'dotnet format' is)
# * We see if any code was formatted, and create a commit with those changes.
# * We preare a patch for the commit, and store it as an artifact.
# Part 2 (autoformat2.yml):
# * This is done in a context with more powers (most importantly it can push to forks)
# * We get the πatch artifact from part 1
# * We push the commit, and add a label to the PR.
#
# Ref:
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
# https://github.com/actions/checkout/issues/455
# https://stackoverflow.com/a/65081720/183422
#

jobs:
autoformat-code:
name: Autoformat code
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'actions-disable-autoformat') == false

steps:
- name: 'Checkout repo'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.sha }}

- name: 'Autoformat'
id: autoformat
run: |
set -exo pipefail
./tools/autoformat.sh
mkdir -p autoformat
echo ${{ github.event.number }} > ./autoformat/PR
if git diff --exit-code >/dev/null; then
echo "No code formatting occurred"
else
git add -- .
git reset -- autoformat/PR # Don't add this file to the diff
git config --global user.email "github-actions-autoformatter@xamarin.com"
git config --global user.name "GitHub Actions Autoformatter"
git checkout "$GITHUB_HEAD_REF"
git commit -m "Auto-format source code"
git format-patch HEAD^..HEAD --stdout > ./autoformat/autoformat.patch
fi
- name: 'Upload patch'
uses: actions/upload-artifact@v3
with:
name: autoformat
path: autoformat/
79 changes: 79 additions & 0 deletions .github/workflows/autoformat2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Autoformat code - publish results
on:
workflow_run:
workflows: ["Autoformat code"]
types:
- completed

# See autoformat.yml for a description of what happens here.

jobs:
push-and-notify:
name: Push autoformatted code and notify user
runs-on: ubuntu-latest
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
steps:
- name: 'Download artifacts'
uses: actions/github-script@v6.3.1
with:
script: |
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "autoformat"
})[0];
var download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/autoformat.zip', Buffer.from(download.data));
- name: 'Unzip artifacts'
id: unzip_artifacts
run: |
unzip -d ../autoformat autoformat.zip
if test -f ../autoformat/autoformat.patch; then
echo "::set-output name=autoformatted::true"
fi
- name: 'Checkout repo'
uses: actions/checkout@v3
if: steps.unzip_artifacts.outputs.autoformatted == 'true'
with:
fetch-depth: 0
repository: ${{ github.event.workflow_run.head_repository.full_name }}
ref: ${{ github.event.workflow_run.head_branch }}

- name: 'Get autoformatted commit and push it'
if: steps.unzip_artifacts.outputs.autoformatted == 'true'
run: |
git config user.email "github-actions-autoformatter@xamarin.com"
git config user.name "GitHub Actions Autoformatter"
cat ../autoformat/autoformat.patch
git am < ../autoformat/autoformat.patch
git show
git push
- name: 'Yell at user'
if: steps.unzip_artifacts.outputs.autoformatted == 'true'
uses: actions/github-script@v6.3.1
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
let fs = require('fs');
let issue_number = Number(fs.readFileSync('../autoformat/PR'));
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
body: '# :warning: Your code has been reformatted. :warning:\n\nIf this is not desired, add the `actions-disable-autoformat` label, and revert the reformatting commit.\n\nIf files unrelated to your change were modified, try reverting the reformatting commit + merging with the target branch (and push those changes).'
});
2 changes: 1 addition & 1 deletion .github/workflows/maestro-changelog.yml
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ jobs:
cat changelog2.txt >> $GITHUB_ENV
- name: 'Add changelog'
uses: actions/github-script@v6
uses: actions/github-script@v6.3.1
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
28 changes: 28 additions & 0 deletions .github/workflows/update-single-platform-branches.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Update single-platform release tests branches

on:
# allow triggering this action manually
workflow_dispatch:
# run every saturday (at noon UTC), so the builds occur during the weekend during lower CI load
schedule:
- cron: '0 12 * * 6'

jobs:
updateSinglePlatformBranches:
name: Merge main into single-platform release test branches
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: 'Update branches'
run: |
set -ex
for platform in iOS tvOS MacCatalyst macOS; do
git checkout -b release/release-test-only-dotnet-$platform origin/release/release-test-only-dotnet-$platform
git merge origin/main
git push
done
6 changes: 6 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Project>
<PropertyGroup>
<!-- Disables the transitive restore of packages like Microsoft.AspNetCore.App.Ref, Microsoft.WindowsDesktop.App.Ref -->
<DisableTransitiveFrameworkReferenceDownloads>true</DisableTransitiveFrameworkReferenceDownloads>
</PropertyGroup>
</Project>
28 changes: 16 additions & 12 deletions Make.config
Original file line number Diff line number Diff line change
@@ -36,12 +36,12 @@ $(TOP)/Make.config.inc: $(TOP)/Make.config $(TOP)/mk/mono.mk

include $(TOP)/Make.versions

APIDIFF_REFERENCES_iOS=https://bosstoragemirror.blob.core.windows.net/wrench/d17-3/87f98a75edaa6757fd6ff5170d297615830fb41b/6466144/package/bundle.zip
APIDIFF_REFERENCES_iOS=https://bosstoragemirror.blob.core.windows.net/wrench/6.0.4xx-xcode14/6756a11462d8aa6e73d4a320712b276caba159c1/6718459/package/bundle.zip
APIDIFF_REFERENCES_Mac=https://bosstoragemirror.blob.core.windows.net/wrench/d17-3/87f98a75edaa6757fd6ff5170d297615830fb41b/6466144/package/bundle.zip
APIDIFF_REFERENCES_DOTNET_iOS=https://bosstoragemirror.blob.core.windows.net/wrench/6.0.4xx/e45c10c68e85a6c6bb10542dff5fcaac3f8dade3/6506533/package/bundle.zip
APIDIFF_REFERENCES_DOTNET_tvOS=https://bosstoragemirror.blob.core.windows.net/wrench/6.0.4xx/e45c10c68e85a6c6bb10542dff5fcaac3f8dade3/6506533/package/bundle.zip
APIDIFF_REFERENCES_DOTNET_macOS=https://bosstoragemirror.blob.core.windows.net/wrench/6.0.4xx/e45c10c68e85a6c6bb10542dff5fcaac3f8dade3/6506533/package/bundle.zip
APIDIFF_REFERENCES_DOTNET_MacCatalyst=https://bosstoragemirror.blob.core.windows.net/wrench/6.0.4xx/e45c10c68e85a6c6bb10542dff5fcaac3f8dade3/6506533/package/bundle.zip
APIDIFF_REFERENCES_DOTNET_iOS=https://bosstoragemirror.blob.core.windows.net/wrench/6.0.4xx-xcode14/6756a11462d8aa6e73d4a320712b276caba159c1/6718459/package/bundle.zip
APIDIFF_REFERENCES_DOTNET_tvOS=https://bosstoragemirror.blob.core.windows.net/wrench/6.0.4xx-xcode14/6756a11462d8aa6e73d4a320712b276caba159c1/6718459/package/bundle.zip
APIDIFF_REFERENCES_DOTNET_macOS=https://bosstoragemirror.blob.core.windows.net/wrench/6.0.4xx/4bd34d034c8c5a4e092c8bd3c8868153d94277b4/6656178/package/bundle.zip
APIDIFF_REFERENCES_DOTNET_MacCatalyst=https://bosstoragemirror.blob.core.windows.net/wrench/6.0.4xx/4bd34d034c8c5a4e092c8bd3c8868153d94277b4/6656178/package/bundle.zip

PACKAGE_HEAD_REV=$(shell git rev-parse HEAD)

@@ -131,7 +131,7 @@ NUGET_HARDCODED_PRERELEASE_BRANCH_ALPHANUMERIC:=$(shell export LANG=C; printf "%
ifneq ($(PULL_REQUEST_ID),)
# we're a PR, so PR versioning
NUGET_PRERELEASE_IDENTIFIER=-ci.pr.gh$(PULL_REQUEST_ID)
else ifeq ($(NUGETNUGET_RELEASE_BRANCH_ALPHANUMERIC_RELEASE_BRANCH),$(CURRENT_BRANCH_ALPHANUMERIC))
else ifeq ($(NUGET_RELEASE_BRANCH_ALPHANUMERIC),$(CURRENT_BRANCH_ALPHANUMERIC))
# this is a release branch, so no prerelease identifier
NUGET_PRERELEASE_IDENTIFIER=
else ifeq ($(NUGET_HARDCODED_PRERELEASE_BRANCH_ALPHANUMERIC),$(CURRENT_BRANCH_ALPHANUMERIC))
@@ -193,9 +193,9 @@ MACCATALYST_NUGET_VERSION_NO_METADATA=$(MACCATALYST_NUGET_VERSION)$(NUGET_PREREL
MACCATALYST_NUGET_VERSION_FULL=$(MACCATALYST_NUGET_VERSION_NO_METADATA)+$(NUGET_BUILD_METADATA)

# Xcode version should have both a major and a minor version (even if the minor version is 0)
XCODE_VERSION=14.0
XCODE_URL=https://dl.internalx.com/internal-files/xcodes/Xcode_14_beta_6.xip
XCODE_DEVELOPER_ROOT=/Applications/Xcode_14.0.0-beta6.app/Contents/Developer
XCODE_VERSION=14.1
XCODE_URL=https://dl.internalx.com/internal-files/xcodes/Xcode_14.1_beta3.xip
XCODE_DEVELOPER_ROOT=/Applications/Xcode_14.1.0-beta3.app/Contents/Developer
XCODE_PRODUCT_BUILD_VERSION:=$(shell /usr/libexec/PlistBuddy -c 'Print :ProductBuildVersion' $(XCODE_DEVELOPER_ROOT)/../version.plist 2>/dev/null || echo " $(shell tput setaf 1 2>/dev/null)The required Xcode ($(XCODE_VERSION)) is not installed in $(basename $(basename $(XCODE_DEVELOPER_ROOT)))$(shell tput sgr0 2>/dev/null)" >&2)

# Tell both Xcode and our build logic which Xcode we're using.
@@ -230,7 +230,7 @@ MAX_SHARPIE_VERSION=3.5.99
MIN_SHARPIE_URL=https://download.visualstudio.microsoft.com/download/pr/7336f72c-57aa-4e46-9936-cce4d1975ba9/b33be8b36a22c2cfbcbe5680f14e0901/objectivesharpie-3.5.61.pkg

# Minimum OSX versions for building XI/XM
MIN_OSX_BUILD_VERSION=12.0
MIN_OSX_BUILD_VERSION=12.5
# Minimum OSX version for executing XI/XM tooling.
MIN_OSX_VERSION_FOR_IOS=10.11
MIN_OSX_VERSION_FOR_MAC=10.11
@@ -355,7 +355,11 @@ endif

SIMULATOR_SDK=$(XCODE_DEVELOPER_ROOT)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator$(IOS_SDK_VERSION).sdk

OBJC_CFLAGS=-ObjC++ -std=c++14 -fno-exceptions -stdlib=libc++
# Clang will by default emit objc_msgSend stubs in Xcode 14, which ld from earlier Xcodes doesn't understand.
# We disable this by passing -fno-objc-msgsend-selector-stubs to clang.
# We can probably remove this flag once we require developers to use Xcode 14.
# Ref: https://github.com/xamarin/xamarin-macios/issues/16223
OBJC_CFLAGS=-ObjC++ -std=c++14 -fno-exceptions -stdlib=libc++ -fno-objc-msgsend-selector-stubs

COMMON_SIMULATOR_CFLAGS=-mios-simulator-version-min=$(MIN_IOS_SDK_VERSION) -isysroot $(SIMULATOR_SDK) $(CFLAGS) -g $(IOS_COMMON_DEFINES)
SIMULATOR86_CFLAGS=$(COMMON_SIMULATOR_CFLAGS) -arch i386
@@ -629,7 +633,7 @@ MANIFEST_VERSION_BAND=6.0.400
# The toolchain can either be hardcoded to something like 6.0.200, or set to MANIFEST_VERSION_BAND.
# Typically it should be MANIFEST_VERSION_BAND, but it usually takes a while after MANIFEST_VERSION_BAND is bumped
# for this to follow suit, in which case we can keep things working by hardcoding the previous version band.
TOOLCHAIN_MANIFEST_VERSION_BAND=6.0.200
TOOLCHAIN_MANIFEST_VERSION_BAND=6.0.300

# The location of csc changes depending on whether we're using a preview or a stable/service release :/
DOTNET_CSC_PATH_PREVIEW=$(DOTNET_DIR)/sdk/$(DOTNET_VERSION)/Roslyn/bincore/csc.dll
20 changes: 10 additions & 10 deletions Make.versions
Original file line number Diff line number Diff line change
@@ -48,8 +48,8 @@
# line changed in git).
#

IOS_PACKAGE_VERSION=15.99.0.$(IOS_COMMIT_DISTANCE)
MAC_PACKAGE_VERSION=8.99.0.$(MAC_COMMIT_DISTANCE)
IOS_PACKAGE_VERSION=16.1.0.$(IOS_COMMIT_DISTANCE)
MAC_PACKAGE_VERSION=8.99.1.$(MAC_COMMIT_DISTANCE)

#
# ** NuGet package version numbers **
@@ -66,11 +66,11 @@ MAC_PACKAGE_VERSION=8.99.0.$(MAC_COMMIT_DISTANCE)
# WARNING: Do **not** use versions higher than the available Xcode SDK or else we will have issues with mtouch (See https://github.com/xamarin/xamarin-macios/issues/7705)
# When bumping the major macOS version in MACOS_NUGET_VERSION also update the macOS version where we execute on bots in jenkins/Jenkinsfile (in the 'node' element)

IOS_NUGET_OS_VERSION=16.0
TVOS_NUGET_OS_VERSION=16.0
WATCHOS_NUGET_OS_VERSION=9.0
IOS_NUGET_OS_VERSION=16.1
TVOS_NUGET_OS_VERSION=16.1
WATCHOS_NUGET_OS_VERSION=9.1
MACOS_NUGET_OS_VERSION=13.0
MACCATALYST_NUGET_OS_VERSION=16.0
MACCATALYST_NUGET_OS_VERSION=16.1


# Defines the default platform version if it's not specified in the TFM. The default should not change for a given .NET version:
@@ -80,8 +80,8 @@ MACCATALYST_NUGET_OS_VERSION=16.0
# Basically: this should be the last OS version of the platform in question when the current major .NET version is first released to stable.
# Ref: https://github.com/dotnet/designs/blob/8e6394406d44f75f30ea2259a425cb9e38d75b69/accepted/2020/net5/net5.md#os-versions

DEFAULT_TARGET_PLATFORM_VERSION_IOS=16.0
DEFAULT_TARGET_PLATFORM_VERSION_TVOS=16.0
DEFAULT_TARGET_PLATFORM_VERSION_WATCHOS=9.0
DEFAULT_TARGET_PLATFORM_VERSION_IOS=16.1
DEFAULT_TARGET_PLATFORM_VERSION_TVOS=16.1
DEFAULT_TARGET_PLATFORM_VERSION_WATCHOS=9.1
DEFAULT_TARGET_PLATFORM_VERSION_MACOS=13.0
DEFAULT_TARGET_PLATFORM_VERSION_MACCATALYST=16.0
DEFAULT_TARGET_PLATFORM_VERSION_MACCATALYST=16.1
50 changes: 28 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
@@ -38,15 +38,23 @@ ifdef INCLUDE_IOS
endif
endif
@./system-dependencies.sh
@echo "Building the packages:"
@echo " Xamarin.iOS $(IOS_PACKAGE_VERSION)"
@echo " Xamarin.Mac $(MAC_PACKAGE_VERSION)"
@echo "and the NuGets:"
@echo " Xamarin.iOS $(IOS_NUGET_VERSION_FULL)"
@echo " Xamarin.tvOS $(TVOS_NUGET_VERSION_FULL)"
@echo " Xamarin.watchOS $(WATCHOS_NUGET_VERSION_FULL)"
@echo " Xamarin.macOS $(MACOS_NUGET_VERSION_FULL)"
@echo " Xamarin.MacCatalyst $(MACCATALYST_NUGET_VERSION_FULL)"
$(Q) $(MAKE) show-versions

show-versions:
@echo "Building:"
ifdef INCLUDE_XAMARIN_LEGACY
@echo " The legacy package(s):"
ifdef INCLUDE_IOS
@echo " Xamarin.iOS $(IOS_PACKAGE_VERSION)"
endif
ifdef INCLUDE_MAC
@echo " Xamarin.Mac $(MAC_PACKAGE_VERSION)"
endif
endif
ifdef ENABLE_DOTNET
@echo " The .NET NuGet(s):"
@$(foreach platform,$(DOTNET_PLATFORMS),echo " Microsoft.$(platform) $($(shell echo $(platform) | tr 'a-z' 'A-Z')_NUGET_VERSION_FULL)";)
endif

check-permissions:
ifdef INCLUDE_MAC
@@ -97,13 +105,18 @@ else
endif
endif

package:
mkdir -p ../package
$(MAKE) -C $(MACCORE_PATH) package
.PHONY: package release
package release:
$(Q) $(MAKE) -C $(TOP)/release release
# copy .pkg, .zip and *updateinfo to the packages directory to be uploaded to storage
$(CP) $(MACCORE_PATH)/release/*.pkg ../package
$(CP) $(MACCORE_PATH)/release/*.zip ../package
$(CP) $(MACCORE_PATH)/release/*updateinfo ../package
$(Q) mkdir -p ../package
$(Q) echo "Output from 'make release':"
$(Q) ls -la $(TOP)/release | sed 's/^/ /'
$(Q) if test -n "$$(shopt -s nullglob; echo $(TOP)/release/*.pkg)"; then $(CP) $(TOP)/release/*.pkg ../package; fi
$(Q) if test -n "$$(shopt -s nullglob; echo $(TOP)/release/*.zip)"; then $(CP) $(TOP)/release/*.zip ../package; fi
$(Q) if test -n "$$(shopt -s nullglob; echo $(TOP)/release/*updateinfo)"; then $(CP) $(TOP)/release/*updateinfo ../package; fi
$(Q) echo "Packages:"
$(Q) ls -la ../package | sed 's/^/ /'

dotnet-install-system:
$(Q) $(MAKE) -C dotnet install-system
@@ -116,9 +129,6 @@ install-system: install-system-ios install-system-mac
$(Q) rm -Rf /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Xamarin.ObjcBinding.Tasks.dll
$(Q) rm -Rf /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac
$(Q) $(MAKE) install-symlinks MAC_DESTDIR=/ MAC_INSTALL_VERSION=Current IOS_DESTDIR=/ IOS_INSTALL_VERSION=Current -C msbuild V=$(V)
ifdef ENABLE_XAMARIN
$(Q) $(MAKE) install-symlinks MAC_DESTDIR=/ MAC_INSTALL_VERSION=Current IOS_DESTDIR=/ IOS_INSTALL_VERSION=Current -C $(MACCORE_PATH) V=$(V)
endif

install-system-ios:
ifdef INCLUDE_IOS
@@ -187,8 +197,4 @@ git-clean-all:
echo "Done"; \
fi; \

ifdef ENABLE_XAMARIN
SUBDIRS += $(MACCORE_PATH)
endif

SUBDIRS += tests
Loading