Skip to content

firebase

firebase #10

Workflow file for this run

name: firebase
on:
workflow_dispatch:
jobs:
windows:
runs-on: windows-latest
steps:
- 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'
arch: amd64
- uses: actions/setup-python@v4
with:
python-version: 3.9
architecture: 'x64'
- name: Install absl-py
run: pip install absl-py
- 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 x64 `
-S ${{ github.workspace }}/SourceCache/firebase-cpp-sdk `
-D FIREBASE_CPP_BUILD_PACKAGE=YES `
-D FIREBASE_INCLUDE_LIBRARY_DEFAULT=OFF `
-D FIREBASE_INCLUDE_AUTH=YES `
-D FIREBASE_INCLUDE_FIRESTORE=YES `
-D FIREBASE_USE_BORINGSSL=YES
- name: Build firebase
run: cmake --build ${{ github.workspace }}/BinaryCache/firebase --config Release
- name: Install firebase
run: cmake --build ${{ github.workspace }}/BinaryCache/firebase --config Release --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 .lib files into place..."
$sourceDirectory = "${{ github.workspace }}/BinaryCache/firebase"
$destinationDirectory = "${{ github.workspace }}/BuildRoot/Library/firebase/usr/libs/windows"
$libFiles = Get-ChildItem -Path $sourceDirectory -File -Recurse -Filter *.lib
foreach ($file in $libFiles) {
$destinationPath = Join-Path -Path $destinationDirectory -ChildPath $file.Name
Copy-Item -Path $file.FullName -Destination $destinationPath -Force
Write-Host "Copy operation completed for ${destinationPath}"
}
- uses: actions/upload-artifact@v3
with:
name: firebase-windows-amd64
path: ${{ github.workspace }}/BuildRoot/Library/firebase