diff --git a/dev/ci/mac/Gemfile.lock b/dev/ci/mac/Gemfile.lock index 07591afd97aa84..7e66e9bf421695 100644 --- a/dev/ci/mac/Gemfile.lock +++ b/dev/ci/mac/Gemfile.lock @@ -2,11 +2,12 @@ GEM remote: https://rubygems.org/ specs: CFPropertyList (3.0.3) - activesupport (5.2.6) + activesupport (6.1.4.1) concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) algoliasearch (1.27.5) @@ -14,10 +15,10 @@ GEM json (>= 1.5.1) atomos (0.1.3) claide (1.0.3) - cocoapods (1.10.2) - addressable (~> 2.6) + cocoapods (1.11.0) + addressable (~> 2.8) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.10.2) + cocoapods-core (= 1.11.0) cocoapods-deintegrate (>= 1.0.3, < 2.0) cocoapods-downloader (>= 1.4.0, < 2.0) cocoapods-plugins (>= 1.0.0, < 2.0) @@ -28,26 +29,26 @@ GEM escape (~> 0.0.4) fourflusher (>= 2.3.0, < 3.0) gh_inspector (~> 1.0) - molinillo (~> 0.6.6) + molinillo (~> 0.8.0) nap (~> 1.0) - ruby-macho (~> 1.4) - xcodeproj (>= 1.19.0, < 2.0) - cocoapods-core (1.10.2) - activesupport (> 5.0, < 6) - addressable (~> 2.6) + ruby-macho (>= 1.0, < 3.0) + xcodeproj (>= 1.21.0, < 2.0) + cocoapods-core (1.11.0) + activesupport (>= 5.0, < 7) + addressable (~> 2.8) algoliasearch (~> 1.0) concurrent-ruby (~> 1.1) fuzzy_match (~> 2.0.4) nap (~> 1.0) netrc (~> 0.11) - public_suffix + public_suffix (~> 4.0) typhoeus (~> 1.0) - cocoapods-deintegrate (1.0.4) - cocoapods-downloader (1.4.0) + cocoapods-deintegrate (1.0.5) + cocoapods-downloader (1.5.0) cocoapods-plugins (1.0.0) nap - cocoapods-search (1.0.0) - cocoapods-trunk (1.5.0) + cocoapods-search (1.0.1) + cocoapods-trunk (1.6.0) nap (>= 0.8, < 2.0) netrc (~> 0.11) cocoapods-try (1.2.0) @@ -56,7 +57,7 @@ GEM escape (0.0.4) ethon (0.14.0) ffi (>= 1.15.0) - ffi (1.15.3) + ffi (1.15.4) fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) @@ -65,25 +66,25 @@ GEM concurrent-ruby (~> 1.0) json (2.5.1) minitest (5.14.4) - molinillo (0.6.6) + molinillo (0.8.0) nanaimo (0.3.0) nap (1.1.0) netrc (0.11.0) public_suffix (4.0.6) rexml (3.2.5) - ruby-macho (1.4.0) - thread_safe (0.3.6) + ruby-macho (2.5.1) typhoeus (1.4.0) ethon (>= 0.9.0) - tzinfo (1.2.9) - thread_safe (~> 0.1) - xcodeproj (1.20.0) + tzinfo (2.0.4) + concurrent-ruby (~> 1.0) + xcodeproj (1.21.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) colored2 (~> 3.1) nanaimo (~> 0.3.0) rexml (~> 3.2.4) + zeitwerk (2.4.2) PLATFORMS ruby diff --git a/dev/devicelab/bin/tasks/plugin_lint_mac.dart b/dev/devicelab/bin/tasks/plugin_lint_mac.dart index 37aadafc437904..5ffcbe1f39c2ba 100644 --- a/dev/devicelab/bin/tasks/plugin_lint_mac.dart +++ b/dev/devicelab/bin/tasks/plugin_lint_mac.dart @@ -5,6 +5,7 @@ import 'dart:io'; import 'package:flutter_devicelab/framework/framework.dart'; +import 'package:flutter_devicelab/framework/host_agent.dart'; import 'package:flutter_devicelab/framework/task_result.dart'; import 'package:flutter_devicelab/framework/utils.dart'; import 'package:path/path.dart' as path; @@ -25,7 +26,7 @@ Future main() async { final String integrationTestPackage = path.join(flutterRoot, 'packages', 'integration_test'); final String iosintegrationTestPodspec = path.join(integrationTestPackage, 'ios', 'integration_test.podspec'); - await exec( + final int lintResult = await exec( 'pod', [ 'lib', @@ -34,11 +35,43 @@ Future main() async { '--configuration=Debug', // Release targets unsupported arm64 simulators. Use Debug to only build against targeted x86_64 simulator devices. '--use-libraries', '--verbose', + '--no-clean', ], environment: { 'LANG': 'en_US.UTF-8', }, + canFail: true, ); + // https://github.com/flutter/flutter/issues/89626 + if (lintResult != 0) { + final Directory systemTemp = Directory.systemTemp; + print('Found temp directory ${systemTemp.path}'); + final Iterable lintDirectories = Directory.systemTemp + .listSync() + .whereType() + .where((Directory tempDirectory) => path.basename(tempDirectory.path).contains('CocoaPods-Lint')); + if (lintDirectories.isNotEmpty) { + final Directory lintDirectory = lintDirectories.first; + print('Found lint directory ${lintDirectory.path}'); + final Directory? dumpDirectory = hostAgent.dumpDirectory; + if (dumpDirectory != null) { + final String zipPath = path.join(dumpDirectory.path, + 'lint-${DateTime.now().toLocal().toIso8601String()}.zip'); + return exec( + 'zip', + [ + '-r', + '-9', + zipPath, + lintDirectory.path, + ], + canFail: true, // Best effort to get the logs. + ); + } + } + + throw TaskResult.failure('Lint failed'); + } final String macosintegrationTestPodspec = path.join(integrationTestPackage, 'integration_test_macos', 'macos', 'integration_test_macos.podspec'); await exec(