Skip to content

Commit

Permalink
Update bcny-firebase.yml
Browse files Browse the repository at this point in the history
Enable support for ARM64.  Add a matrix to allow building the x64 and ARM64 slices of the SDK.
  • Loading branch information
compnerd committed Sep 30, 2023
1 parent 4135f29 commit 525211e
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions .github/workflows/bcny-firebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ 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:
Expand All @@ -18,8 +27,8 @@ jobs:
- uses: compnerd/gha-setup-vsdevenv@main
with:
host_arch: amd64
components: 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64'
arch: amd64
components: 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64;Microsoft.VisualStudio.Component.VC.Tools.ARM64'
arch: ${{ matrix.arch }}

- uses: actions/setup-python@v4
with:
Expand All @@ -36,7 +45,7 @@ jobs:
-D CMAKE_BUILD_TYPE=Release `
-D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/firebase/usr `
-G "Visual Studio 17 2022" `
-A x64 `
-A ${{ matrix.platform }} `
-S ${{ github.workspace }}/SourceCache/firebase-cpp-sdk `
-D FIREBASE_CPP_BUILD_PACKAGE=YES `
-D FIREBASE_INCLUDE_LIBRARY_DEFAULT=OFF `
Expand All @@ -53,18 +62,15 @@ jobs:
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}"
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-amd64
name: firebase-windows-${{ matrix.arch }}
path: ${{ github.workspace }}/BuildRoot/Library/firebase

0 comments on commit 525211e

Please sign in to comment.