Skip to content

Commit

Permalink
andy2
Browse files Browse the repository at this point in the history
  • Loading branch information
hyp committed May 17, 2024
1 parent d9e33cd commit 278c127
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions .github/workflows/bcny-firebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -336,13 +336,6 @@ jobs:
- name: Install absl-py
run: pip install absl-py

- name: Build SDK
shell: bash
if: false
run: |
cd ${{ github.workspace }}/SourceCache/firebase-cpp-sdk
build_scripts/android/build.sh android_build .
- name: Build
run: |
echo "NDK: $NDK_ROOT"
Expand All @@ -362,17 +355,19 @@ jobs:
-DANDROID_ABI=$arch \
-DANDROID_PLATFORM=android-19 \
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=$dst_dir/$module/build/intermediates/cmake/release/obj/$arch \
-D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/firebase/usr \
-DCMAKE_BUILD_TYPE=Release \
-DANDROID_NDK=$ndk_dir \
-DCMAKE_TOOLCHAIN_FILE=$ndk_dir/build/cmake/android.toolchain.cmake \
-GNinja \
-DFIREBASE_INCLUDE_LIBRARY_DEFAULT=OFF \
-D FIREBASE_GITHUB_ACTION_BUILD=YES \
$extra_params"
echo "Configuring $module..."
eval "$config_command"
build_command="cmake --build $dst_dir/$module/.externalNativeBuild/cmake/release/$arch"
echo "Building $module..."
eval "$build_command"
cmake --build $dst_dir/$module/.externalNativeBuild/cmake/release/$arch
cmake --build $dst_dir/$module/.externalNativeBuild/cmake/release/$arch -- install
}
arch="${{ matrix.arch }}"
cd ${{ github.workspace }}/SourceCache/firebase-cpp-sdk
Expand All @@ -394,3 +389,18 @@ jobs:
cmake_build $arch "auth" "-DFIREBASE_CPP_USE_PRIOR_GRADLE_BUILD=ON -DFIREBASE_INCLUDE_AUTH=ON"
cmake_build $arch "functions" "-DFIREBASE_CPP_USE_PRIOR_GRADLE_BUILD=ON -DFIREBASE_INCLUDE_FUNCTIONS=ON"
cmake_build $arch "remote_config" "-DFIREBASE_CPP_USE_PRIOR_GRADLE_BUILD=ON -DFIREBASE_INCLUDE_REMOTE_CONFIG=ON"
- name: Install (manual)
run: |
echo "Copying static libraries ..."
source="${{ github.workspace }}/SourceCache/firebase-cpp-sdk"
destination_dir=${{ github.workspace }}/BuildRoot/Library/firebase/usr/libs/android/${{ matrix.arch }}
while IFS= read -r file; do
cp "$file" "$destination_dir"
echo "Copied: $file"
done < <(find $source -type f -name "*.a")

- uses: actions/upload-artifact@v3
with:
name: firebase-android-${{ matrix.arch }}
path: ${{ github.workspace }}/BuildRoot/Library/firebase

0 comments on commit 278c127

Please sign in to comment.