This repository has been archived by the owner on May 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run C++ and Java tests in GitHub action (#8)
Summary: Depends on facebookincubator/fbjni#4. Pull Request resolved: facebookincubator/fbjni#8 Reviewed By: dreiss Differential Revision: D17604714 Pulled By: passy fbshipit-source-id: 0b42991c9600ef8c910d6851e87b058ce4772b93
- Loading branch information
1 parent
1e2e5f3
commit 331ccf6
Showing
3 changed files
with
27 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
set -exo pipefail | ||
|
||
BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )/.." | ||
CMAKE=$ANDROID_HOME/cmake/3.10.2.4988404/bin/cmake | ||
|
||
mkdir -p "$BASE_DIR/host-build-cmake" | ||
cd "$BASE_DIR/host-build-cmake" | ||
|
||
# Configure CMake project | ||
$CMAKE -DJAVA_HOME="$JAVA_HOME" .. | ||
# Build binaries and libraries | ||
make | ||
# Run C++ tests | ||
make test | ||
# LD_LIBRARY_PATH is needed for native library dependencies to load cleanly | ||
TEST_LD_LIBRARY_PATH="$BASE_DIR/host-build-cmake:$BASE_DIR/host-build-cmake/test/jni" | ||
# Build and run JNI tests | ||
cd "$BASE_DIR" | ||
env LD_LIBRARY_PATH="$TEST_LD_LIBRARY_PATH" ./gradlew -b host.gradle -PbuildDir=host-build-gradle test |