CI: apkbuild-linting: Use a single invocation
This replaces the current loop calling pmbootstrap lint
once for each package with a single invocation for increased performance.
Here are some measurements for linting all packages under main/
.
Before this change:
$ time .gitlab-ci/apkbuild-linting.py > /dev/null
real 3m55,840s
user 3m48,592s
sys 0m16,913s
After this change but without postmarketOS/pmbootstrap!2100:
$ time .gitlab-ci/apkbuild-linting.py > /dev/null
real 0m14,359s
user 0m17,994s
sys 0m6,488s
After this change with postmarketOS/pmbootstrap!2100:
$ time .gitlab-ci/apkbuild-linting.py > /dev/null
real 0m6,411s
user 0m13,334s
sys 0m2,417s
Note that postmarketOS/pmbootstrap!2100 is not required for that little bit of extra performance but rather because it allows to differentiate between linting errors for different packages in the output.
Linting issues are still only printed at the end and not while they stream in. However, the performance increase is so massive that this probably doesn't make a huge difference anymore.
Depends: postmarketOS/pmbootstrap!2100
Closes: #564 (closed)
Merge request reports
Activity
added ci type::feature labels
wow, nice improvement. I think the vast majority of merge requests just touch 1 or two packages (and not entire directories of packages like in your test), but I think the code changes here simplify things a lot, and it's a lot nicer than invoking pmbootstrap multiple times when only a single call is enough.
By clayton craft on 2021-08-30T15:37:05
So does this have a hard dependency on pmbootstrap!2100 (merged) or this can be merged first?
By Alexey Min on 2021-09-01T08:48:47
I think it's a hard dependency in that if we merge this before pmbootstrap!2100 (merged) is merged (and released?), then you won't be able to differentiate between packages in the output.
With both changes, it'll look like this:
MP:[AL32]:./cross/arch-bin-masquerade/APKBUILD:37:unnecessary usage of braces: ${_bin} MP:[AL32]:./cross/arch-bin-masquerade/APKBUILD:37:unnecessary usage of braces: ${_hostspec} MC:[AL29]:./temp/arm-trusted-firmware/APKBUILD:12:$pkgname should not be used in the source url MP:[AL32]:./cross/ccache-cross-symlinks/APKBUILD:31:unnecessary usage of braces: ${_bin}
Without pmbootstrap!2100 (merged), it'll look like this:
MP:[AL32]:./APKBUILD:37:unnecessary usage of braces: ${_bin} MP:[AL32]:./APKBUILD:37:unnecessary usage of braces: ${_hostspec} MC:[AL29]:./APKBUILD:12:$pkgname should not be used in the source url MP:[AL32]:./APKBUILD:31:unnecessary usage of braces: ${_bin}
By Johannes Marbach on 2021-09-01T08:59:44
Edited by Ghost User- Resolved by Administrator
This LGTM, but is it ready to be merged? I think so as https://gitlab.com/postmarketOS/pmbootstrap/-/merge_requests/2100 has been merged.
By Dylan Van Assche on 2021-09-05T18:37:41
Edited by Ghost User
added 61 commits
-
396da6a7...093488b8 - 60 commits from branch
postmarketOS:master
- 14d2eda4 - CI: use a single invocation for apkbuild linting (MR 2472)
By Alexey Min on 2021-09-11T03:40:43
-
396da6a7...093488b8 - 60 commits from branch