You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CONTRIBUTING.md
+38-53
Original file line number
Diff line number
Diff line change
@@ -68,8 +68,8 @@ Our contribution process works in three main stages:
68
68
```
69
69
2. Code Review and CI tests
70
70
* Ensure CI tests pass:
71
-
* Before sharing anything to the community, make sure that all CI tests pass on your local fork.
72
-
See our section on setting up your CI environment for more information on how to do this.
71
+
* Before sharing anything to the community, create a pull request in your own fork against the dev branch
72
+
and make sure that all GitHub Actions CI tests pass. See the Continuous Integration section below for more information.
73
73
* Ensure that static analysis passes on your development machine. See the Static Analysis section
74
74
below to see how to do this.
75
75
* Create a pull request:
@@ -140,6 +140,42 @@ It can be useful to look at additional static analyzers once in a while (and we
140
140
141
141
This is different from running a static analyzer once in a while, looking at the output, and __cherry picking__ a few warnings that seem helpful, either because they detected a genuine risk of bug, or because it helps expressing the code in a way which is more readable or more difficult to misuse. These kind of reports can be useful, and are accepted.
142
142
143
+
## Continuous Integration
144
+
CI tests run every time a pull request (PR) is created or updated. The exact tests
145
+
that get run will depend on the destination branch you specify. Some tests take
146
+
longer to run than others. Currently, our CI is set up to run a short
147
+
series of tests when creating a PR to the dev branch and a longer series of tests
148
+
when creating a PR to the release branch. You can look in the configuration files
149
+
of the respective CI platform for more information on what gets run when.
150
+
151
+
Most people will just want to create a PR with the destination set to their local dev
152
+
branch of zstd. You can then find the status of the tests on the PR's page. You can also
153
+
re-run tests and cancel running tests from the PR page or from the respective CI's dashboard.
154
+
155
+
Almost all of zstd's CI runs on GitHub Actions (configured at `.github/workflows`), which will automatically run on PRs to your
156
+
own fork. A small number of tests run on other services (e.g. Travis CI, Circle CI, Appveyor).
157
+
These require work to set up on your local fork, and (at least for Travis CI) cost money.
158
+
Therefore, if the PR on your local fork passes GitHub Actions, feel free to submit a PR
159
+
against the main repo.
160
+
161
+
### Third-party CI
162
+
A small number of tests cannot run on GitHub Actions, or have yet to be migrated.
163
+
For these, we use a variety of third-party services (listed below). It is not necessary to set
164
+
these up on your fork in order to contribute to zstd; however, we do link to instructions for those
| Travis CI | Used for testing on non-x86 architectures such as PowerPC | https://docs.travis-ci.com/user/tutorial/#to-get-started-with-travis-ci-using-github <br> https://github.com/marketplace/travis-ci | `.travis.yml` |
170
+
| AppVeyor | Used for some Windows testing (e.g. cygwin, mingw) | https://www.appveyor.com/blog/2018/10/02/github-apps-integration/ <br> https://github.com/marketplace/appveyor | `appveyor.yml` |
171
+
| Cirrus CI | Used for testing on FreeBSD | https://github.com/marketplace/cirrus-ci/ | `.cirrus.yml` |
172
+
| Circle CI | Historically was used to provide faster signal,<br/> but we may be able to migrate these to Github Actions | https://circleci.com/docs/2.0/getting-started/#setting-up-circleci <br> https://youtu.be/Js3hMUsSZ2c <br> https://circleci.com/docs/2.0/enable-checks/ | `.circleci/config.yml` |
173
+
174
+
Note: the instructions linked above mostly cover how to set up a repository with CI from scratch.
175
+
The general idea should be the same for setting up CI on your fork of zstd, but you may have to
176
+
follow slightly different steps. In particular, please ignore any instructions related to setting up
177
+
config files (since zstd already has configs for each of these services).
178
+
143
179
## Performance
144
180
Performance is extremely important for zstd and we only merge pull requests whose performance
145
181
landscape and corresponding trade-offs have been adequately analyzed, reproduced, and presented.
0 commit comments