better-enums/CONTRIBUTING.md
Anton Bachin 124c09f2f0 Sped up the AppVeyor build.
Current AppVeyor images with VC2015 don't have Cygwin pre-installed, so
each row in the build matrix installs it before running the build. This
takes about 7-8 minutes per row.

This change combines all the VC testing into one row, so the price of
installing Cygwin is paid only once. A secondary improvement is that
individual rows don't have to wait in the AppVeyor queue. Builds now
take a total of about 15 minutes, instead of approximately an hour,
including queueing time.

This change should probably be undone once there is an AppVeyor image
that comes with both VC2015 and Cygwin. The main AppVeyor image has VC
up to 2013 and Cygwin, so I suppose VC2015 and Cygwin will be available
once a final version of VC2015 is released.

Until then, Better Enums does not have the benefit of separate rows in
the AppVeyor build matrix.
2015-07-02 18:17:06 -05:00

66 lines
2.8 KiB
Markdown

# Contributing to Better Enums
All contributions are welcome: feedback, documentation changes, and, of course,
pull requests and patch suggestions. A list of contributors is maintained in the
`CONTRIBUTORS` file. I am grateful to everyone mentioned.
## Testing
I typically write small programs to play around with `enum.h`. The `scratch/`
directory is in `.gitignore` for this purpose. Create `scratch/` and feel free
to do anything you want in it. Once your change is nearly complete, you should
run the automated test suite.
While still actively developing, run `make -C test` to do quick builds. Before
submitting your pull request, run `make -C test default-all`. The first command
tests your code on your system compiler in one configuration, and the second
command tests it in all configurations that your compiler supports.
*Configurations* refers to the optional features of Better Enums, such as
`constexpr` string conversion and using an `enum class` for `switch` statements.
Once your pull request is submitted, the [AppVeyor][appveyor] and
[Travis][travis] web services will automatically test it on many versions of
GCC, Clang, and Visual C++. If you have more than one compiler installed
locally, you can run either the `unix` or `ms` target in `test/Makefile` to test
on a specific compiler. Open the `Makefile` file and find the targets for
instructions.
The `make` targets mentioned above depend on the following software:
- Make
- CMake
- Python 2
- [CxxTest][cxxtest]
CxxTest's `bin/` directory has to be in `PATH` and the root `cxxtest/` directory
has to be in whatever environment variable your system compiler uses to search
for header files.
On Windows, you also need [Cygwin][cygwin]. The directory containing
`MSBuild.exe` must be in `PATH`.
The programs in `example/` are generated from the Markdown files in
`doc/tutorial/` and `doc/demo/`. If you have edited the Markdown files, you
should run `make -C test examples` to update the example program sources.
If you have created a new example program or compilation performance test, add
it to `test/CMakeLists.txt`. Search for the name of an existing program, such as
`1-hello-world`, and you should see where to add new ones.
[cygwin]: https://www.cygwin.com
[cxxtest]: http://cxxtest.com
[appveyor]: https://ci.appveyor.com/project/aantron/better-enums
[travis]: https://travis-ci.org/aantron/better-enums
## Commits
Please write descriptive commit messages that follow the 50/72 rule. I am likely
to edit commit messages when merging into `master`. I will also squash multiple
commits in most cases. If you prefer I not do either one, let me know, but then
we will have to go back and forth on the exact contents of the pull request.
## Generating the documentation
To generate an offline copy of the documentation, run `make -C doc`. To view it,
open `doc/html/index.html`.