Skip to content
Draft
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
15 changes: 14 additions & 1 deletion eng/pipelines/common/templates/templatePublic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,17 @@ resources:
${{ pair.key }}: ${{ pair.value }}


stages: ${{ parameters.stages }}
# Test-only: do not allocate agents for unrelated public pipelines.
stages:
- ${{ if or(ne(variables['System.TeamProject'], 'public'), eq(variables['Build.DefinitionName'], 'runtime')) }}:
- ${{ parameters.stages }}
- ${{ else }}:
- stage: Skipped
condition: false
jobs:
- job: Skipped
pool: server
steps:
- task: Delay@1
inputs:
delayForMinutes: '0'
2,175 changes: 103 additions & 2,072 deletions eng/pipelines/runtime.yml

Large diffs are not rendered by default.

25 changes: 2 additions & 23 deletions eng/pipelines/vmr-build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,8 @@

trigger: none

pr:
branches:
include:
- '*'
paths:
include:
- '*'
- eng/pipelines/global-build.yml
exclude:
- '**.md'
- .devcontainer/*
- .github/*
- docs/*
# Don't trigger VMR builds for changes to Mono.
# Mono-based stage 2 source-build is not blocking for the VMR and is only done as a basic validation
# for our partners. Interesting Mono-based stage 2 source-build legs are for architectures that are not
# supported on CoreCLR, like S390X, which we don't build ourselves.
- src/mono/*
- eng/pipelines/coreclr/*.*
- eng/pipelines/libraries/*.*
- eng/pipelines/installer/*.*
- PATENTS.TXT
- THIRD-PARTY-NOTICES.TXT
# Test-only: this pipeline does not use the shared public pipeline template.
pr: none

variables:
- template: /eng/common/templates/variables/pool-providers.yml@self
Expand Down
4 changes: 2 additions & 2 deletions eng/testing/tests.ioslike.targets
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<!-- NativeAOT library tests: host publish runs trim + ILC and produces a static lib. AppleAppBuilder consumes it in library mode.
Functional tests with their own Main stay on the Helix ILC path. -->
<PropertyGroup Condition="'$(UseNativeAOTRuntime)' == 'true' and '$(IncludesTestRunner)' != 'false'">
<PropertyGroup Condition="'$(UseNativeAOTRuntime)' == 'true' and '$(IncludesTestRunner)' != 'false' and '$(TestFramework)' == 'xunit'">
<TestNativeAot>true</TestNativeAot>
<TestSingleFile Condition="'$(TestSingleFile)' == ''">true</TestSingleFile>
<PublishAotUsingRuntimePack Condition="'$(PublishAotUsingRuntimePack)' == ''">true</PublishAotUsingRuntimePack>
Expand All @@ -16,7 +16,7 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<ItemGroup Condition="'$(UseNativeAOTRuntime)' == 'true' and '$(IncludesTestRunner)' != 'false' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<ItemGroup Condition="'$(UseNativeAOTRuntime)' == 'true' and '$(IncludesTestRunner)' != 'false' and '$(TestFramework)' == 'xunit' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<Compile Include="$(CommonTestPath)AppleTestRunner\AppleTestRunner.cs" Link="Common\AppleTestRunner\AppleTestRunner.cs" />
<PackageReference Include="Microsoft.DotNet.XHarness.TestRunners.Xunit" Version="$(MicrosoftDotNetXHarnessTestRunnersXunitVersion)" />

Expand Down
41 changes: 28 additions & 13 deletions src/tasks/AppleAppBuilder/Templates/main-console.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,28 @@ @interface ViewController : UIViewController
@end

@interface AppDelegate : UIResponder <UIApplicationDelegate>
@end

@interface SceneDelegate : UIResponder <UIWindowSceneDelegate>
@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) ViewController *controller;
@end

@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
- (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options {
UISceneConfiguration *configuration = [UISceneConfiguration configurationWithName:nil sessionRole:connectingSceneSession.role];
configuration.sceneClass = [UIWindowScene class];
configuration.delegateClass = [SceneDelegate class];
return configuration;
}
@end

@implementation SceneDelegate
- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions {
self.window = [[UIWindow alloc] initWithWindowScene:(UIWindowScene *)scene];
self.controller = [[ViewController alloc] initWithNibName:nil bundle:nil];
self.window.rootViewController = self.controller;
[self.window makeKeyAndVisible];
return YES;
}
@end

Expand Down Expand Up @@ -73,24 +84,28 @@ - (void)viewDidLoad {
[self.view addSubview:logLabel];
[self.view addSubview:summaryLabel];

dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
// A scene can reconnect without restarting the process.
static dispatch_once_t runtimeInitOnce;
dispatch_once(&runtimeInitOnce, ^{
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
#if !USE_LIBRARY_MODE
#if !USE_NATIVE_AOT
mono_ios_runtime_init ();
mono_ios_runtime_init ();
#else
#if INVARIANT_GLOBALIZATION
setenv ("DOTNET_SYSTEM_GLOBALIZATION_INVARIANT", "1", TRUE);
setenv ("DOTNET_SYSTEM_GLOBALIZATION_INVARIANT", "1", TRUE);
#endif // INVARIANT_GLOBALIZATION
char **managed_argv;
int managed_argc = get_managed_args (&managed_argv);
int ret_val = __managed__Main (managed_argc, managed_argv);
free_managed_args (&managed_argv, managed_argc);
os_log_info (OS_LOG_DEFAULT, EXIT_CODE_TAG ": %d", ret_val);
exit (ret_val);
char **managed_argv;
int managed_argc = get_managed_args (&managed_argv);
int ret_val = __managed__Main (managed_argc, managed_argv);
free_managed_args (&managed_argv, managed_argc);
os_log_info (OS_LOG_DEFAULT, EXIT_CODE_TAG ": %d", ret_val);
exit (ret_val);
#endif // !USE_NATIVE_AOT
#else
library_mode_init();
library_mode_init();
#endif //!USE_LIBRARY_MODE
});
});
}

Expand Down
39 changes: 27 additions & 12 deletions src/tasks/AppleAppBuilder/Templates/main-simple.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,28 @@ @interface ViewController : UIViewController
@end

@interface AppDelegate : UIResponder <UIApplicationDelegate>
@end

@interface SceneDelegate : UIResponder <UIWindowSceneDelegate>
@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) ViewController *controller;
@end

@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
- (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options {
UISceneConfiguration *configuration = [UISceneConfiguration configurationWithName:nil sessionRole:connectingSceneSession.role];
configuration.sceneClass = [UIWindowScene class];
configuration.delegateClass = [SceneDelegate class];
return configuration;
}
@end

@implementation SceneDelegate
- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions {
self.window = [[UIWindow alloc] initWithWindowScene:(UIWindowScene *)scene];
self.controller = [[ViewController alloc] initWithNibName:nil bundle:nil];
self.window.rootViewController = self.controller;
[self.window makeKeyAndVisible];
return YES;
}
@end

Expand All @@ -50,20 +61,24 @@ - (void)viewDidLoad {
[button setTitle:@"Click me (wire me up)" forState:UIControlStateNormal];
[self.view addSubview:button];

dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
// A scene can reconnect without restarting the process.
static dispatch_once_t runtimeInitOnce;
dispatch_once(&runtimeInitOnce, ^{
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
#if !USE_NATIVE_AOT
mono_ios_runtime_init ();
mono_ios_runtime_init ();
#else
#if INVARIANT_GLOBALIZATION
setenv ("DOTNET_SYSTEM_GLOBALIZATION_INVARIANT", "1", TRUE);
setenv ("DOTNET_SYSTEM_GLOBALIZATION_INVARIANT", "1", TRUE);
#endif
char **managed_argv;
int managed_argc = get_managed_args (&managed_argv);
int ret_val = __managed__Main (managed_argc, managed_argv);
free_managed_args (&managed_argv, managed_argc);
os_log_info (OS_LOG_DEFAULT, EXIT_CODE_TAG ": %d", ret_val);
exit (ret_val);
char **managed_argv;
int managed_argc = get_managed_args (&managed_argv);
int ret_val = __managed__Main (managed_argc, managed_argv);
free_managed_args (&managed_argv, managed_argc);
os_log_info (OS_LOG_DEFAULT, EXIT_CODE_TAG ": %d", ret_val);
exit (ret_val);
#endif
});
});
}
-(void) buttonClicked:(UIButton*)sender
Expand Down
2 changes: 1 addition & 1 deletion src/tasks/AppleAppBuilder/Xcode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ public void CreateXcodeProject(string projectName, string cmakeDirectoryPath)
else
{
// arch is passed later when invoking xcodebuild
cmakeArgs.Append(" -DCMAKE_OSX_DEPLOYMENT_TARGET=13.0");
cmakeArgs.Append(" -DCMAKE_OSX_DEPLOYMENT_TARGET=15.0");
}

Utils.RunProcess(Logger, "cmake", cmakeArgs.ToString(), workingDir: cmakeDirectoryPath);
Expand Down
Loading