diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc975b4b83..315f3a25b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -170,13 +170,37 @@ jobs: with: ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} + - name: Android FTE - test jh + run: | + ./bin/android-functions.sh --android-fte --yes-deps --test-jh + env: + VERBOSE: 1 + NO_IOS: 1 + CI: true + SSC_ANDROID_CI: true + ANDROID_SUPPORTED_ABIS: x86_64 + JAVA_HOME: "" + NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_PAT }} + + - name: Android FTE + run: | + ./bin/android-functions.sh --android-fte --yes-deps + env: + VERBOSE: 1 + DEBUG: 1 + NO_IOS: 1 + CI: true + SSC_ANDROID_CI: true + ANDROID_SUPPORTED_ABIS: x86_64 + JAVA_HOME: "" + NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_PAT }} + - name: install Socket Runtime deps run: | brew install automake - name: Build Socket Runtime run: | - ./bin/android-functions.sh --android-fte --yes-deps ./bin/install.sh ./bin/ci_version_check.sh env: diff --git a/bin/android-functions.sh b/bin/android-functions.sh index c08b366710..0213b010d6 100755 --- a/bin/android-functions.sh +++ b/bin/android-functions.sh @@ -70,7 +70,7 @@ function get_android_default_search_paths() { JAVA_HOME_SEARCH_PATHS+=("$HOME/.local/bin") JAVA_HOME_SEARCH_PATHS+=("$HOME/Applications") JAVA_HOME_SEARCH_PATHS+=("$HOME/homebrew") - JAVA_HOME_SEARCH_PATHS+=("/Applications") + [[ -z "$CI" ]] && JAVA_HOME_SEARCH_PATHS+=("/Applications") elif [[ "$host" = "Linux" ]]; then ANDROID_HOME_SEARCH_PATHS+=("$HOME") JAVA_HOME_SEARCH_PATHS+=("$HOME/.local/bin") @@ -748,11 +748,15 @@ function android_fte() { local set_exit_code="" [[ -n "$android_fte" ]] && return 0 + [[ "$CI" == "true" ]] && export JAVA_HOME="" + + echo "JAVA_HOME: $JAVA_HOME" while (( $# > 0 )); do declare arg="$1"; shift [[ "$arg" == "--yes-deps" ]] && pass_yes_deps="$arg" [[ "$arg" == "--exit-code" ]] && set_exit_code="1" + [[ "$arg" == "--test-jh" ]] && exit 0 done android_fte=1 @@ -782,6 +786,7 @@ function android_fte() { if [[ -n "$ANDROID_HOME" ]]; then write_log "h" "# Ensuring Android dependencies are installed" + [[ -n "$CI" ]] && write_log "d" "# JAVA_HOME: $JAVA_HOME" write_log "d" "$yes | $(unix_path "$ANDROID_HOME/$ANDROID_SDK_MANAGER")" "$SDK_OPTIONS" # Without eval, sdk manager says there is a syntax error eval "$yes | ($(unix_path "$ANDROID_HOME/$ANDROID_SDK_MANAGER") $SDK_OPTIONS)"