Skip to content

Commit

Permalink
comment out code for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
kendal committed May 13, 2024
1 parent 0f60b0d commit b0e5859
Showing 1 changed file with 141 additions and 133 deletions.
274 changes: 141 additions & 133 deletions .github/workflows/bcny-firebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,142 +18,150 @@ jobs:
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
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: Adjust cmake build settings for debugging
run: powershell ${{ github.workspace }}/SourceCache/firebase-cpp-sdk/build_scripts/windows/fix_cmake_debugflags.ps1 ${{ github.workspace }}/SourceCache/firebase-cpp-sdk/CMakeLists.txt

# For curl we set '-D HAVE_IOCTLSOCKET_FIONBIO=1'. This should automatically be set to 1 by
# https://github.com/curl/curl/blob/60580f9f214869b501ba0caaa5a6bf335e6aee1d/CMake/Platforms/WindowsCache.cmake
# but this is not what we observe in CI.
- 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_INCLUDE_FUNCTIONS=YES `
-D FIREBASE_INCLUDE_STORAGE=YES `
-D FIREBASE_USE_BORINGSSL=YES `
-D MSVC_RUNTIME_LIBRARY_STATIC=NO `
-D CMAKE_C_FLAGS="/D_HAS_EXCEPTIONS=0 /EHsc-"`
-D CMAKE_CXX_FLAGS="/D_HAS_EXCEPTIONS=0 /EHsc-" `
-D CMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded `
-D HAVE_IOCTLSOCKET_FIONBIO=1 `
-D FIREBASE_PYTHON_HOST_EXECUTABLE:FILEPATH=${{ steps.python.outputs.python-path }} `
-D FLATBUFFERS_FLATC_EXECUTABLE=${{ github.workspace }}/BinaryCache/flatbuffers/Release/flatc.exe

- name: Adjust external project build settings for debugging
run: |
$names = Get-ChildItem -Path "${{ github.workspace }}/BinaryCache/firebase" -File -Recurse -Filter CMakeLists.txt
foreach ($name in $names) {
$fullName = $name.FullName
powershell ${{ github.workspace }}/SourceCache/firebase-cpp-sdk/build_scripts/windows/fix_cmake_debugflags.ps1 $fullName
Write-Host "... fixed up debug options for ${fullName}"
}
- name: Configure firebase after build setting adjustments
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_INCLUDE_FUNCTIONS=YES `
-D FIREBASE_INCLUDE_STORAGE=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
# - 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
# 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: Adjust cmake build settings for debugging
# run: powershell ${{ github.workspace }}/SourceCache/firebase-cpp-sdk/build_scripts/windows/fix_cmake_debugflags.ps1 ${{ github.workspace }}/SourceCache/firebase-cpp-sdk/CMakeLists.txt
#
# # For curl we set '-D HAVE_IOCTLSOCKET_FIONBIO=1'. This should automatically be set to 1 by
# # https://github.com/curl/curl/blob/60580f9f214869b501ba0caaa5a6bf335e6aee1d/CMake/Platforms/WindowsCache.cmake
# # but this is not what we observe in CI.
# - 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_INCLUDE_FUNCTIONS=YES `
# -D FIREBASE_INCLUDE_STORAGE=YES `
# -D FIREBASE_USE_BORINGSSL=YES `
# -D MSVC_RUNTIME_LIBRARY_STATIC=NO `
# -D CMAKE_C_FLAGS="/D_HAS_EXCEPTIONS=0 /EHsc-"`
# -D CMAKE_CXX_FLAGS="/D_HAS_EXCEPTIONS=0 /EHsc-" `
# -D CMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded `
# -D HAVE_IOCTLSOCKET_FIONBIO=1 `
# -D FIREBASE_PYTHON_HOST_EXECUTABLE:FILEPATH=${{ steps.python.outputs.python-path }} `
# -D FLATBUFFERS_FLATC_EXECUTABLE=${{ github.workspace }}/BinaryCache/flatbuffers/Release/flatc.exe
#
# - name: Adjust external project build settings for debugging
# run: |
# $names = Get-ChildItem -Path "${{ github.workspace }}/BinaryCache/firebase" -File -Recurse -Filter CMakeLists.txt
# foreach ($name in $names) {
# $fullName = $name.FullName
# powershell ${{ github.workspace }}/SourceCache/firebase-cpp-sdk/build_scripts/windows/fix_cmake_debugflags.ps1 $fullName
# Write-Host "... fixed up debug options for ${fullName}"
# }
#
# - name: Configure firebase after build setting adjustments
# 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_INCLUDE_FUNCTIONS=YES `
# -D FIREBASE_INCLUDE_STORAGE=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: KENDAL DELETE TEST ONLY
uses: actions/download-artifact@v3
with:
name: firebase-windows-${{ matrix.arch }}
path: ${{ github.workspace }}/BuildRoot/Library/firebase
github-tokoen: ${{ secrets.GITHUB_TOKEN }}
run-id: 9066443770

- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Compress-Archive -Path "${{ github.workspace }}/BuildRoot/Library/firebase" -DestinationPath firebase-windows-${{ matrix.arch }}.zip
$SHA256 = Get-FileHash -Path firebase-windows-${{ matrix.arch }}.zip -Algorithm SHA256 > firebase-windows-${{ matrix.arch }}.zip.sha256
$Date = Get-Date -Format 'yyyyMMdd'
$Release = $(gh release list -R ${{ github.repository }} | Select-String -Pattern $Date -AllMatches).Count
gh release create "$Date.$Release" -R ${{ github.repository }}
gh release upload "$Date.$Release" firebase-windows-${{ matrix.arch }}.zip -R ${{ github.repository }}
gh release upload "$Date.$Release" firebase-windows-${{ matrix.arch }}.zip.sha256 -R ${{ github.repository }}
# - name: Create Release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# Compress-Archive -Path "${{ github.workspace }}/BuildRoot/Library/firebase" -DestinationPath firebase-windows-${{ matrix.arch }}.zip
# $SHA256 = Get-FileHash -Path firebase-windows-${{ matrix.arch }}.zip -Algorithm SHA256 > firebase-windows-${{ matrix.arch }}.zip.sha256
# $Date = Get-Date -Format 'yyyyMMdd'
# $Release = $(gh release list -R ${{ github.repository }} | Select-String -Pattern $Date -AllMatches).Count
# gh release create "$Date.$Release" -R ${{ github.repository }}
# gh release upload "$Date.$Release" firebase-windows-${{ matrix.arch }}.zip -R ${{ github.repository }}
# gh release upload "$Date.$Release" firebase-windows-${{ matrix.arch }}.zip.sha256 -R ${{ github.repository }}
#
- name: Print built libraries
run: Get-ChildItem -Recurse -Name -Path ${{ github.workspace }}\BuildRoot\Library\firebase -Include *.lib

Expand All @@ -163,7 +171,7 @@ jobs:
$XMLLibFiles=""
$LibFileNames=(Get-ChildItem -Name -Recurse -Path ${{ github.workspace }}\BuildRoot\Library\firebase -Include *.lib)
foreach ($LibFileName in $LibFileNames) {
$XMLLibFiles += "<file src=`"```$BUILDROOT```$$LibFileName`" target=`"lib`" />`n"
$XMLLibFiles += " <file src=`"``$BUILDROOT``$\$LibFileName`" target=`"lib`" />`n"
}
@"
Expand Down

0 comments on commit b0e5859

Please sign in to comment.