Commit Graph

171 Commits

Author SHA1 Message Date
L. E. Segovia 3a4cb94e94 ci: Update appleclang job to test Xcode-provided Python 2025-02-04 08:16:23 +05:30
Daniele Nicolodi 74aab8a42c docs: Add a test to validate URLs in markdown/Users.md
Avoid piling up dead URLs.
2025-01-19 20:36:40 +02:00
Dylan Baker 5b39146298 CI: remove codeql
It rarely finds real issues that other scanners (pylint, flake8, mypy)
don't find, and gives lots of useless and annoying errors that clutter
discussions
2025-01-08 00:40:36 +02:00
Jon Turney 836bfb93c4 CI: Use a tagged version of cygwin-install-action
Use a tagged version of cygwin-install-action, rather than whatever
happens to be master at the moment.

This should help isolate meson CI from random breakage there.
2025-01-07 20:47:11 +02:00
Carlo Cabrera 0025805e30 Prioritise Apple's toolchain in project-tests-appleclang
Using Homebrew Clang leads to failures when testing objfw. We probably
want to ensure we use Apple Clang here given the workflow job name, in
any case.
2024-12-20 14:15:30 -05:00
Sam James 54cab0910e
ci: fix Ubuntu Bionic job
Do the same as https://github.com/pytorch/test-infra/pull/5959 and download
an old nodejs to keep Ubuntu Bionic working.

Bug: https://github.com/actions/checkout/issues/1809
Bug: https://github.com/actions/runner/issues/3373
2024-12-10 04:36:16 +00:00
Andrei Horodniceanu 726d9c0b61 .github/workflows/os_comp.yml: set HOME to /root on OpenSUSE
The D compiler and associated tools are installed under /root and the
setup script run during the actual testing expects that `~` will
expand to the same path. Because github overrides HOME the dmd
environment setup script will not be run which leads to all D related
tests being skipped, even though the whole test suite reports as
having finished successfully.

Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
2024-09-23 12:35:33 -07:00
Dylan Baker 933b0129a8 CI: run lint workflows on changes to the lint config files 2024-09-20 15:39:55 -07:00
Jon Turney 97fc2a160c
CI: Install make on Cygwin
Test '230 external project' uses make, but is too dumb to use the
platform conventions for shared library names in installed files
expected by shared_lib, so special case that.
2024-08-04 09:56:28 +01:00
Jon Turney fdf8605b84
CI: Adjust path filters to run tests on Cygwin when unittests change 2024-08-03 14:12:46 +01:00
Nirbheek Chauhan 2daf5f7c9d ci: Update actions/upload-artifact to v4 to fix deprecations 2024-07-30 13:13:23 +05:30
Nirbheek Chauhan fb108e69b1 ci: Update actions/setup-python to v5 to fix deprecations 2024-07-30 13:13:23 +05:30
Nirbheek Chauhan d077c2f5f6 ci: update actions/cache to v4 to fix deprecations 2024-07-30 13:13:23 +05:30
Nirbheek Chauhan b7e94d2ea0 ci: Update codeql-analysis action to fix deprecations 2024-07-30 13:13:23 +05:30
Nirbheek Chauhan cc0332288a ci: Update to checkout@v4 to squelch node warnings
Keep using v3 for Bionic because of https://github.com/mesonbuild/meson/pull/13424
2024-07-30 13:13:23 +05:30
Christoph Reiter 9cc94a16ab tests: try to fix ubuntu bionic tests
by forcing an older nodejs
2024-07-15 10:13:20 -07:00
Dylan Baker 07ef85ee22 CI/MacOS: Add libomp 2024-06-26 16:15:47 -04:00
Jonathan Schleifer 538abcf8b1 Install ObjFW on macOS, Fedora and MSYS2 CI 2024-04-28 03:14:29 -04:00
Dylan Baker b732070a64 CI/MacOS: move some things out of the run script into the env key 2024-04-25 16:07:17 -04:00
Dylan Baker d40e679c47 CI/MacOS: add missing packages
There are some additional packages that seem to be needed on Apple based
Silicon.
2024-04-25 16:07:17 -04:00
Dylan Baker 274445d247 CI/MacOS: Fix paths that have changed from /usr/local to /opt/homebrew
homebrew installs to /usr/local on Intel based macs, but has moved to
/opt/homebrew for those using Apple Silicon.
2024-04-25 16:07:17 -04:00
Dylan Baker 869bb7bc42 CI/MacOS: switch the Qt4 job to run on an Intel Mac
Qt4 doesn't seem to work on Apple Silicon because OpenSSL 1.0 (a
requirement for Qt4) doesn't build on it correctly, trying to use X86
assembly.
2024-04-25 16:07:17 -04:00
Dylan Baker 675c323b19 CI: pin mypy to version 1.8
Version 1.9 removes support for python 3.7, so we either need to pin the
version to 1.8 as long as we're support Python 3.7, or we need to drop
linting for 3.7
2024-03-11 07:40:27 -07:00
Eli Schwartz a35d4d368a
ciimage: fix pathological brokenness in homebrew packaging of python
Followup to commit 5c479d7a13.

