forked from firebase/firebase-cpp-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
239 lines (227 loc) · 17 KB
/
bcny-firebase.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
name: firebase
on:
workflow_dispatch:
jobs:
windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- arch: 'amd64'
platform: 'x64'
- arch: 'arm64'
platform: 'ARM64'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
path: ${{ github.workspace }}/SourceCache/flatbuffers
ref: 99aa1ef21dd9dc3f9d4fb0eb82f4b59d0bb5e4c5
repository: google/flatbuffers
- uses: actions/checkout@v3
with:
fetch-depth: 1
path: ${{ github.workspace }}/SourceCache/firebase-cpp-sdk
ref: refs/heads/compnerd/swift
repository: thebrowsercompany/firebase-cpp-sdk
- uses: compnerd/gha-setup-vsdevenv@main
with:
host_arch: amd64
components: 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64;Microsoft.VisualStudio.Component.VC.Tools.ARM64'
arch: ${{ matrix.arch }}
- uses: actions/setup-python@v4
id: python
with:
python-version: 3.9
architecture: 'x64'
- name: Install absl-py
run: pip install absl-py
- name: Configure flatbuffers
run:
cmake -B ${{ github.workspace }}/BinaryCache/flatbuffers `
-D CMAKE_BUILD_TYPE=Release `
-G "Visual Studio 17 2022" `
-A x64 `
-S ${{ github.workspace }}/SourceCache/flatbuffers
- name: Build flatc
run: cmake --build ${{ github.workspace }}/BinaryCache/flatbuffers --config Release --target flatc
- name: Configure firebase
run:
cmake -B ${{ github.workspace }}/BinaryCache/firebase `
-D BUILD_SHARED_LIBS=NO `
-D CMAKE_BUILD_TYPE=Release `
-D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/firebase/usr `
-G "Visual Studio 17 2022" `
-A ${{ matrix.platform }} `
-S ${{ github.workspace }}/SourceCache/firebase-cpp-sdk `
-D FLATBUFFERS_BUILD_FLATC=NO `
-D FIREBASE_CPP_BUILD_PACKAGE=YES `
-D FIREBASE_GITHUB_ACTION_BUILD=YES `
-D FIREBASE_INCLUDE_LIBRARY_DEFAULT=OFF `
-D FIREBASE_INCLUDE_AUTH=YES `
-D FIREBASE_INCLUDE_FIRESTORE=YES `
-D FIREBASE_USE_BORINGSSL=YES `
-D MSVC_RUNTIME_LIBRARY_STATIC=NO `
-D CMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded `
-D FIREBASE_PYTHON_HOST_EXECUTABLE:FILEPATH=${{ steps.python.outputs.python-path }} `
-D FLATBUFFERS_FLATC_EXECUTABLE=${{ github.workspace }}/BinaryCache/flatbuffers/Release/flatc.exe
- name: Build firebase
run: cmake --build ${{ github.workspace }}/BinaryCache/firebase --config RelWithDebInfo
- name: Install firebase
run: cmake --build ${{ github.workspace }}/BinaryCache/firebase --config RelWithDebInfo --target install
- name: Install firebase (manual)
run: |
Copy-Item "${{ github.workspace }}/BinaryCache/firebase/external/src/firestore/Firestore/core/include/firebase/firestore/firestore_errors.h" "${{ github.workspace }}/BuildRoot/Library/firebase/usr/include/firebase/firestore/firestore_errors.h"
Copy-Item "${{ github.workspace }}/BinaryCache/firebase/external/src/firestore/Firestore/core/include/firebase/firestore/geo_point.h" "${{ github.workspace }}/BuildRoot/Library/firebase/usr/include/firebase/firestore/geo_point.h"
Copy-Item "${{ github.workspace }}/BinaryCache/firebase/external/src/firestore/Firestore/core/include/firebase/firestore/timestamp.h" "${{ github.workspace }}/BuildRoot/Library/firebase/usr/include/firebase/firestore/timestamp.h"
Write-Host "Copying static libraries ..."
$source = "${{ github.workspace }}/BinaryCache/firebase"
$libraries = Get-ChildItem -Path $source -File -Recurse -Filter *.lib
foreach ($library in $libraries) {
$destination = Join-Path -Path "${{ github.workspace }}/BuildRoot/Library/firebase/usr/libs/windows" -ChildPath $library.Name
Copy-Item -Path $library.FullName -Destination $destination -Force
Write-Host "... copied ${destination}"
}
- uses: actions/upload-artifact@v3
with:
name: firebase-windows-${{ matrix.arch }}
path: ${{ github.workspace }}/BuildRoot/Library/firebase
- name: Package firebase-cpp-sdk
run: |
@"
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>com.google.firebase.windows.${{ matrix.arch }}</id>
<version>0.0.0.0</version>
<title>Firebase C++ SDK</title>
<description>C++ Firebase SDK</description>
<authors>Google, Inc.</authors>
<projectUrl>https://firebase.google.com</projectUrl>
<repository type="git" url="https://github.com/google/firebase-cpp-sdk" branch="main" />
</metadata>
<files>
<file src="`$BUILDROOT`$\usr\include\firebase\app.h" target="include/firebase" />
<file src="`$BUILDROOT`$\usr\include\firebase\auth.h" target="include/firebase" />
<file src="`$BUILDROOT`$\usr\include\firebase\firestore.h" target="include/firebase" />
<file src="`$BUILDROOT`$\usr\include\firebase\future.h" target="include/firebase" />
<file src="`$BUILDROOT`$\usr\include\firebase\log.h" target="include/firebase" />
<file src="`$BUILDROOT`$\usr\include\firebase\util.h" target="include/firebase" />
<file src="`$BUILDROOT`$\usr\include\firebase\variant.h" target="include/firebase" />
<file src="`$BUILDROOT`$\usr\include\firebase\auth\credential.h" target="include/firebase/auth" />
<file src="`$BUILDROOT`$\usr\include\firebase\auth\types.h" target="include/firebase/auth" />
<file src="`$BUILDROOT`$\usr\include\firebase\auth\user.h" target="include/firebase/auth" />
<file src="`$BUILDROOT`$\usr\include\firebase\firestore\aggregate_query.h" target="include/firebase/firestore" />
<file src="`$BUILDROOT`$\usr\include\firebase\firestore\aggregate_query_snapshot.h" target="include/firebase/firestore" />
<file src="`$BUILDROOT`$\usr\include\firebase\firestore\aggregate_source.h" target="include/firebase/firestore" />
<file src="`$BUILDROOT`$\usr\include\firebase\firestore\collection_reference.h" target="include/firebase/firestore" />
<file src="`$BUILDROOT`$\usr\include\firebase\firestore\document_charge.h" target="include/firebase/firestore" />
<file src="`$BUILDROOT`$\usr\include\firebase\firestore\document_reference.h" target="include/firebase/firestore" />
<file src="`$BUILDROOT`$\usr\include\firebase\firestore\document_snapshot.h" target="include/firebase/firestore" />
<file src="`$BUILDROOT`$\usr\include\firebase\firestore\field_path.h" target="include/firebase/firestore" />
<file src="`$BUILDROOT`$\usr\include\firebase\firestore\field_value.h" target="include/firebase/firestore" />
<file src="`$BUILDROOT`$\usr\include\firebase\firestore\firestore_errors.h" target="include/firebase/firestore" />
<file src="`$BUILDROOT`$\usr\include\firebase\firestore\geo_point.h" target="include/firebase/firestore" />
<file src="`$BUILDROOT`$\usr\include\firebase\firestore\listener_registration.h" target="include/firebase/firestore" />
<file src="`$BUILDROOT`$\usr\include\firebase\firestore\load_bundle_task_progress.h" target="include/firebase/firestore" />
<file src="`$BUILDROOT`$\usr\include\firebase\firestore\map_field_value.h" target="include/firebase/firestore" />
<file src="`$BUILDROOT`$\usr\include\firebase\firestore\metadata_changes.h" target="include/firebase/firestore" />
<file src="`$BUILDROOT`$\usr\include\firebase\firestore\query.h" target="include/firebase/firestore" />
<file src="`$BUILDROOT`$\usr\include\firebase\firestore\query_snapshot.h" target="include/firebase/firestore" />
<file src="`$BUILDROOT`$\usr\include\firebase\firestore\settings.h" target="include/firebase/firestore" />
<file src="`$BUILDROOT`$\usr\include\firebase\firestore\set_options.h" target="include/firebase/firestore" />
<file src="`$BUILDROOT`$\usr\include\firebase\firestore\snapshot_metadata.h" target="include/firebase/firestore" />
<file src="`$BUILDROOT`$\usr\include\firebase\firestore\source.h" target="include/firebase/firestore" />
<file src="`$BUILDROOT`$\usr\include\firebase\firestore\timestamp.h" target="include/firebase/firestore" />
<file src="`$BUILDROOT`$\usr\include\firebase\firestore\transaction.h" target="include/firebase/firestore" />
<file src="`$BUILDROOT`$\usr\include\firebase\firestore\transaction_options.h" target="include/firebase/firestore" />
<file src="`$BUILDROOT`$\usr\include\firebase\firestore\write_batch.h" target="include/firebase/firestore" />
<file src="`$BUILDROOT`$\usr\include\firebase\internal\common.h" target="include/firebase/internal" />
<file src="`$BUILDROOT`$\usr\include\firebase\internal\future_impl.h" target="include/firebase/internal" />
<file src="`$BUILDROOT`$\usr\include\firebase\internal\mutex.h" target="include/firebase/include/internal" />
<file src="`$BUILDROOT`$\usr\include\firebase\internal\platform.h" target="include/firebase/internal" />
<file src="`$BUILDROOT`$\usr\include\firebase\internal\type_traits.h" target="include/firebase/internal" />
<!-- FIXME(compnerd) is this header actually required? -->
<file src="`$BUILDROOT`$\usr\include\firebase\google_play_services\availability.h" target="include/firebase/google_play_services" />
<file src="`$BUILDROOT`$\usr\libs\windows\firebase_app.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\firebase_auth.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\firebase_firestore.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\firebase_rest_lib.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\firestore_core.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\firestore_nanopb.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\firestore_protos_nanopb.lib" target="lib" />
<!-- dependencies -->
<file src="`$BUILDROOT`$\usr\libs\windows\absl_bad_optional_access.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_bad_variant_access.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_base.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_city.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_civil_time.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_cord.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_cord_internal.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_cordz_functions.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_cordz_handle.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_cordz_info.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_debugging_internal.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_demangle_internal.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_exponential_biased.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_graphcycles_internal.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_hash.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_hashtablez_sampler.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_int128.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_log_severity.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_low_level_hash.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_malloc_internal.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_random_distributions.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_random_interanl_seed_material.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_random_internal_platform.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_random_internal_pool_urbg.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_random_internal_randen.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_random_internal_randen_hwaes.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_random_internal_randen_hwaes_impl.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_random_internal_randen_slow.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_random_seed_gen_exception.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_random_seed_sequences.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_raw_hash_set.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_raw_logging_internal.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_spinlock_wait.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_stacktrace.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_status.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_statusor.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_str_format_internal.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_strerror.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_strings.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_strings_internal.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_symbolize.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_synchronization.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_throw_delegate.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_time.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\absl_time_zone.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\address_sorting.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\cares.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\crypto.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\fipsmodule.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\flatbuffers.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\gpr.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\grpc.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\grpc++.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\leveldb.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\libcurl.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\libprotobuf.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\libuWS.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\protobuf-nanopb.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\re2.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\snappy.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\ssl.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\upb.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\uv_a.lib" target="lib" />
<file src="`$BUILDROOT`$\usr\libs\windows\zlibstatic.lib" target="lib" />
</files>
</package>
"@ | Out-File -Encoding UTF8 firebase.nuspec
nuget pack -Properties BUILDROOT=${{ github.workspace }}\BuildRoot\Library\firebase -Suffix (git log -1 --format=%h) firebase.nuspec
shell: pwsh
- uses: actions/upload-artifact@v3
with:
name: windows-${{ matrix.arch }}.nupkg
path: com.google.firebase.windows.${{ matrix.arch }}.*.nupkg