Skip to content

Commit 547dad3

Browse files
committed
ci: run make sparse as a GitHub workflow
Occasionally we receive reviews after patches were integrated, where `sparse` (https://sparse.docs.kernel.org/en/latest/ has more information on that project) identified problems such as file-local variables or functions being declared as global. By running `sparse` as part of our Continuous Integration, we can catch such things much earlier. Even better: developers who activated GitHub Actions on their forks can catch such issues before even sending their patches to the Git mailing list. This addresses gitgitgadget#345 Note: since we cannot easily replicate the same on Travis (due to the absence of the GitHub Action `get-azure-pipelines-artifact`), we keep this separate from the standard CI/PR definition (which exists both as a GitHub workflow as well as a Travis CI definition). Signed-off-by: Johannes Schindelin <[email protected]>
1 parent ebf3c04 commit 547dad3

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/run-sparse.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Run `sparse`
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
sparse:
7+
runs-on: ubuntu-20.04
8+
steps:
9+
- name: Download the `sparse` package
10+
uses: git-for-windows/get-azure-pipelines-artifact@v0
11+
with:
12+
repository: git/git
13+
definitionId: 10
14+
artifact: sparse-20.04
15+
- name: Install the `sparse` package
16+
run: sudo dpkg -i sparse-20.04/sparse_*.deb
17+
- name: Install a couple of dependencies
18+
run: |
19+
sudo apt-get install -q -y libssl-dev libcurl4-openssl-dev libexpat-dev gettext zlib1g-dev
20+
- uses: actions/checkout@v2
21+
- run: make sparse
22+

0 commit comments

Comments
 (0)