4 Please try and stick to the GNU coding standards. A lot of hard work
5 went into making Check compatible with the standards, and would be
6 nice if that work didn't erode. I decided on the standards because
7 they work well for a lot of programs much bigger than Check. Ok,
8 since you're wondering, the advantages of sticking to the standards
11 1) consistent style within the project
13 2) being familiar with the standards lets you work on lots of
14 different GNU standards-compliant projects pretty easily
16 3) it reduces the number of decisions that must be made
18 Doxygen Reference for Development
21 You can use `doc/doxygen-devel` target to generate a verbose doxygen reference.
22 Resulting documentation will be placed into `doc/doxygen-devel`. This option
23 needs graphviz installed to render call graphs. If graphviz is not found they
29 To create a release one will need to be a member of the libcheck organization
30 on GitHub. If you are not a member, a current member can add you
32 https://github.com/orgs/libcheck/people
33 and submitting an invite.
35 1) To create a release, start in a configured in-place
36 checkout of the Check project:
38 $ git clone https://github.com/libcheck/check.git
41 2) Determine the version of Check to release, and update
42 the configure.ac script:
44 AC_INIT([Check], [0.10.1], [check-devel at lists dot sourceforge dot net])
46 CHECK_MINOR_VERSION=10
49 (Remember to update both the AC_INIT line and each of the CHECK_*_VERSION fields).
51 3) Update the header in the NEWS file to mention the release:
53 Sun Aug 2, 2015: Released Check 0.10.1
54 2015-08-02 19:21:14 +0000
55 based on hash f399542eeceb97703bca496b68bb39044e8baa01
57 4) Update index.html mentioning the release. Look for the following:
58 <!-- Update this section during a release -->
60 5) Attempt to build the release locally
66 If this passes, a tarball with the current release number will be in the current
67 directory. Make note of this, as it will be uploaded to GitHub later.
69 6) Commit the changes to configure.ac, NEWS, and index.html to the Check project's
70 master branch, with the commit message:
73 7) Log On to GitHub and navigate to:
75 https://github.com/libcheck/check/releases
77 Click "Draft a New Release".
79 Enter the release version to the Tag Version box, and enter the
80 git hash into the Target selector.
82 Fill in the Release Title field.
84 Describe the release with something similar to the following:
86 <some sentence about the release, e.g. "This is a bug fix release.">
87 Please test it out and report any problems you might have.
90 <paste contents of NEWS here for the release>
93 Attach the tarball for the release, then publish the release.
95 8) Use the following template to announce the release via email:
97 Subject: check-X.Y.Z released
100 <some sentence about the release, e.g. "This is a bug fix release.">
101 Please test it out and report any problems you might have.
103 https://github.com/libcheck/check/releases
108 <paste contents of NEWS for the release here>
111 9) Update the development header in the NEWS file and commit the result.
113 10) Push updated website (see section below)
115 Congratulations, you are done!
121 The Check website is automatically hosted from the contents of
122 the gh-pages branch in the Check git repository. To update
123 the website, merge the contents of the master branch into
126 To update the generated documentation for the website:
129 github https://github.com/libcheck/check.git (fetch)
130 github https://github.com/libcheck/check.git (push)
132 $ git checkout github/gh-pages -b gh-pages
133 Branch gh-pages set up to track remote branch gh-pages from github.
134 Switched to a new branch 'gh-pages'
135 $ git merge github/master
136 First, rewinding head to replay your work on top of it...
137 Fast-forwarded gh-pages to github/master.
142 $ make doc/check_html
145 $ git commit -m “Update documentation”
146 $ git push github gh-pages:gh-pages
149 Automatic building of pull requests
152 The GitHub project is configured to build pull requests either when
153 asked or automatically. This is done using the GitHub Pull Request
154 Builder Plugin. Documentation here:
156 https://wiki.jenkins-ci.org/display/JENKINS/GitHub+pull+request+builder+plugin
158 When a new pull request is opened in the project and the author of the pull request
159 isn't white-listed, builder will ask "Can one of the admins verify this patch?".
161 An admin can add one of the following comments to the pull request:
162 "ok to test" to accept this pull request for testing
163 "test this please" for a one time test run
164 "add to whitelist" to add the author to the whitelist
166 If the build fails for other various reasons you can rebuild.
168 "retest this please" to start a new build
170 When a build is triggered a job on the Jenkins instance will start:
172 https://check.ci.cloudbees.com/job/github-merge-builder/
174 When complete, a comment will be added to the pull request, informing
177 An admin can be added to the Jenkins instance by adding a username
178 to the "Admin list" setting under the "GitHub Pull Request Builder"
181 https://check.ci.cloudbees.com/configure
183 This works because there is a user in the libcheck organization,
184 "check-builder", which the Jenkins instance uses to install a
185 git hook and push comments to pull requests.
191 The gcov tool can be used to determine the unit test coverage in Check
192 itself. This is currently supported on GNU/Linux only. To enable the
193 necessary build time flags, add the following argument to the
198 Once the unit tests have been run with
202 assuming the terminal is in the top src directory, the following will
203 generate summary information using gcov:
205 $ cp src/*.c src/.libs/
207 $ for file in `ls *.c`; do
208 gcov -f $file > $file.gcov.summary.txt
209 mv $file.gcov $file.gcov.txt
212 The *.gcov.txt files will contain the source code annotated with
213 the number of times each line was executed. The .*gcov.summary.txt
214 files will contain a line execution summary per function.
216 To determine the line execution summary for all of Check, either
217 the gcovr tool can be used, or the following quick-and-dirty script:
219 $ for file in ls *.summary.txt; do cat $file; done \
220 | grep "Lines executed" | cut -d ":" -f 2 | tr -d "%" \
221 | awk '{checked+=$1*$3/100; total+=$3} END {print checked/total*100}'