Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Development

Jeff Kaufman edited this page Jan 10, 2017 · 38 revisions

Getting Started

New Developers

  1. If you don't have a github account, make one. Then set up ssh keys

  2. Fork the ngx_pagespeed and mod_pagespeed repos

(Note: if you're a committer, skip the forking and see below instead.)

  1. Set up a development client:
# set this to your ngx_pagespeed fork's url
git clone YOUR_NGX_PAGESPEED_FORK
cd ngx_pagespeed
git submodule update --init --recursive

# edit .git/config to change the repo url for mod_pagespeed to be
# the one for your fork

scripts/build_ngx_pagespeed.sh --devel

This will put an ngx_pagespeed checkout in your current directory, download mod_pagespeed, apache, and nginx inside that, then build PSOL, apache, and nginx from source. It will put the apache it builds in ~/apache2, because you only have to build it once and multiple checkouts/branches can share the same copy.

  1. Make changes to files.

  2. Run tests:

cd ~/ngx_pagespeed/testing_dependencies/mod_pagespeed/devel
make apache_test  # unit tests
make apache_debug_smoke_test  # system tests
make apache_debug_leak_test  # unit tests and smoke tests under valgrind
./checkin  # those tests, and many more, very slow

cd ~/ngx_pagespeed/
test/run_tests.sh
  1. Submit your changes back as a pull request. You'll need to make separate pull requests for ngx_pagespeed and mod_pagespeed changes

Committers

If you're a mod_pagespeed committer, then you don't need to fork, but you do need to change the subresource urls from https:// to git:// . So:

git clone git@github.com:pagespeed/ngx_pagespeed.git
cd ngx_pagespeed
scripts/build_ngx_pagespeed.sh --devel

When pushing to github for a pull request, prefix your branch with your username. For example, I might call a branch jefftk-fix-submodules.

Developing

If you're developing mod_pagespeed, here are some other things you're likely to need:

Clone this wiki locally