Преглед на файлове

[v9] Remove GHA workflows that test with `--use-libraries` (#9463)

* Remove `--use-libraries` workflows

* [Will Revert] Run only the cron workflows

* Add ENABLE_TESTING_SEARCH_PATHS flag

* Add blank swift file to statically link Swift lib

* Link in swift for ABTesting, Crashlytics, and FIS test specs

* [skip ci] Revert "Link in swift for ABTesting, Crashlytics, and FIS test specs"

This reverts commit 95e4a492a8eb9e0404bdf19daf2f67d59d5b0b61.

* [skip ci] Revert "Add blank swift file to statically link Swift lib"

This reverts commit 43555ecf884008fcbbf6076b81cc77f7aaa02d15.

* [skip ci] Revert "Add ENABLE_TESTING_SEARCH_PATHS flag"

This reverts commit e551fbee1a7ae4970848dca9b6ae1ead2d68ed01.

* Bump macOS test version in ABTesting, CSH, and FIS specs

* Ignore warings in FIS tests

* Ignore messaging warnings in cron jobs

* [skip ci] Revert "[Will Revert] Run only the cron workflows"

This reverts commit b39eaee5bdd6c294c172e1bb60a58cabd31f9373.

* [skip ci] Revert "Ignore messaging warnings in cron jobs"

This reverts commit 8a3faabe9983e58a54fb1522a51202d6270da5d8.

* Add `@unknown default` case for FCM's Swift enum build tests

* [skip ci] Fix typo
Nick Cooke преди 4 години
родител
ревизия
d345b30e0b

+ 1 - 2
.github/workflows/abtesting.yml

@@ -92,8 +92,7 @@ jobs:
       matrix:
         target: [ios, tvos, macos]
         flags: [
-          '--use-static-frameworks',
-          '--use-libraries'
+          '--use-static-frameworks'
         ]
     needs: pod-lib-lint
     steps:

+ 1 - 2
.github/workflows/app_check.yml

@@ -64,8 +64,7 @@ jobs:
     strategy:
       matrix:
         flags: [
-          '--skip-tests --use-modular-headers',
-          '--skip-tests --use-libraries'
+          '--skip-tests --use-modular-headers'
         ]
     needs: pod_lib_lint
     steps:

+ 1 - 2
.github/workflows/appdistribution.yml

@@ -66,8 +66,7 @@ jobs:
       matrix:
         target: [ios]
         flags: [
-          '--use-static-frameworks',
-          '--use-libraries'
+          '--use-static-frameworks'
         ]
     needs: pod-lib-lint
     steps:

+ 1 - 2
.github/workflows/auth.yml

@@ -129,8 +129,7 @@ jobs:
         # The macos and tvos tests can hang, and watchOS doesn't have tests.
         target: [ios, tvos --skip-tests, macos --skip-tests, watchos --skip-tests]
         flags: [
-          '--use-static-frameworks',
-          '--use-libraries'
+          '--use-static-frameworks'
         ]
     needs: pod-lib-lint
     steps:

+ 1 - 2
.github/workflows/core-diagnostics.yml

@@ -67,8 +67,7 @@ jobs:
       matrix:
         target: [ios, tvos, macos]
         flags: [
-          '--use-static-frameworks',
-          '--use-libraries'
+          '--use-static-frameworks'
         ]
     needs: pod-lib-lint
     steps:

+ 1 - 3
.github/workflows/core.yml

@@ -72,9 +72,7 @@ jobs:
       matrix:
         target: [ios, tvos, macos]
         flags: [
-          '--use-static-frameworks',
-          # Tests are skipped since the Swift tests need modules.
-          '--skip-tests --use-libraries'
+          '--use-static-frameworks'
         ]
     needs: pod-lib-lint
     steps:

+ 1 - 2
.github/workflows/crashlytics.yml

@@ -105,8 +105,7 @@ jobs:
         # Disable watchos because it does not support XCTest.
         target: [ios, tvos, macos, watchos --skip-tests]
         flags: [
-          '--use-static-frameworks',
-          '--use-libraries'
+          '--use-static-frameworks'
         ]
     needs: pod-lib-lint
     steps:

+ 1 - 2
.github/workflows/database.yml

@@ -124,8 +124,7 @@ jobs:
       matrix:
         target: [ios, tvos, macos]
         flags: [
-          '--skip-tests --use-static-frameworks',
-          '--skip-tests --use-libraries'
+          '--skip-tests --use-static-frameworks'
         ]
     needs: pod-lib-lint
     steps:

+ 1 - 2
.github/workflows/dynamiclinks.yml

@@ -46,8 +46,7 @@ jobs:
     strategy:
       matrix:
         flags: [
-          '--use-static-frameworks',
-          '--use-libraries'
+          '--use-static-frameworks'
         ]
     needs: pod_lib_lint
     steps:

+ 1 - 2
.github/workflows/google-utilities-components.yml

@@ -52,8 +52,7 @@ jobs:
       matrix:
         target: [ios, tvos, macos]
         flags: [
-          '--use-static-frameworks',
-          '--use-libraries'
+          '--use-static-frameworks'
         ]
     needs: pod-lib-lint
     steps:

+ 1 - 2
.github/workflows/inappmessaging.yml

@@ -73,8 +73,7 @@ jobs:
     strategy:
       matrix:
         flags: [
-          '--use-static-frameworks',
-          '--use-libraries'
+          '--use-static-frameworks'
         ]
         platform: [ios, tvos]
     needs: pod_lib_lint

+ 1 - 2
.github/workflows/installations.yml

@@ -97,8 +97,7 @@ jobs:
       matrix:
         target: [ios, tvos, macos]
         flags: [
-          '--use-static-frameworks',
-          '--use-libraries --skip-tests'
+          '--use-static-frameworks'
         ]
     needs: pod-lib-lint
     steps:

+ 2 - 4
.github/workflows/messaging.yml

@@ -148,8 +148,7 @@ jobs:
       matrix:
         target: [ios, tvos, macos --skip-tests]
         flags: [
-          '--use-modular-headers',
-          '--skip-tests --use-libraries'
+          '--use-modular-headers'
         ]
     needs: pod-lib-lint
     steps:
@@ -166,8 +165,7 @@ jobs:
     strategy:
       matrix:
         flags: [
-          '--use-static-frameworks',
-          '--skip-tests --use-libraries'
+          '--use-static-frameworks'
         ]
     needs: pod-lib-lint-watchos
     steps:

+ 1 - 2
.github/workflows/performance.yml

@@ -129,8 +129,7 @@ jobs:
       matrix:
         target: [ios, tvos]
         flags: [
-          '--skip-tests --use-static-frameworks',
-          '--skip-tests --use-libraries'
+          '--skip-tests --use-static-frameworks'
         ]
     needs: pod-lib-lint
     steps:

+ 1 - 2
.github/workflows/remoteconfig.yml

@@ -135,8 +135,7 @@ jobs:
       matrix:
         target: [ios, tvos, macos]
         flags: [
-          '--skip-tests --use-static-frameworks',
-          '--skip-tests --use-libraries'
+          '--skip-tests --use-static-frameworks'
         ]
     needs: pod-lib-lint
     steps:

+ 2 - 3
.github/workflows/storage.yml

@@ -140,8 +140,7 @@ jobs:
       matrix:
         target: [ios, tvos, macos, watchos]
         flags: [
-          '--use-static-frameworks --skip-tests ',
-          '--use-libraries --skip-tests '
+          '--use-static-frameworks --skip-tests '
         ]
     needs: pod-lib-lint
     steps:
@@ -160,7 +159,7 @@ jobs:
       matrix:
         target: [ios, tvos, macos, watchos]
         flags: [
-          '--use-static-frameworks --skip-tests', # Swift pods do not support --use-libraries
+          '--use-static-frameworks --skip-tests'
         ]
     needs: pod-lib-lint
     steps:

+ 1 - 1
FirebaseABTesting.podspec

@@ -55,7 +55,7 @@ Firebase Cloud Messaging and Firebase Remote Config in your app.
     unit_tests.scheme = { :code_coverage => true }
     unit_tests.platforms = {
       :ios => ios_deployment_target,
-      :osx => osx_deployment_target,
+      :osx => '10.15',
       :tvos => tvos_deployment_target
     }
     unit_tests.source_files = 'FirebaseABTesting/Tests/Unit/**/*.[mh]'

+ 1 - 1
FirebaseCrashlytics.podspec

@@ -108,7 +108,7 @@ Pod::Spec.new do |s|
     # Unit tests can't run on watchOS.
     unit_tests.platforms = {
       :ios => ios_deployment_target,
-      :osx => osx_deployment_target,
+      :osx => '10.15',
       :tvos => tvos_deployment_target
     }
     unit_tests.source_files = 'Crashlytics/UnitTests/*.[mh]',

+ 0 - 1
FirebaseDynamicLinks/Tests/Unit/FIRDynamicLinkNetworkingTests.m

@@ -18,7 +18,6 @@
 
 #import <OCMock/OCMock.h>
 
-// This needs to precede the GULSwizzler+Unswizzle.h import for the --use-libraries build.
 #import <GoogleUtilities/GULSwizzler.h>
 
 #import <GoogleUtilities/GULSwizzler+Unswizzle.h>

+ 0 - 1
FirebaseDynamicLinks/Tests/Unit/FIRDynamicLinksTest.m

@@ -16,7 +16,6 @@
 
 #import <XCTest/XCTest.h>
 
-// This needs to precede the GULSwizzler+Unswizzle.h import for the --use-libraries build.
 #import <GoogleUtilities/GULSwizzler.h>
 
 #import <GoogleUtilities/GULSwizzler+Unswizzle.h>

+ 2 - 2
FirebaseInstallations.podspec

@@ -58,7 +58,7 @@ Pod::Spec.new do |s|
     unit_tests.scheme = { :code_coverage => true }
     unit_tests.platforms = {
       :ios => ios_deployment_target,
-      :osx => osx_deployment_target,
+      :osx => '10.15',
       :tvos => tvos_deployment_target
     }
     unit_tests.source_files = base_dir + 'Tests/Unit/*.[mh]',
@@ -75,7 +75,7 @@ Pod::Spec.new do |s|
 
   s.test_spec 'integration' do |int_tests|
     int_tests.scheme = { :code_coverage => true }
-    int_tests.platforms = {:ios => '9.0', :osx => '10.12', :tvos => '10.0'}
+    int_tests.platforms = {:ios => '9.0', :osx => '10.15', :tvos => '10.0'}
     int_tests.source_files = base_dir + 'Tests/Integration/**/*.[mh]'
     int_tests.resources = base_dir + 'Tests/Resources/**/*'
     if ENV['FIS_INTEGRATION_TESTS_REQUIRED'] && ENV['FIS_INTEGRATION_TESTS_REQUIRED'] == '1' then

+ 6 - 0
FirebaseInstallations/Source/Tests/Utils/FIRKeyedArchivingUtils.m

@@ -27,7 +27,10 @@
   } else {
     @try {
       NSMutableData *data = [NSMutableData data];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
       NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data];
+#pragma clang diagnostic pop
       archiver.requiresSecureCoding = YES;
 
       [archiver encodeObject:object forKey:NSKeyedArchiveRootObjectKey];
@@ -57,7 +60,10 @@
     object = [NSKeyedUnarchiver unarchivedObjectOfClass:class fromData:data error:outError];
   } else {
     @try {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
       NSKeyedUnarchiver *unarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:data];
+#pragma clang diagnostic pop
       unarchiver.requiresSecureCoding = YES;
 
       object = [unarchiver decodeObjectOfClass:class forKey:NSKeyedArchiveRootObjectKey];

+ 15 - 6
FirebaseMessaging/Tests/UnitTestsSwift/FIRMessagingAPITest.swift

@@ -47,8 +47,11 @@ func apis() {
   case .prod: ()
   case .sandbox: ()
   case .unknown: ()
-    // Intentionally leave the warning for not handling unknown values as that's the only way this
-    // will fail to compile if we add a case.
+  // The following case serves to silence the warning that this
+  // enum "may have additional unknown values". In the event that the existing
+  // cases change, this switch statement will generate
+  // a "Switch must be exhaustive" warning.
+  @unknown default: ()
   }
 
   // Use random to eliminate the warning that we're evaluating to a constant.
@@ -62,8 +65,11 @@ func apis() {
   case .operationInProgress: ()
   case .invalidRequest: ()
   case .invalidTopicName: ()
-    // Intentionally leave the warning for not handling unknown values as that's the only way this
-    // will fail to compile if we add a case.
+  // The following case serves to silence the warning that this
+  // enum "may have additional unknown values". In the event that the existing
+  // cases change, this switch statement will generate
+  // a "Switch must be exhaustive" warning.
+  @unknown default: ()
   }
 
   // Use random to eliminate the warning that we're evaluating to a constant.
@@ -71,8 +77,11 @@ func apis() {
   switch status {
   case .new: ()
   case .unknown: ()
-    // Intentionally leave the warning for not handling unknown values as that's the only way this
-    // will fail to compile if we add a case.
+  // The following case serves to silence the warning that this
+  // enum "may have additional unknown values". In the event that the existing
+  // cases change, this switch statement will generate
+  // a "Switch must be exhaustive" warning.
+  @unknown default: ()
   }
 
   // TODO: Mark the initializer as unavialable, as devs shouldn't be able to instantiate this.