407 Commits

Author SHA1 Message Date
Aiden Grossman
510be2370f [Github] Fix LLVM Project Tests Workflow on Linux (#122221)
This patch fixes the LLVM project tests workflow on Linux. Two changes
were needed. Firstly, some commands need to be performed with sudo now
that the container executes as a non-root user. Second, we needed to
change from `ubuntu-latest` to `ubuntu-22.04` as `ubuntu-latest` not
defaults to `ubuntu-24.04` which causes `setup-python` to install a
python executable linked against a newer version of glibc that is not
found on ubuntu 22.04, which causes failures when CMake cannot execute
the python interpreter that it finds.

(cherry picked from commit a75917679549109fcbf92cb63ef61638517713d6)
2025-01-13 22:45:25 +00:00
Tom Stellard
c3c1b047ed workflows/release-documentation: Submit a pull request with changes (#108247)
This is instead of pushing directly. Creating a pull request is slightly
more work for the release manager, but it is more secure as we no longer
need a secret with write access to the www-releases repo.

(cherry picked from commit 9cd289fa4a7355e1bfd3129ba9c755f979fd0a72)
2024-10-11 07:58:23 +02:00
Tom Stellard
7b2756484b workflow/release-binaries: Checkout sources before downloading artifacts (#109349)
The actions/checkout step will clear the current directory, so we need
to checkout the sources first so that the downloaded artifacts won't be
deleted.

(cherry picked from commit 8f2aa9dbad7c1400f66e1ee1c43b071a1905f3e6)
2024-10-11 07:57:49 +02:00
Tom Stellard
c011dce7c2 workflows/release-binaries: Enable flang builds on Windows (#101344)
Flang for Windows depends on compiler-rt, so we need to enable it for
the stage1 builds. This also fixes failures building the flang tests on
macOS.

Fixes #100202.

(cherry picked from commit 8927576b8f6442bb6129bda597efee46176f8aec)
2024-09-24 08:39:15 +02:00
Tom Stellard
32a8b56bbf workflows/release-binaries: Fix automatic upload (#107315)
(cherry picked from commit ab96409180aaad5417030f06a386253722a99d71)
2024-09-13 07:57:24 +02:00
Tom Stellard
e657e02565 workflows: Fix tag name for release sources job (#100752)
(cherry picked from commit 3c2ce7088886a22ab8dc0e9488600c43644b5102)
2024-09-10 08:18:37 +02:00
Tom Stellard
72a74e44ef workflows/release-tasks: Pass required secrets to all called workflows (#106286)
Called workflows don't have access to secrets by default, so we need to
explicitly pass secrets that we use.

(cherry picked from commit 9d81e7e36e33aecdee05fef551c0652abafaa052)
2024-09-01 10:16:30 +02:00
Tom Stellard
c21b039178 workflows/release-binaries: Remove .git/config file from artifacts (#106310)
The .git/config file contains an auth token that can be leaked if the
.git directory is included in a workflow artifact.

(cherry picked from commit ef50970204384643acca42ba4c7ca8f14865a0c2)
2024-09-01 09:51:04 +02:00
Tom Stellard
eea8e4ddd8 workflows: Fix permissions for release-sources job (#100750)
For reusable workflows, the called workflow cannot upgrade it's
permissions, and since the default permission is none, we need to
explicitly declare 'contents: read' when calling the release-sources
workflow.

Fixes the error:
The workflow is requesting 'contents: read', but is only allowed
'contents: none'.

(cherry picked from commit 82c2259aeb87f5cb418decfb6a1961287055e5d2)
2024-08-10 12:29:39 +02:00
Tom Stellard
5972d4ddf9 workflows/release-binaries-all: Pass secrets on to release-binaries workflow (#101866)
A called workflow does not have access to secrets by default, so we need
to explicitly pass any secret that we want to use.

(cherry picked from commit 1fb1a5d8e2c5a0cbaeb39ead68352e5e55752a6d)
2024-08-10 12:28:01 +02:00
Tom Stellard
b5cb9081fa workflows/release-binaries: Give attestation artifacts a unique name (#102041)
We need a different attestation for each supported architecture, so
there artifacts all need to have a different name.

The upload step is run on a Linux runner, so no matter which
architecture's binary is being uploaded the runner.os and runner.arch
variables would always be 'Linux' and 'X64' and so we can't use them for
naming the artifact.

(cherry picked from commit 3c8dadda3aa20b89fb5ad29ae31380d9594c3430)
2024-08-10 12:00:10 +02:00
Tom Stellard
e1c32a819d workflows/release-tasks: Add missing permissions for release binaries (#102023)
Now that the release binaries create artifact attestations, we need to
ensure that we call the workflow with the correct permissions.

(cherry picked from commit dc349a3f47882cdac7112c763d2964b59e77356a)
2024-08-10 11:58:52 +02:00
Tom Stellard
b047c24071 workflows: Re-implement the get-llvm-version action as a composite action (#101569)
The old version in the llvm/actions repo stopped working after the
version variables were moved out of llvm/CMakeLists.txt. Composite
actions are more simple and don't require javascript, which is why I
reimplemented it as a composite action.

This will fix the failing abi checks on the release branch.

(cherry picked from commit 14837aff058f9a2d32b8277debe619d8eb1995a1)
2024-08-05 10:18:44 +02:00
Tom Stellard
5307f82261 workflows/release-binaries: Fix problem with python installation on macos-14 (#101774)
python3 wasn't able to see modules installed by pip, so we need to use
the setup-python action to ensure that the default pip and python3 both
use the same prefix.

See https://github.com/actions/runner-images/issues/10385

(cherry picked from commit 59476c99983d3813b412c9b0c0464365644c23a8)
2024-08-05 10:18:00 +02:00
Tom Stellard
5657751f8e workflows/release-binaries: Fetch composite actions outside of default workspace (#100845)
Otherwise, the checkout step will override them.

(cherry picked from commit 41003ff3fe344dee5c963d462a4bc6d528811d86)
2024-08-05 10:18:00 +02:00
Tom Stellard
bb4292506d workflow/release-binaries: Fix typo
Introduced in b0860b20878d2c84fc3ce56ea608c5186872faa2.

(cherry picked from commit d41f565318e2a414acfd7eec1cfb2fbf515391ba)
2024-08-05 10:18:00 +02:00
Tom Stellard
d07802f405 workflows/release-binaries: Always pull composite actions from main branch (#100805)
If we pull from the release tag, then if there is a bug in one of the
actions on the release tag, then we can never do a build for that tag.
Pulling from main will allows us to fix bugs in the actions we use to
build the releases.

(cherry picked from commit b0860b20878d2c84fc3ce56ea608c5186872faa2)
2024-08-05 10:18:00 +02:00
Tom Stellard
e28632e63a workflows: Remove left over debugging step from release-binaries job
(cherry picked from commit 18dee70168bcd7259daade4c86462ba859e7bed5)
2024-08-05 10:18:00 +02:00
Tom Stellard
5c8dcabc52 Build release binaries for multiple targets (#98431)
This adds release binary builds for the 4 platforms currently supported
by the free GitHub Action runners:

* Linux x86_64
* Windows x86_64
* Mac x86_64
* Mac AArch64

The test stages for these are known to fail, but the creating and
upoading of the release binaries should pass.

(cherry picked from commit 247251aee0d4314385a3fea86e31484d3d792ffb)
2024-08-05 10:18:00 +02:00
Tom Stellard
2d7539381c workflows: Fix libclc-tests (#101524)
The old out-of-tree build configuration stopped working and in tree
builds are supported now, so we should use the in tree configuration.
The only downside is we can't run the tests any more, but at least we
will be able to test the build again.

(cherry picked from commit 0512ba0a435a9d693cb61f182fc9e3eb7f6dbd6a)
2024-08-02 09:23:45 +02:00
Tobias Hieta
fc9f6b0e0d
[Infra] Fix version-check workflow (#100090) 2024-07-23 13:07:32 +02:00
Jakub Kuderski
ae96bde89f
[github][mlir] Add kuhar to code owners for vector IR (#99955)
This is so that I can track vector dialect changes and pay attention to
the maintenance required on the SPIR-V lowering side.
2024-07-22 17:32:03 -04:00
Tom Stellard
56ffbd97fd
[workflows] Avoid usage of access token in issue-write.yml (#94011)
This adds a new composite workflow that allows you to download artifacts
from other workflows without using an access token.

actions/download-artifact from GitHub requires an access token in order
to download artifacts from a different workflow, which is why we can't
use it here if we want to avoid using a token.

See
https://github.com/actions/download-artifact?tab=readme-ov-file#download-artifacts-from-other-workflow-runs-or-repositories
2024-07-19 14:47:35 -07:00
Andrzej Warzyński
26098fe4b8
[codeowners][nfc] Add myself and @dcaballe (#97853) 2024-07-16 16:45:32 +01:00
Alexey Karyakin
ca2d2a123c
Add patterns for Hexagon backend labels (#98068)
Add path filters for labelling of PRs related to the Hexagon backend.
2024-07-08 15:52:01 -05:00
Nikolas Klauser
655651a023
[libc++] Upgrade to GCC 14 (#97205) 2024-07-04 17:23:31 +02:00
Aiden Grossman
da3e60bbe7
[Github] Make issue write workflow only run after success/failure (#97341)
This patch makes the issue write workflow only run after success or
failure of the workflow invoking it, preventing it from running where
the original workflow was skipped.

Fixes #97294
2024-07-01 13:38:33 -07:00
Mogball
b468804005 [mlir] Add myself as codeowner of the index dialect 2024-06-28 08:29:42 -07:00
Tom Stellard
2879a03647
[workflows] Fix release note request workflow (#94784)
We need to use the issue-write workflow to write the comments, because
pull_request targets don't have permissions to write comments.
2024-06-27 15:54:22 -07:00
Diego Caballero
ef864516f7
[mlir] Remove * from generic Linalg/Vector rules in CODEOWNERS (#96581)
The PR removes the `*` from the generic MLIR Vector/Linalg rules. The
`*` symbol keeps the match local to the files in the directory,
excluding sub-directories, which was not the intention when I added
these rules.
2024-06-25 18:01:40 -07:00
Jonas Devlieghere
58cb0e651f
[.github] Add myself as a reviewer for DWARFLinker & friends (#96531) 2024-06-24 11:26:02 -07:00
Tom Stellard
da0e5359fc
workflows: Add a new job for packaging release sources (#91834)
This job uses the new artifact attestations:

https://github.blog/2024-05-02-introducing-artifact-attestations-now-in-public-beta/

This will allow users to verify that the sources came from a specific
workflow run in the llvm-project repository. Currently, this job does
not automatically upload sources to the release page, but rather it
attaches them the workflow run as artifacts. The release manager is
expected to download, verify, and sign the sources before uploading them
to the release page.

We may be able to automatically upload them in the future once we have a
process for signing the binaries within the github workflow.
Technically, though, the binaries are being signed as part of the
attestation process, but the only way to verify the signatures is using
the gh command line tool, and I don't think it is best to rely on that,
since the tool may not be easily available on all systems.
2024-06-18 08:27:33 -07:00
Owen Pan
5914a5671a
[GitHub][workflows] Use latest clang-format version 18.1.7 (#95757)
Since clang-format 18.1.4, there have been a number of commits that
fixed various kinds of issues:

- Bug
3ceccbdb1995

- Regression
6dbaa89433f7
51ff7f38b633
35fea1032741
7699b341b763
768118d1ad38
8c0fe0d65ed8

- Crash
f1491c7460e7

- Invalid code generation
0abb89a80f5c
2024-06-17 09:49:12 -07:00
Louis Dionne
c7b32341e9 [libc++] Rename workflow that restarts preempted jobs
All the libc++ workflows start with `libcxx-`, so use that prefix for
this job as well. Also, remove trailing whitespace from the yaml file.
2024-06-14 12:44:09 -04:00
Jannick Kremer
e38729968b
[CI] Update setup-python action to v5 for GHA (#95414)
We currently receive a warning on all Github Actions workflows that use
`setup-python`, since they all use v4 of the action, which uses the
deprecated Node.js 16. This PR upgrades the action in all places to v5,
which uses Node.js 20 (see [setup-python release
page](https://github.com/actions/setup-python/releases/tag/v5.0.0))
2024-06-13 10:16:59 -07:00
Jannick Kremer
8f795fc798
[libclang/python] Change minimum Python test version to 3.8 (#95210)
This fixes #95209
2024-06-13 18:48:31 +04:00
Martin Storsjö
bce2498767
[libcxx] [ci] Update Clang for Windows jobs to 18.1.x (#95228)
Pick the latest version available in Chocolatey (18.1.6) and llvm-mingw
(20240606, which includes LLVM 18.1.7).

Also add the flag "--allow-downgrade" when installing a specific version
of LLVM. If the preinstalled version is higher than the requested one,
Chocolatey would otherwise error out when requesting installing a lower
version. This will avoid errors in the future, if the runner image comes
preinstalled with a newer version of LLVM.

(This currently seems to happen with a recent version of the GitHub
Actions runner image, version 20240610.1.0 has LLVM 18.1.6 already
preinstalled, and will error out when trying to install the 17.0.6
version that we previously requested.)
2024-06-12 12:01:08 -04:00
Martin Storsjö
27ac46e6be
[libc++][ci] Don't install wget in the Windows jobs (#95215)
Nothing uses wget - only curl is used, and that's available out of the
box.
2024-06-12 11:25:37 -04:00
Tom Stellard
81671fe0e2
[workflows] Add post-commit job that periodically runs the clang static analyzer (#94106)
This job will run once per day on the main branch, and for every commit
on a release branch. It currently only builds llvm, but could add more
sub-projects in the future.

OpenSSF Best Practices recommends running a static analyzer on software
before it is released:
https://www.bestpractices.dev/en/criteria/0#0.static_analysis
2024-06-07 19:02:55 -07:00
Tom Stellard
0d1b3671a9
[CMake][Release] Use the TXZ cpack generator for binaries (#90138) 2024-06-07 02:27:59 -07:00
Tom Stellard
e49f902358
[workflows] Add scan-build to ci-ubuntu-22.04 container (#94543)
This will be used for a new CI job that runs the static analyzer.
2024-06-06 06:05:29 -07:00
Tom Stellard
aa512943f4
workflows: Disable stage2 of the release builds (#93056)
We need to skip this step until PGO is re-enabled for the release
builds.
2024-06-05 09:33:13 -07:00
Justin Fargnoli
3e228c8eaf
[GitHub] Add NVPTX backend labeler (#94080)
Add patterns to label NVPTX backend related changes automatically.
2024-06-03 10:27:56 -07:00
Eric Fiselier
b6ea134e41 Fix pagination issue in libc++ buildbot restarter 2024-06-02 10:18:44 -04:00
Eric Fiselier
867c9f6713 Fix permissions on restarter workflow 2024-06-01 12:30:14 -04:00
Eric Fiselier
e9057c30a4 Create check run on workflow run to better display result.
In order to make the behavior of the libc++ restarter more visible
to users, this change creates a check run on the considered workflow
to let users know what action, if any, was taken
2024-06-01 12:22:26 -04:00
Eric Fiselier
86bb5c8427 Create annotations to better explain restarter decision 2024-06-01 11:53:22 -04:00
Vlad Serebrennikov
ed35a92c40
[clang] Introduce target-specific Sema components (#93179)
This patch introduces `SemaAMDGPU`, `SemaARM`, `SemaBPF`, `SemaHexagon`,
`SemaLoongArch`, `SemaMIPS`, `SemaNVPTX`, `SemaPPC`, `SemaSystemZ`,
`SemaWasm`. This continues previous efforts to split Sema up. Additional
context can be found in #84184 and #92682.

I decided to bundle target-specific components together because of their
low impact on `Sema`. That said, their impact on `SemaChecking.cpp` is
far from low, and I consider it a success.

Somewhat accidentally, I also moved Wasm- and AMDGPU-specific function
from `SemaDeclAttr.cpp`, because they were exposed in `Sema`. That went
well, and I consider it a success, too. I'd like to move the rest of
static target-specific functions out of `SemaDeclAttr.cpp` like we're
doing with built-ins in `SemaChecking.cpp` .
2024-05-30 19:59:59 +04:00
Mingming Liu
3255752cbd
[Github]Update PGO with more filepaths (#93720)
- `llvm/**/ProfileData/**/*` intends to cover `llvm/include/llvm/ProfileData/` and `llvm/lib/ProfileData/`
- `llvm/**/SampleProfile*` intends to cover a bunch of SamplePGO files and their headers. For example, 
    `SampleProfile.cpp`, `SampleProfileMatcher.cpp`, `SampleProfileProbe.cpp`
- `llvm/**/CodeGen/MIRSampleProfile*` intends to cover MIRSampleProfile.cpp and its header.
- `llvm/test/Transforms/SampleProfile/**/*` intends to cover unit tests.
2024-05-29 13:17:19 -07:00
Eric Fiselier
e492aa5adb Remove one more unneeded debug log line 2024-05-28 21:08:07 -04:00