We'd love to accept your patches and contributions to this project. There are just a few small guidelines you need to follow.
Do the following to check out the Android GPU Inspector source code on GitHub:
- Sign up for GitHub at https://github.com/ if you don’t already have an account.
- (Optional) Set up an SSH key to connect to your account using SSH.
- (Optional) Add a GPG signing key to your account.
- Go to the project landing page at https://github.com/google/agi.
- Fork the repository. This creates a copy of the repository in your account.
- Create a work folder on your workstation. The rest of this document assumes
~/work
, adjust as needed. - On your AGI project page, clone your copy of the repository and add it to your local work folder:
cd ~/work git clone <clone-url> cd agi
- Add the Google remote repository to your local repository:
git remote add goog [email protected]:google/agi.git git fetch goog
Use the following commands to configure git for AGI development:
# Assume the remote branch has the same name as your local branch to make pushing changes easier
git config push.default current
# Default to pushing to your fork (assuming the above directions)
git config remote.pushDefault origin
# Make git clean up all the remote tags it creates when you delete remote branches
git config fetch.prune true
git config user.name <your-name> # Add --global to make this a global setting
git config user.email <[email protected]> # Can also be a global setting
# If you added a GPG signing key, run the following commands:
git config user.signingkey <keyid>
git config commit.gpgsign true
Follow the build instructions in the AGI repository.
Contributions to this project must be accompanied by a Contributor License Agreement. You (or your employer) retain the copyright to your contribution, this simply gives us permission to use and redistribute your contributions as part of the project. Head over to https://cla.developers.google.com/ to see your current agreements on file or to sign a new one.
You generally only need to submit a CLA once, so if you've already submitted one (even if it was for a different project), you probably don't need to do it again.
Do the following to contribute to the AGI project:
-
Prepare your changes on a dedicated branch in your local repository:
git checkout -b <my-branch>
-
Make changes, commit the changes, and squash them into a single commit.
-
Make sure you've setup your environment correctly before running the presubmit tests:
# Install clang-format 16 sudo apt-get install -y clang-format-16 export CLANG_FORMAT=clang-format-16 # Provide path for the autopep8 binary (or you can add its location to your PATH) export AUTOPEP8=~/.local/bin/autopep8
-
Run the presubmit script to check code formatting and other things:
./kokoro/presubmit/presubmit.sh
-
Fix potential issues, commit the fix, squash into a single commit again.
-
Re-run presubmit script until it passes without warnings.
-
Check that the tests pass:
bazel test tests
To skip the tests that require a GPU/device connected, run:
bazel test tests --test_tag_filters=-needs_gpu
-
Push to your GitHub repo:
git push
-
Visit https://github.com/google/agi to see a pop-up dialog inviting you to open a PR; click on the dialog to create a PR. See Creating a pull request from a fork for more information.
-
All submissions, including submissions by project members, require review. You can request specific reviewers for your PR or leave the reviewers section blank. An AGI team member will review the request.
Consult GitHub Help for more information on using pull requests.