Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: sort and ignore more paths #5481

Merged
merged 6 commits into from
Nov 25, 2022
Merged

Conversation

kmk3
Copy link
Collaborator

@kmk3 kmk3 commented Nov 24, 2022

Commits:

$ git log --reverse --pretty='* %s' master..
* ci: sort items on paths-ignore lists
* ci: ignore github markdown templates in all workflows
* ci: ignore dependabot and gitlab-ci in all workflows
* ci: ignore codeql workflow file in other workflows
* ci: ignore firecfg.config in the codeql workflow
* ci: ignore man/vim paths in build-extra/codeql workflows

Sort the paths and then ignore unnecessary files (mainly ignore workflow files
in other workflows).

Relates to #5249.

Kind of relates to #5289 #5296.

Copy link
Collaborator

@glitsj16 glitsj16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

kmk3 added 6 commits November 24, 2022 19:21
Leave quotes only on paths with wildcards so that they are sorted before
normal paths, then sort everything.

Note that in the current workflow files, ignored directories always use
wildcards, so this also ensures that ignored directories (along with all
other paths with wildcards) are always listed before ignored files
(similarly to `--group-directories-first` in GNU `ls`).

This order is similar to the one on
.github/workflows/profile-checks.yml.
Ensure that the following paths are ignored everywhere:

- '.github/ISSUE_TEMPLATE/*'
- .github/pull_request_template.md

To avoid running CI unnecessarily.

Currently, they're only ignored on .github/workflows/build-extra.yml.
Ensure that the following files are ignored everywhere:

- .github/dependabot.yml
- .gitlab-ci.yml

To avoid running CI unnecessarily.
Ensure that the following file is ignored everywhere, except on its own
workflow:

- .github/workflows/codeql-analysis.yml

To avoid running CI unnecessarily.

This should also make the CI checks finish faster on most PRs opened by
dependabot, as they're often only about bumping the version of
codeql-action and are opened about once a week (see
.github/dependabot.yml).
Ignore the following file:

- src/firecfg/firecfg.config

To avoid running CodeQL when only adding a new profile.

Note: This is already ignored on .github/workflows/build-extra.yml since
commit 23ea15f ("Add some more paths-ignore to build-extra.yml",
2021-04-24).

Misc: I noticed this on netblue30#5289.
Ignore the following paths:

- 'contrib/vim/**'
- 'src/man/*.txt'

To avoid running CI unnecessarily.

Note: build-extra essentially only builds with clang and runs linters on
the C code, so changes to the man pages and vim files should not affect
the result.

Do not ignore them on .github/workflows/build.yml because they are part
of DISTFILES (see the root Makefile).

Misc: I noticed this on netblue30#5296 (man pages).
@kmk3 kmk3 force-pushed the ci-sort-ignore-paths branch from 3e1f885 to 2499a3b Compare November 24, 2022 22:24
@kmk3
Copy link
Collaborator Author

kmk3 commented Nov 24, 2022

Force-push changes:

All directories appear to be using wildcards, so I put them also on the vim
path (contrib/vim -> 'contrib/vim/**').

Not sure if it's required or not, as they appear to always be used in the docs:

But I also noticed the following and added it to the first commit message:

Note that in the current workflow files, ignored directories always use
wildcards, so this also ensures that ignored directories (along with all
other paths with wildcards) are always listed before ignored files
(similarly to --group-directories-first in GNU ls).

@netblue30
Copy link
Owner

Cool!

@netblue30 netblue30 merged commit 1f1dcf0 into netblue30:master Nov 25, 2022
@kmk3 kmk3 deleted the ci-sort-ignore-paths branch November 25, 2022 16:34
kmk3 added a commit that referenced this pull request Nov 25, 2022
kmk3 added a commit that referenced this pull request Nov 27, 2022
See commit 9bf5e45 ("ci: sort items on paths-ignore lists",
2022-07-12) / PR #5481 for details.
kmk3 added a commit that referenced this pull request Nov 28, 2022
To avoid running CI unnecessarily.

Misc: I noticed this on commit a42c1de ("profile-checks.yml: sort
paths-ignore", 2022-11-27).  See also commit 768410c ("Run
profile-ckeck on workflow edits", 2022-11-27).

Relates to #5481.
kmk3 added a commit to kmk3/firejail that referenced this pull request Jan 28, 2023
See commit 9bf5e45 ("ci: sort items on paths-ignore lists",
2022-07-12) / PR netblue30#5481.
kmk3 added a commit to kmk3/firejail that referenced this pull request Apr 24, 2023
This makes each workflow ignore every other workflow.

Relates to netblue30#5481.
kmk3 added a commit to kmk3/firejail that referenced this pull request Apr 25, 2023
This makes each workflow ignore every other workflow.

Relates to netblue30#5481.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done (on RELNOTES)
Development

Successfully merging this pull request may close these issues.

3 participants