Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pytorch] consolidate android gradle build scripts #39999

Closed
wants to merge 5 commits into from

Conversation

ljk53
Copy link
Contributor

@ljk53 ljk53 commented Jun 14, 2020

Stack from ghstack:

Summary:
Cleaned up the android build scripts. Consolidated common functions into
common.sh. Also made a few minor fixes:

  • We should trust build_android.sh doing right about reusing existing
    build_android_$abi directory;

  • We should clean up pytorch_android/src/main/jniLibs/ to remove
    broken symbolic links in case custom abi list changes since last build;

Differential Revision: D22036926

Summary:
Cleaned up the android build scripts. Consolidated common functions into
common.sh. Also made a few minor fixes:

- We should trust build_android.sh doing right about reusing existing
  `build_android_$abi` directory;

- We should clean up `pytorch_android/src/main/jniLibs/` to remove
  broken symbolic links in case custom abi list changes since last build;

[ghstack-poisoned]
@@ -4,42 +4,10 @@ set -eux
PYTORCH_DIR="$(cd $(dirname $0)/..; pwd -P)"
PYTORCH_ANDROID_DIR=$PYTORCH_DIR/android

echo "ANDROID_HOME:$ANDROID_HOME"
if [ ! -z "$ANDROID_HOME" ]; then
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be if [ -z instead of if [ ! -z. It's fixed in the master build script but not here - consolidating these functions can avoid this type of inconsistency.

@ljk53 ljk53 requested review from IvanKobzarev and dreiss June 14, 2020 00:48
@dr-ci
Copy link

dr-ci bot commented Jun 14, 2020

💊 CI failures summary and remediations

As of commit 1f597a0 (more details on the Dr. CI page):


  • 1/1 failures possibly* introduced in this PR
    • 1/1 non-CircleCI failure(s)

ci.pytorch.org: 1 failed


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 14 times.

Summary:
Cleaned up the android build scripts. Consolidated common functions into
common.sh. Also made a few minor fixes:

- We should trust build_android.sh doing right about reusing existing
  `build_android_$abi` directory;

- We should clean up `pytorch_android/src/main/jniLibs/` to remove
  broken symbolic links in case custom abi list changes since last build;

[ghstack-poisoned]
ljk53 added a commit that referenced this pull request Jun 14, 2020
Summary:
Cleaned up the android build scripts. Consolidated common functions into
common.sh. Also made a few minor fixes:

- We should trust build_android.sh doing right about reusing existing
  `build_android_$abi` directory;

- We should clean up `pytorch_android/src/main/jniLibs/` to remove
  broken symbolic links in case custom abi list changes since last build;

ghstack-source-id: 2a17dd19dd151507fecd7ddf2b68fa609ebb4e88
Pull Request resolved: #39999
Summary:
Cleaned up the android build scripts. Consolidated common functions into
common.sh. Also made a few minor fixes:

- We should trust build_android.sh doing right about reusing existing
  `build_android_$abi` directory;

- We should clean up `pytorch_android/src/main/jniLibs/` to remove
  broken symbolic links in case custom abi list changes since last build;

Differential Revision: [D22036926](https://our.internmc.facebook.com/intern/diff/D22036926)

[ghstack-poisoned]

if [ ! -x "$(command -v gradle)" ]; then
if [ -z "$GRADLE_HOME" ]; then
echo GRADLE_NOT_FOUND_MSG
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were missing "$" here - fixed in the new revision as well.

Summary:
Cleaned up the android build scripts. Consolidated common functions into
common.sh. Also made a few minor fixes:

- We should trust build_android.sh doing right about reusing existing
  `build_android_$abi` directory;

- We should clean up `pytorch_android/src/main/jniLibs/` to remove
  broken symbolic links in case custom abi list changes since last build;

Differential Revision: [D22036926](https://our.internmc.facebook.com/intern/diff/D22036926)

[ghstack-poisoned]
ljk53 added a commit that referenced this pull request Jun 15, 2020
Summary:
Cleaned up the android build scripts. Consolidated common functions into
common.sh. Also made a few minor fixes:

- We should trust build_android.sh doing right about reusing existing
  `build_android_$abi` directory;

- We should clean up `pytorch_android/src/main/jniLibs/` to remove
  broken symbolic links in case custom abi list changes since last build;

ghstack-source-id: 2f16bafc83351b6efeac07ce186438c95eee3f13
Pull Request resolved: #39999
Summary:
Cleaned up the android build scripts. Consolidated common functions into
common.sh. Also made a few minor fixes:

- We should trust build_android.sh doing right about reusing existing
  `build_android_$abi` directory;

- We should clean up `pytorch_android/src/main/jniLibs/` to remove
  broken symbolic links in case custom abi list changes since last build;

Differential Revision: [D22036926](https://our.internmc.facebook.com/intern/diff/D22036926)

[ghstack-poisoned]
ljk53 added a commit that referenced this pull request Jun 16, 2020
Summary:
Cleaned up the android build scripts. Consolidated common functions into
common.sh. Also made a few minor fixes:

- We should trust build_android.sh doing right about reusing existing
  `build_android_$abi` directory;

- We should clean up `pytorch_android/src/main/jniLibs/` to remove
  broken symbolic links in case custom abi list changes since last build;

ghstack-source-id: 4021b4016c980851d201ab7dc9fc0e03c6fac8ef
Pull Request resolved: #39999
@facebook-github-bot
Copy link
Contributor

@ljk53 merged this pull request in bcb4479.

@facebook-github-bot facebook-github-bot deleted the gh/ljk53/146/head branch June 19, 2020 14:16
xwang233 pushed a commit to xwang233/pytorch that referenced this pull request Jun 20, 2020
Summary:
Pull Request resolved: pytorch#39999

Cleaned up the android build scripts. Consolidated common functions into
common.sh. Also made a few minor fixes:

- We should trust build_android.sh doing right about reusing existing
  `build_android_$abi` directory;

- We should clean up `pytorch_android/src/main/jniLibs/` to remove
  broken symbolic links in case custom abi list changes since last build;

Test Plan: Imported from OSS

Differential Revision: D22036926

Pulled By: ljk53

fbshipit-source-id: e93915ee4f195111b6171cdabc667fa0135d5195
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants