Commit Graph

22 Commits

Author SHA1 Message Date
Kim Gräsman 44fa8c7bd0 [ci] Upgrade to actions/checkout@v3
The v2 action depends on deprecated Node.js 12, as indicated by warning
from GitHub Actions:

    Node.js 12 actions are deprecated. For more information see: [1].
    Please update the following actions to use Node.js 16:
      actions/checkout@v2

(See [2] for an example.)

Upgrade to actions/checkout@v3 to silence the warning.

Unfortunately this new version has a very confusing policy for default
checkout ref: "[...] the last merge commit of the pull request merge
branch". There does not appear to be a convenient way to fall back to
the v2 behavior.

Add some conditional logic to resolve the HEAD of the right branch
whether it's a schedule, push or pull_request event.

[1] https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.
[2] https://github.com/include-what-you-use/include-what-you-use/actions/runs/3718310359
2022-12-20 20:59:51 +01:00
Kim Gräsman 5a990cdae7 [ci] Uninstall and install packages in batch
This cuts the time for the 'Install prerequisites' step almost in half,
since it doesn't need to re-scan the apt database for every package.
2022-12-20 20:07:24 +01:00
Kim Gräsman d6ed4a5309 [ci] Remove --force-overwrite workaround
Reverts 6c3b7bcfb8.

This has now been fixed upstream.
2022-12-20 20:07:24 +01:00
Kim Gräsman 6c3b7bcfb8 [ci] Add --force-overwrite hack to work around packaging bug
Installation of libclang-16-dev would fail with:

    Unpacking libclang-16-dev (1:16~++20221216031545+6c5f3f62bdb2-1~exp1~20221216151636.624) ...
    dpkg: error processing archive /var/cache/apt/archives/libclang-16-dev_1%3a16~++20221216031545+6c5f3f62bdb2-1~exp1~20221216151636.624_amd64.deb (--unpack):
      trying to overwrite '/usr/lib/x86_64-linux-gnu/libclang-16.so.1', which is also in package libclang1-16 1:16~++20221216031545+6c5f3f62bdb2-1~exp1~20221216151636.624
    ...
    Unpacking libclang-dev (1:16.0-57~exp1~20221014130100.5) ...
    Errors were encountered while processing:
      /var/cache/apt/archives/libclang-16-dev_1%3a16~++20221216031545+6c5f3f62bdb2-1~exp1~20221216151636.624_amd64.deb
    ...
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    Error: Process completed with exit code 100.

libclang-16-dev somehow depends on libclang1-16, and both are trying to
install the same libclang1.so.

Use --force-override switch to comfort dpkg, even though it's not
recommended in practice. See e.g. https://askubuntu.com/a/491086/852068.

Let's remove this as soon as possible.
2022-12-16 22:05:33 +01:00
Kim Gräsman c8ad78d584 [ci] Clean up more base clang packages before installing
The libclang-dev packages are actually called libclang-NN-dev, not
libclang-dev-NN, so make the glob a little more permissive to remove
more preinstalled packages.
2022-12-16 22:05:33 +01:00
Kim Gräsman d537ae32d2 [ci] Remove packaging workaround for missing libclang-16.so.1
This reverts commit 39e45aa453.
2022-12-16 22:05:33 +01:00
Kim Gräsman 9f68769aa1 [ci] Update CI builder to ubuntu-22.04 2022-11-13 13:02:04 +01:00
Kim Gräsman 39e45aa453 [ci] Work around missing libclang-16.so.1 2022-08-28 14:52:23 +02:00
Kim Gräsman 8e65d9cf4a [ci] Remove llvm-15 packaging workarounds
Snapshot packages are now llvm-16.
2022-08-09 22:47:36 +02:00
Kim Gräsman da6064016e [ci] Add workaround for missing libMLIRSupportIndentedOstream.a 2022-05-22 12:23:03 +02:00
Kim Gräsman e4f018d7fe [ci] Add workaround for missing tblgen-lsp-server 2022-05-19 21:41:34 +02:00
Kim Gräsman 208fbfffa5 [ci] Remove workaround for missing MLIR library 2022-02-06 10:49:35 +01:00
Kim Gräsman 2b89ba1922 [ci] Update packaging workarounds
Things have shifted around.
2022-01-09 20:31:13 +01:00
Kim Gräsman 150cce73eb [ci] Fix YAML syntax
In the previous commit, I merged overlooking the fact that it didn't work.

Apparently push and pull_request can be combined with schedule if they're all
dict forms; the former two can have empty values.
2022-01-09 20:31:13 +01:00
Kim Gräsman 88f564f719 [ci] Schedule nightly build
This will make it easier for us to detect when IWYU breaks due to upstream Clang
changes.

The default behavior for 'schedule' is to run the build for the default branch,
so it only applies to our master branch.
2022-01-09 19:49:32 +01:00
Kim Gräsman 5e1e5ac420 [ci] Fix phrasing in comment
The others are all in imperative mood.
2022-01-09 19:49:32 +01:00
Kim Gräsman a73561e3eb Work around missing llvm-omp-device-info in Debian packaging 2021-12-04 20:17:59 +01:00
Kim Gräsman 2d9c0c733d Add workaround for broken packaging
libclang-NN.so recently changed versioning schemes, and it doesn't look like the
Debian packages have caught up.

We don't use this file, so placate CMake by creating an empty placeholder.
2021-08-06 13:52:19 +02:00
Kim Grasman 9b41096201 [ci] Fix tagging to match actual package names
Evidently hard to test this when the tag is empty.
2021-05-24 21:04:50 +02:00
Kim Grasman 1b1ebbad76 [ci] Add variable LLVM_TAG for LLVM version suffix
Leaving this blank will use LLVM/Clang snapshot packages.

When a branch is taken for a released version, it can be updated to
"-NN" where NN is the major version for the branch CI to target.
2021-05-24 20:55:43 +02:00
Alexey Storozhev 2dfe3bff0c Run tests in parallel on CI 2021-05-01 17:07:40 +02:00
Kim Grasman 9157998e45 Move CI to GitHub workflow
Travis has been unreliable lately; have not been able to find a way to
fix the integration with GitHub to get CI notifications for pull
requests.

To minimize the number of moving parts, move CI to GitHub workflows
instead.

Variables were more convoluted in GitHub's workflow spec, so use a
different approach to detecting the latest installed LLVM version:
uninstall all LLVM and Clang packages first, and then install the one we
want to target. That makes it possible to lean on defaults much more and
reduces noise.

Remove travis config.
2021-04-11 16:44:05 +02:00