Skip to content

Commit

Permalink
sanity_checks: Skip check for platform specific dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
xclaesse authored and eli-schwartz committed Sep 28, 2022
1 parent 554b830 commit 76b08c4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ meson compile -C builddir
only on Linux CI.
- `fatal_warnings`: (Optional) If set to `false` removes --fatal-meson-warning.
Use this only when there is no other way to fix the warning.
- `skip_dependency_check`: (Optional) List of platform specific dependency
names that are not always provided by the project.

- Test locally by running `tools/sanity_checks.py` script. It will be executed
on the CI and must always return success before merging any PR.
Expand Down
4 changes: 4 additions & 0 deletions ci_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@
"_comment": "- Disable unit tests because upstream does not run them on Windows and some are flaky on Linux.",
"build_options": [
"glib:tests=false"
],
"skip_dependency_check": [
"gio-windows-2.0",
"gio-unix-2.0"
]
},
"harfbuzz": {
Expand Down
3 changes: 3 additions & 0 deletions tools/sanity_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,9 @@ def check_new_release(self, name: str, builddir: str = '_build', deps=None, prog
elif not ci.get('build_on', {}).get(system, True):
expect_working = False

skip_deps = ci.get('skip_dependency_check', [])
deps = [d for d in deps if d not in skip_deps]

options = ['-Dpython.install_env=auto', f'-Dwraps={name}']
options.append('-Ddepnames={}'.format(','.join(deps or [])))
options.append('-Dprognames={}'.format(','.join(progs or [])))
Expand Down

0 comments on commit 76b08c4

Please sign in to comment.