In this case, PEP 668 was created to allow a thing that Debian wanted,
which is for `pip install foobar` to not break the system python. This
despite the fact that the system python is fine, unless you use sudo pip
which is discouraged for separate reasons, and it is in fact quite
natural to install additional packages to the user site-packages.

It isn't even the job of the operating system to decide whether the user
site-packages is broken, whether the operating system gets the answer
correct or not -- it is the job of the operating system to decide
whether the operating system is broken, and that can be solved by e.g.
enforcing a shebang policy for distribution-packaged software, which
distros like Fedora do, and mandating not only that python shebangs do
not contain `/usr/bin/env`, but that they *do* contain -s.

Anyway, this entire kerfuffle is mostly just a bit of pointless
interactive churn, but it bites pretty hard for our use case, which is a
container image, so instead of failing to run because of theoretical
conflicts with the base system (we specifically need base system
integration...) we fail to run because 5 minutes into pulling homebrew
updates at the very beginning, pip refuses point-blank to work. I
especially do not know why it is the job of the operating system to
throw errors intended for interactive users at people designing system
integration containers who cannot "break" the system python anyway as it
is thrown away after every use.

Fix this by doing what homebrew should have done from the beginning, and
opting containers out of this questionable feature entirely.
2024-02-21 16:47:00 -05:00
Andrew McNulty c80ece2410 workflows: Trigger on all test harness changes
The following workflows have been updated so that they are
triggered when the any of the test harnesses are updated:

  macos,
  os-comp,
  msys2

Previously only changes to `run_unittests.py` caused these
workflows to be executed.
2024-02-14 22:58:40 -05:00
Eli Schwartz 3c7bc8cac3
CI image builder: fix profile loading for gentoo
We need to load various environment variables from /etc/profile. We
cannot unconditionally load it, because opensuse sources env_vars and
their /etc/profile has a fatal bug in it that causes it to return
nonzero and abort under `set -e` (which is *amazing* as a thing to have
in /etc/profile specifically -- just saying).

Alas, even /etc/profile.env is not enough since Java support depends on
profile.d logic. Re-conditionalize this check to only be added to
env_vars.sh for the image named "gentoo".
2024-02-09 16:19:27 -05:00
Sam James fe8123b484
ci: add Gentoo
We may want to consider our own binpkg cache for future to speed things up,
in addition to the ones provided by Gentoo's own binhost.

Signed-off-by: Sam James <sam@gentoo.org>
Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
2024-02-09 13:54:01 -05:00
Eli Schwartz 8e366b8759
CI: fix even more brokenness in the macos CI
Commit 191449f608 has numerous issues, and
being completely invalid yml syntax was just the tip of the iceberg.

In this case, it fails the github schema, which requires that env be
adjunct to a job or step definition, rather than its own thing. It did
not even make sense in context, since the purpose of the variable is to
modify brew.

Fixes: #12644
Fixes: #12681
2024-01-02 02:33:30 -05:00
Chris Mayo 457161c0e8 CI: Fix macos.yml error "Invalid workflow file" 2024-01-01 11:33:26 -05:00
Nirbheek Chauhan 191449f608 ci: Don't auto-update brew when installing
We're getting errors that we don't care about on the CI like:

```
==> Pouring node@18--18.19.0.monterey.bottle.tar.gz
The formula built, but is not symlinked into /usr/local
Error: The `brew link` step did not complete successfully
Could not symlink lib/node_modules/npm/docs/content/commands/npm-sbom.md
Target /usr/local/lib/node_modules/npm/docs/content/commands/npm-sbom.md
already exists. You may want to remove it:
  rm '/usr/local/lib/node_modules/npm/docs/content/commands/npm-sbom.md'
```

We don't care about node, the only reason it's getting updated is
because it's already installed on the image and brew is auto-updating
it. So let's disable auto-update.
2023-12-20 14:03:34 -08:00
Charles Brunet c168687439 do not trigger workflows on dev branches 2023-12-13 00:13:15 +02:00
Eli Schwartz 17c6d5eb47
unittests: migrate from jsonschema to fastjsonschema
The former has rust dependencies, which lead to max capping on Cygwin
since there is no rust compiler there. But it turns out there are other
disadvantages of jsonschema:

- it involves installing 5 wheels, instead of just 1
- it is much slower

To give some perspective to the latter issue, this is what it looks like
when I test with jsonschema:

```
===== 1 passed, 509 deselected in 3.07s =====
Total time: 3.341 seconds
```

And here's what it looks like when I test with fastjsonschema:
```
===== 1 passed, 509 deselected, 1 warning in 0.28s =====
Total time: 0.550 seconds
```

I cannot think of a good reason to use the former. Although in order to
work on old CI images, we'll support it as a fallback mechanism
2023-12-10 19:02:39 -05:00
Eli Schwartz 739bdef431 NOMERGE: do we need strictyaml too? 2023-11-26 17:12:52 -05:00
Eli Schwartz caa38dad45 fix broken type annotation imports being ignored
If an annotation could not be resolved, it's classified as a "missing
import" and our configuration ignored it:

