Initial Build and CI

This commit is contained in:
Paul Beusterien committed 2021-01-20 10:58:34 -08:00
1 parent dc333ecaf7
commit 09d1532fbb
4 files changed
+66 -20

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
name: spm
on:
pull_request:
schedule:
# Run every day at 11pm (PST) - cron uses UTC times
- cron: '0 7 * * *'
jobs:
swift-build-run:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- name: Setup Scripts Directory
run: ./setup-scripts.sh
- name: Initialize xcodebuild
run: xcodebuild -list
- name: Verify build
run: xcodebuild -sdk 'iphonesimulator' -destination 'platform=iOS Simulator,name=iPhone 11' -scheme GoogleAppMeasurement
+17
View File
@@ -0,0 +1,17 @@
/*
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Swift Package Manager needs at least one source file.
@@ -0,0 +1,18 @@
/*
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Swift Package Manager needs at least one header to prevent a warning. See
// https://github.com/firebase/firebase-ios-sdk/pull/6504.
+12 -20
View File
@@ -1,7 +1,7 @@
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.
// Copyright 2020 Google LLC
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -17,8 +17,6 @@
import PackageDescription
let firebaseVersion = "7.3.1"
let package = Package(
name: "GoogleAppMeasurement",
platforms: [.iOS(.v10)],
@@ -34,26 +32,21 @@ let package = Package(
url: "https://github.com/google/GoogleUtilities.git",
"7.2.0" ..< "8.0.0"
),
.package(
name: "nanopb",
url: "https://github.com/firebase/nanopb.git",
"2.30907.0" ..< "2.30908.0"
),
],
targets: [
.target(
name: "GoogleAppMeasurementTarget",
dependencies: [
.target(name: "GoogleAppMeasurementWrapper
],
path: "SwiftPM-PlatformExclude/GoogleAppMeasurementWrap"
),
.target(
name: "GoogleAppMeasurement",
dependencies: [
.target(name: "GoogleAppMeasurementBinary", condition: .when(platforms: [.iOS])),
"FirebaseCore",
"FirebaseInstallations",
"GoogleUtilities_AppDelegateSwizzler",
"GoogleUtilities_MethodSwizzler",
"GoogleUtilities_NSData",
"GoogleUtilities_Network",
"GoogleAppMeasurement",
.product(name: "AppDelegateSwizzler", package: "GoogleUtilities"),
.product(name: "MethodSwizzler", package: "GoogleUtilities"),
.product(name: "NSData", package: "GoogleUtilities"),
.product(name: "Network", package: "GoogleUtilities"),
.product(name: "nanopb", package: "nanopb"),
],
path: "GoogleAppMeasurementWrapper",
@@ -65,11 +58,10 @@ let package = Package(
]
),
.binaryTarget(
name: "GoogleAppMeasurementBinary",
name: "GoogleAppMeasurement",
url: "https://dl.google.com/firebase/ios/swiftpm/7.4.0/GoogleAppMeasurement.zip",
checksum: "5c4e13589e8b5c357309dd8e5f57d81ab3e3ee5a731b034c4703e700d60d667a"
),
],
cLanguageStandard: .c99,
cxxLanguageStandard: CXXLanguageStandard.gnucxx14