```
Skipping analyzing "mesonbuild.backends": module is installed, but missing library stubs or py.typed marker
```

As far as mypy is concerned, this library may or may not exist, but it
doesn't have any typing information at all (may need to be installed
first).

We ignored this because of our docs/ and tools/ thirdparty dependencies,
but we really should not. It is trivial to install them, and then
enforce that this "just works".

By enforcing it, we also make sure typos get caught.
2023-11-26 17:12:52 -05:00
Eli Schwartz 253df6f9f8
CI: make linters emit colored output
Github Actions supports this fine, but is misdetected by flake8/mypy.
Even though pylint defaults to text instead of colorized, we might as
well do the right thing here though.
2023-08-18 15:38:13 -04:00
Eli Schwartz 1ed619d196
run_mypy: add option to run once for each supported version of python
This allows verifying that meson is type-safe under older versions of
Python, which it currently is. Different versions of Python sometimes
have different supported types for an API.

Verify this in CI.

(We flush output to ensure CI prints lines in the right order.)
2023-08-18 15:38:13 -04:00
Eli Schwartz 2edcbb452e
CI: trigger website job when testing modifications to the website job 2023-08-18 11:16:15 -04:00
Eli Schwartz 9153b82cc2
CI: add pip caching to website job
On average, saves 20 seconds for a job that may take 1.5 or 2 minutes.
Mostly due to recompiling the same 3 wheels again and again, so that
avoids pointless CPU waste.
2023-08-18 11:16:15 -04:00
Christoph Reiter 3752041c8d
Revert "CI: add potential workaround for python crashes in MSYS2"
This reverts commit e945f35cd7.

With MSYS2 udpating to Python 3.11, this should no longer be needed.
See https://github.com/msys2/MINGW-packages/issues/17415#issuecomment-1606085553
2023-07-30 22:41:28 -04:00
Eli Schwartz ecbba0c45b
CI: gracefully handle jsonschema update requiring rust to build
This has issues on Windows with msys2/cygwin, where we need to build it
ourselves since binary wheels aren't supported on PyPI. And we don't
have a rust compiler available for either one -- we may not be *able* to
do so for cygwin?

For msys2, the solution is pretty easy, just rely on the official msys2
packages for jsonschema, which handle both it and its dependencies for
us and don't require us to compile anything. Currently they still have
an older jsonschema that doesn't use rust deps at all, but that's
because the new jsonschema was released today. We'll automatically catch
up at some point.

For cygwin, there is no rust compiler in the cygwin repository, and
jsonschema there is old as the hills. I do not know if there's a good
answer here, but an adequate answer is to cap jsonschema at the version
we were testing with yesterday.
2023-07-06 17:37:13 -04:00
Eli Schwartz f3635ff50d
avoid re-uploading the docs when a PR is based on the upstream repo
In this case, we have the secret available, and the workflow ran even
though it wasn't on branch "master" because of the pull request trigger.

Since the change hasn't landed on master, though, we do not want to
update the website. So check for pushes to master, specifically.
2023-05-01 15:22:41 -04:00
Nirbheek Chauhan 523204f1f1 ci: Don't error out CI if codecov upload fails 2023-04-24 11:42:40 -04:00
Nirbheek Chauhan c0c9f755a4 ci: Move to the codecov github action
The pypi package was suddenly removed. Not the most
confidence-inspiring deprecation/migration:

https://about.codecov.io/blog/message-regarding-the-pypi-package/
2023-04-21 13:30:45 +05:30
Eli Schwartz 42e6c58441
Revert "cygwin CI: work around gcovr bug"
This reverts commit 0022e1863d.

The bug is long since both fixed and *released*.
2023-04-19 00:21:13 -04:00
Eli Schwartz 469ed636fe
CI: update cygwin cache actions to new version supporting granular save
cache/restore and cache/save now exist, and close the issue linked in
the workflow comment. The new save action runs when invoked, rather than
as a post action.
2023-04-19 00:21:13 -04:00
Eli Schwartz 4cd4f98770
CI: cygwin coverage uploader needs to run in bash too
Like every single other command in the entire workflow, and for the same
reasons. ;)
2023-04-17 21:19:07 -04:00
Josh Soref ccc0cb9b6f ci: properly check `test cases/windows` files
Found by https://www.check-spelling.dev/

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-11 19:21:05 -04:00
Josh Soref bb698bcbd8 ci: rename workflow
Found by https://www.check-spelling.dev/

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-11 19:21:05 -04:00
Xavier Claessens 84c412a921 Disable codecov comment 2023-03-16 10:52:50 -04:00
Eli Schwartz e0b63d539e add a CI runner testing that Meson runs correctly under PyPy3
Silence a couple of framework tests that need to be skipped since we
don't install their dependencies for pypy3.
2023-02-13 09:09:10 -05:00