diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7c019c252621d..3b8abd35b58c9 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -11,177 +11,4 @@ # See https://llvm.org/docs/DeveloperPolicy.html#maintainers as well as the # Maintainers.* files in the the respective subproject directories. -/libcxx/ @llvm/reviewers-libcxx -/libcxxabi/ @llvm/reviewers-libcxxabi -/libunwind/ @llvm/reviewers-libunwind -/runtimes/ @llvm/reviewers-libcxx - -/llvm/lib/Analysis/BasicAliasAnalysis.cpp @nikic -/llvm/lib/Analysis/HashRecognize.cpp @artagnon @pfusik -/llvm/lib/Analysis/InstructionSimplify.cpp @nikic -/llvm/lib/Analysis/LazyValueInfo.cpp @nikic -/llvm/lib/Analysis/ScalarEvolution.cpp @nikic -/llvm/lib/Analysis/ValueTracking.cpp @nikic -/llvm/lib/IR/ConstantRange.cpp @nikic -/llvm/lib/IR/Core.cpp @nikic -/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp @nikic -/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp @nikic -/llvm/lib/Transforms/InstCombine/ @nikic - -/clang/test/CXX/drs/ @Endilll -/clang/www/cxx_dr_status.html @Endilll -/clang/www/make_cxx_dr_status @Endilll - -/clang/include/clang/CIR @lanza @bcardosolopes @xlauko @andykaylor -/clang/lib/CIR @lanza @bcardosolopes @xlauko @andykaylor -/clang/tools/cir-* @lanza @bcardosolopes @xlauko @andykaylor - -/lldb/ @JDevlieghere - -# MLIR Interfaces. -/mlir/include/mlir/Interfaces/TilingInterface.* @MaheshRavishankar @nicolasvasilache -/mlir/lib/Interfaces/TilingInterface.* @MaheshRavishankar @nicolasvasilache -/mlir/include/mlir/Interfaces/ValueBoundsOpInterface.* @matthias-springer -/mlir/lib/Interfaces/ValueBoundsOpInterface.* @matthias-springer -/mlir/**/ValueBoundsOpInterfaceImpl.* @matthias-springer -/mlir/include/mlir/Interfaces/RuntimeVerifiableOpInterface.* @matthias-springer -/mlir/lib/Interfaces/RuntimeVerifiableOpInterface.* @matthias-springer -/mlir/**/RuntimeVerifiableOpInterfaceImpl.* @matthias-springer -/mlir/include/mlir/Interfaces/SubsetOpInterface.* @matthias-springer -/mlir/lib/Interfaces/SubsetOpInterface.* @matthias-springer -/mlir/**/SubsetOpInterfaceImpl.* @matthias-springer -/mlir/include/mlir/Interfaces/DestinationStyleOpInterface.* @matthias-springer -/mlir/lib/Interfaces/DestinationStyleOpInterface.* @matthias-springer - -# AMDGPU and ROCDL dialects in MLIR. -/mlir/include/mlir/Dialect/AMDGPU @krzysz00 @kuhar -/mlir/lib/Dialect/AMDGPU @krzysz00 @kuhar -/mlir/lib/Conversion/*AMDGPU* @krzysz00 @kuhar -/mlir/lib/Conversion/*ToROCDL @krzysz00 @kuhar -/mlir/include/mlir/Dialect/LLVMIR/ROCDL* @krzysz00 @kuhar - -# Arith dialect in MLIR. -/mlir/include/mlir/Dialect/Arith @kuhar -/mlir/lib/Dialect/Arith @kuhar -/mlir/lib/Conversion/ArithTo* @kuhar - -# XeGPU and XeVM dialects in MLIR. -/mlir/include/mlir/Dialect/XeGPU @charithaintc @Jianhui-Li -/mlir/lib/Dialect/XeGPU @charithaintc @Jianhui-Li -/mlir/lib/Conversion/*XeGPU* @charithaintc @Jianhui-Li -/mlir/include/mlir/Dialect/XeGPU/Transforms @charithaintc @Jianhui-Li -/mlir/lib/Dialect/XeGPU/Transforms @charithaintc @Jianhui-Li -/mlir/include/mlir/Dialect/XeGPU/TransformOps @charithaintc @Jianhui-Li @tkarna -/mlir/lib/Dialect/XeGPU/TransformOps @charithaintc @Jianhui-Li @tkarna -/mlir/include/mlir/Dialect/LLVMIR/XeVM* @silee2 -/mlir/lib/Dialect/LLVMIR/IR/XeVM @silee2 -/mlir/lib/Conversion/*XeVM* @silee2 - -# Bufferization Dialect in MLIR. -/mlir/include/mlir/Dialect/Bufferization @matthias-springer -/mlir/lib/Dialect/Bufferization @matthias-springer -/mlir/**/BufferizableOpInterfaceImpl.* @matthias-springer -/mlir/Dialect/*/Transforms/Bufferize.cpp @matthias-springer - -# DLTI Dialect in MLIR -/mlir/**/Dialect/DLTI @rolfmorel -/mlir/**/DataLayoutInterfaces.* @rolfmorel - -# Linalg Dialect in MLIR. -/mlir/include/mlir/Dialect/Linalg @dcaballe @nicolasvasilache @rengolin -/mlir/lib/Dialect/Linalg @dcaballe @nicolasvasilache @rengolin -/mlir/lib/Dialect/Linalg/Transforms/DecomposeLinalgOps.cpp @MaheshRavishankar @nicolasvasilache -/mlir/lib/Dialect/Linalg/Transforms/DropUnitDims.cpp @dcaballe @MaheshRavishankar @nicolasvasilache -/mlir/lib/Dialect/Linalg/Transforms/ElementwiseOpFusion.cpp @MaheshRavishankar @nicolasvasilache -/mlir/lib/Dialect/Linalg/Transforms/DataLayoutPropagation.cpp @hanhanW @nicolasvasilache -/mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp @dcaballe @hanhanW @nicolasvasilache -/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp @banach-space @dcaballe @hanhanW @nicolasvasilache @Groverkss - -# MemRef Dialect in MLIR. -/mlir/lib/Dialect/MemRef/Transforms/EmulateNarrowType.cpp @MaheshRavishankar @nicolasvasilache - -# Vector Dialect in MLIR. -/mlir/**/*AMX* @aartbik @dcaballe -/mlir/**/*Neon* @banach-space @dcaballe @nicolasvasilache -/mlir/**/*SME* @banach-space @dcaballe @nicolasvasilache -/mlir/**/*SVE* @banach-space @dcaballe @nicolasvasilache -/mlir/**/*VectorInterfaces* @dcaballe @nicolasvasilache -/mlir/**/*VectorToSCF* @banach-space @dcaballe @matthias-springer @nicolasvasilache -/mlir/**/*VectorToLLVM* @banach-space @dcaballe @nicolasvasilache -/mlir/**/*X86Vector* @aartbik @dcaballe @nicolasvasilache -/mlir/include/mlir/Dialect/Vector @banach-space @dcaballe @nicolasvasilache @Groverkss -/mlir/include/mlir/Dialect/Vector/IR @kuhar -/mlir/lib/Dialect/Vector @banach-space @dcaballe @nicolasvasilache @Groverkss -/mlir/lib/Dialect/Vector/Transforms/* @banach-space @dcaballe @hanhanW @nicolasvasilache -/mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp @banach-space @dcaballe @MaheshRavishankar @nicolasvasilache -/mlir/**/*EmulateNarrowType* @dcaballe @hanhanW - -# Presburger library in MLIR -/mlir/**/*Presburger* @Groverkss @Superty - -# Tensor Dialect in MLIR. -/mlir/lib/Dialect/Tensor/IR/TensorTilingInterfaceImpl.cpp @hanhanW @nicolasvasilache -/mlir/lib/Dialect/Tensor/Transforms/* @hanhanW @nicolasvasilache - -# Transform Dialect in MLIR. -/mlir/include/mlir/Dialect/Transform/* @ftynse @nicolasvasilache @rolfmorel -/mlir/lib/Dialect/Transform/* @ftynse @nicolasvasilache @rolfmorel -/mlir/**/*TransformOps* @ftynse @nicolasvasilache @rolfmorel - -# SPIR-V Dialect in MLIR. -/mlir/**/SPIRV/ @antiagainst @kuhar -/mlir/**/SPIRVTo*/ @antiagainst @kuhar -/mlir/**/*ToSPIRV/ @antiagainst @kuhar -/mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp @antiagainst @kuhar - -# MLIR Sparsifier. -/mlir/**/*SparseTensor*/ @aartbik @PeimingLiu @yinying-lisa-li @matthias-springer - -# MLIR NVGPU Dialect -/mlir/**/NVGPU*/ @grypp -/mlir/test/**/CUDA/ @grypp - -# MLIR GPU Dialect -/mlir/**/GPU*/ @fabianmcg - -# MLIR NVVM Dialect in MLIR -/mlir/**/LLVMIR/**/BasicPtxBuilderInterface* @grypp -/mlir/**/NVVM* @grypp - -# MLIR Index Dialect -/mlir/**/Index* @mogball - -# MLIR Python Bindings -/mlir/test/python/ @ftynse @makslevental @stellaraccident @rolfmorel -/mlir/python/ @ftynse @makslevental @stellaraccident @rolfmorel -/mlir/lib/Bindings/Python @makslevental @rolfmorel -/mlir/include/Bindings/Python @makslevental @rolfmorel - -# MLIR Mem2Reg/SROA -/mlir/**/Transforms/Mem2Reg.* @moxinilian -/mlir/**/Transforms/SROA.* @moxinilian - -# MLIR IRDL-related -/mlir/**/*IRDL* @moxinilian - -# BOLT -/bolt/ @aaupov @maksfb @rafaelauler @ayermolo @yota9 @paschalis-mpeis @yozhu - -# Bazel build system. -/utils/bazel/ @rupprecht @keith @aaronmondal - -# InstallAPI and TextAPI -/llvm/**/TextAPI/ @cyndyishida -/clang/**/InstallAPI/ @cyndyishida -/clang/tools/clang-installapi/ @cyndyishida - -# ExtractAPI -/clang/**/ExtractAPI @daniel-grumberg @QuietMisdreavus - -# DWARFLinker, dwarfutil, dsymutil -/llvm/**/DWARFLinker/ @JDevlieghere -/llvm/**/dsymutil/ @JDevlieghere -/llvm/**/llvm-dwarfutil/ @JDevlieghere - -# libclang/Python bindings -/clang/bindings/python @DeinAlptraum +* @intel-staging/npu-compiler-llvm-maintain diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..355ebf0ad697c --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,15 @@ +## Summary +> Please add a short but exhaustive summary why you think your pull request is useful + +## JIRA ticket + +* E-xxxxx + +## Related PR in NPU Compiler and/or OpenVINO repository with sub-module update + +* PR-xxx + +### Other related tickets +> List tickets for additional work, eg, something was found during review but you agreed to address it in another Jira + +* E-xxxxx diff --git a/.github/actions/build-container/action.yml b/.github/actions/build-container/action.yml deleted file mode 100644 index 595c3f8dd2070..0000000000000 --- a/.github/actions/build-container/action.yml +++ /dev/null @@ -1,95 +0,0 @@ -name: Build Container -description: >- - Build and test a container using the standard llvm naming scheme for containers. - -inputs: - tag: - description: >- - The tag to use for this container. - required: false - container-name: - description: >- - The name for the container. - required: true - dockerfile: - description: >- - Path to docker file. - required: false - target: - description: >- - The container target to build 'passed to podman via ---target option' - required: false - context: - description: >- - Path to context for the container build. - required: false - test-command: - description: >- - Test command to run to ensure the container is working correctly. - required: false - -runs: - using: "composite" - steps: - # podman is not installed by default on the ARM64 images. - - name: Install Podman - if: runner.arch == 'ARM64' - shell: bash - run: | - sudo apt-get install podman - - - name: Build Container - shell: bash - env: - INPUT_TAG: ${{inputs.tag }} - INPUT_CONTAINER_NAME: ${{ inputs.container-name }} - INPUT_TARGET: ${{ inputs.target }} - INPUT_DOCKERFILE: ${{ inputs.dockerfile }} - INPUT_CONTEXT: ${{ inputs.context }} - id: build - run: | - env - tag="${INPUT_TAG:-$(git rev-parse --short=12 HEAD)}" - - case "$RUNNER_ARCH" in - ARM64) - container_arch="arm64v8" - ;; - *) - container_arch="amd64" - ;; - esac - - container_name="ghcr.io/$GITHUB_REPOSITORY_OWNER/$container_arch/$INPUT_CONTAINER_NAME:$tag" - container_filename="$(echo $container_name | sed -e 's/\//-/g' -e 's/:/-/g').tar" - if [ -n "$INPUT_TARGET" ]; then - podman_options="$podman_options --target $INPUT_TARGET" - fi - if [ -n "$INPUT_DOCKERFILE" ]; then - podman_options="$podman_options -f $INPUT_DOCKERFILE" - fi - podman_options="$podman_options ${INPUT_CONTEXT:-.}" - echo "Podman Options: $podman_options" - - podman build -t $container_name $podman_options - - podman save $container_name > $container_filename - - echo "container-full-name=$container_name" >> $GITHUB_OUTPUT - - - name: Create container artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 - with: - name: ${{ inputs.container-name }}-${{ runner.arch }} - path: "*.tar" - retention-days: 14 - - - name: Test container - shell: bash - if: inputs.test-command - env: - INPUT_TEST_COMMAND: ${{ inputs.test-command }} - CONTAINER_FULL_NAME: ${{ steps.build.outputs.container-full-name }} - run: | - podman run --pull=never --rm -it $CONTAINER_FULL_NAME /usr/bin/bash -x -c "$INPUT_TEST_COMMAND" - diff --git a/.github/actions/push-container/action.yml b/.github/actions/push-container/action.yml deleted file mode 100644 index 087e3dcb2718c..0000000000000 --- a/.github/actions/push-container/action.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Push Container -description: >- - Download all container artifacts for this job and push them to the GitHub registry. - -inputs: - token: - description: >- - Token to use to authenticate with the container registry. - required: true - -runs: - using: "composite" - steps: - - name: Download container - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 - - - name: Push Container - env: - GITHUB_TOKEN: ${{ inputs.token }} - shell: bash - run: | - function push_container { - image_name=$1 - latest_name=$(echo $image_name | sed 's/:[a-f0-9]\+$/:latest/g') - podman tag $image_name $latest_name - echo "Pushing $image_name ..." - podman push --compression-format=zstd $image_name - echo "Pushing $latest_name ..." - podman push --compression-format=zstd $latest_name - } - - podman login -u ${{ github.actor }} -p $GITHUB_TOKEN ghcr.io - for f in $(find . -iname '*.tar'); do - image_name=$(podman load -q -i $f | sed 's/Loaded image: //g') - push_container $image_name - - if echo $image_name | grep '/amd64/'; then - # For amd64, create an alias with the arch component removed. - # This matches the convention used on dockerhub. - default_image_name=$(echo $(dirname $(dirname $image_name))/$(basename $image_name)) - podman tag $image_name $default_image_name - push_container $default_image_name - fi - done diff --git a/.github/instructions/lldb.instructions.md b/.github/instructions/lldb.instructions.md deleted file mode 100644 index 35bcd27b1b42f..0000000000000 --- a/.github/instructions/lldb.instructions.md +++ /dev/null @@ -1,79 +0,0 @@ ---- -applyTo: lldb/**/* ---- - -When reviewing code, focus on: - -## Language, Libraries & Standards - -- Target C++17 and avoid vendor-specific extensions. -- For Python scripts, follow PEP 8. -- Prefer standard library or LLVM support libraries instead of reinventing data structures. - -## Comments & Documentation - -- Each source file should include the standard LLVM file header. -- Header files must have proper header guards. -- Non-trivial classes and public methods should have Doxygen documentation. -- Use `//` or `///` comments normally; avoid block comments unless necessary. -- Non-trivial code should have comments explaining what it does and why. Avoid comments that explain how it does it at a micro level. - -## Language & Compiler Issues - -- Write portable code; wrap non-portable code in interfaces. -- Do not use RTTI or exceptions. -- Prefer C++-style casts over C-style casts. -- Do not use static constructors. -- Use `class` or `struct` consistently; `struct` only for all-public data. -- When then same class is declared or defined multiple times, make sure it's consistently done using either `class` or `struct`. - -## Headers & Library Layering - -- Include order: module header → local/private headers → project headers → system headers. -- Headers must compile standalone (include all dependencies). -- Maintain proper library layering; avoid circular dependencies. -- Include minimally; use forward declarations where possible. -- Keep internal headers private to modules. -- Use full namespace qualifiers for out-of-line definitions. - -## Control Flow & Structure - -- Prefer early exits over deep nesting. -- Do not use `else` after `return`, `continue`, `break`, or `goto`. -- Encapsulate loops that compute predicates into helper functions. - -## Naming - -- LLDB's code style differs from LLVM's coding style. -- Variables are `snake_case`. -- Functions and methods are `UpperCamelCase`. -- Static, global and member variables have `s_`, `g_` and `m_` prefixes respectively. - -## General Guidelines - -- Use `assert` liberally; prefer `llvm_unreachable` for unreachable states. -- Do not use `using namespace std;` in headers. -- Provide a virtual method anchor for classes defined in headers. -- Do not use default labels in fully covered switches over enumerations. -- Use range-based for loops wherever possible. -- Capture `end()` outside loops if not using range-based iteration. -- Including `` is forbidded. Use LLVM’s `raw_ostream` instead. -- Don’t use `inline` when defining a function in a class definition. - -## Microscopic Details - -- Preserve existing style in modified code. -- Prefer pre-increment (`++i`) when value is unused. -- Use `private`, `protected`, or `public` keyword as appropriate to restrict class member visibility. -- Omit braces for single-statement `if`, `else`, `while`, `for` unless needed. - -## Review Style - -- Be specific and actionable in feedback. -- Explain the "why" behind recommendations. -- Link back to the LLVM Coding Standards: https://llvm.org/docs/CodingStandards.html. -- Ask clarifying questions when code intent is unclear. - -Ignore formatting and assume that's handled by external tools like `clang-format` and `black`. -Remember that these standards are **guidelines**. -Always prioritize consistency with the style that is already being used by the surrounding code. diff --git a/.github/instructions/llvm.instructions.md b/.github/instructions/llvm.instructions.md deleted file mode 100644 index 3f1308f51e676..0000000000000 --- a/.github/instructions/llvm.instructions.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -applyTo: llvm/**/* ---- - -When performing a code review, pay close attention to code modifying a function's -control flow. Could the change result in the corruption of performance profile -data? Could the change result in invalid debug information, in particular for -branches and calls? diff --git a/.github/new-issues-labeler.yml b/.github/new-issues-labeler.yml deleted file mode 100644 index ee7506c1366ef..0000000000000 --- a/.github/new-issues-labeler.yml +++ /dev/null @@ -1,38 +0,0 @@ -'clang': - - '/\bclang(?!\-)\b/i' - -'clang-format': - - '/\bclang-format/i' - -'clang-tidy': - - '/\bclang-tidy/i' - -'libc++': - - '/libc[+x]{2}(?!\-)/i' - -'libc++abi': - - '/libc[+x]{2}-?abi/i' - -'libc': - - '/\blibc(?![-+])\b/i' - -'flang': - - '/\bflang(?!\-)\b/i' - -'lld': - - '/\blld(?!\-)\b/i' - -'mlir': - - '/\bmlir(?!\-)\b/i' - -'bolt': - - '/\bbolt(?!\-)\b/i' - -'infra:commit-access-request': - - '/Request Commit Access/' - -'false-positive': - - '\bfalse[- ]positive\b' - -'false-negative': - - '\bfalse[- ]negative\b' diff --git a/.github/new-prs-labeler.yml b/.github/new-prs-labeler.yml deleted file mode 100644 index b87f9b9ff3c11..0000000000000 --- a/.github/new-prs-labeler.yml +++ /dev/null @@ -1,1449 +0,0 @@ -BOLT: - - changed-files: - - any-glob-to-any-file: - - bolt/**/* - -ClangIR: - - changed-files: - - any-glob-to-any-file: - - clang/include/clang/CIR/**/* - - clang/lib/CIR/**/* - - clang/tools/cir-*/**/* - - clang/test/CIR/**/* - -clang:bytecode: - - changed-files: - - any-glob-to-any-file: - - clang/docs/ConstantInterpreter.rst - - clang/lib/AST/ByteCode/**/* - - clang/test/AST/ByteCode/**/* - - clang/unittests/AST/ByteCode/**/* - -clang:dataflow: - - changed-files: - - any-glob-to-any-file: - - clang/include/clang/Analysis/FlowSensitive/**/* - - clang/lib/Analysis/FlowSensitive/**/* - - clang/unittests/Analysis/FlowSensitive/**/* - - clang/docs/DataFlowAnalysisIntro.md - - clang/docs/DataFlowAnalysisIntroImages/**/* - -clang:frontend: - - changed-files: - - any-glob-to-any-file: - - clang/lib/AST/**/* - - clang/include/clang/AST/**/* - - clang/lib/Basic/**/* - - clang/include/clang/Basic/**/* - - clang/lib/Interpreter/**/* - - clang/include/clang/Interpreter/**/* - - clang/lib/Lex/**/* - - clang/include/clang/Lex/**/* - - clang/lib/Parse/**/* - - clang/include/clang/Parse/**/* - - clang/lib/Sema/**/* - - clang/include/clang/Sema/**/* - -clang:headers: - - changed-files: - - any-glob-to-any-file: - - clang/lib/Headers/**/* - -compiler-rt: - - changed-files: - - any-glob-to-any-file: - - compiler-rt/**/* - -flang: - - changed-files: - - any-glob-to-any-file: - - flang/**/* - -flang:frontend: - - changed-files: - - any-glob-to-any-file: - - flang/Parser/**/* - - flang/Evaluate/**/* - - flang/Semantics/**/* - -libclc: - - changed-files: - - any-glob-to-any-file: - - libclc/** - -HLSL: - - changed-files: - - any-glob-to-any-file: - - clang/*HLSL*/**/* - - clang/**/*HLSL* - - llvm/**/Frontend/HLSL/**/* - -lld: - - changed-files: - - any-glob-to-any-file: - - lld/**/* - -llvm-lit: - - changed-files: - - any-glob-to-any-file: - - llvm/utils/lit/**/* - -PGO: - - changed-files: - - any-glob-to-any-file: - - llvm/**/ProfileData/**/* - - llvm/**/SampleProfile* - - llvm/**/CodeGen/MIRSampleProfile* - - llvm/lib/Transforms/Instrumentation/CGProfile.cpp - - llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp - - llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp - - llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp - - llvm/lib/Transforms/Instrumentation/PGO* - - llvm/lib/Transforms/Instrumentation/ValueProfile* - - llvm/test/Instrumentation/InstrProfiling/**/* - - llvm/test/Transforms/PGOProfile/**/* - - llvm/test/Transforms/SampleProfile/**/* - - llvm/**/llvm-profdata/**/* - - llvm/**/llvm-profgen/**/* - -vectorizers: - - changed-files: - - any-glob-to-any-file: - - llvm/lib/Transforms/Vectorize/**/* - - llvm/include/llvm/Transforms/Vectorize/**/* - -# IMPORTED FROM CODEOWNERS -LTO: - - changed-files: - - any-glob-to-any-file: - - llvm/*/LTO/** - - llvm/*/Linker/** - - llvm/*/ThinLTO/** - - llvm/lib/Transforms/*/FunctionImport* - - llvm/tools/gold/** - -clang:driver: - - changed-files: - - any-glob-to-any-file: - - clang/*/Driver/** - -compiler-rt:asan: - - changed-files: - - any-glob-to-any-file: - - compiler-rt/lib/asan/** - - compiler-rt/include/sanitizer/asan_interface.h - - compiler-rt/test/asan/** - - compiler-rt/lib/asan_abi/** - - compiler-rt/test/asan_abi/** - -compiler-rt:builtins: - - changed-files: - - any-glob-to-any-file: - - compiler-rt/lib/builtins/** - - compiler-rt/test/builtins/** - -compiler-rt:cfi: - - changed-files: - - any-glob-to-any-file: - - compiler-rt/lib/cfi/** - - compiler-rt/test/cfi/** - -compiler-rt:fuzzer: - - changed-files: - - any-glob-to-any-file: - - compiler-rt/lib/fuzzer/** - - compiler-rt/include/fuzzer/** - - compiler-rt/test/fuzzer/** - -compiler-rt:hwasan: - - changed-files: - - any-glob-to-any-file: - - compiler-rt/lib/hwasan/** - - compiler-rt/include/sanitizer/hwasan_interface.h - - compiler-rt/test/hwasan/** - -compiler-rt:lsan: - - changed-files: - - any-glob-to-any-file: - - compiler-rt/lib/lsan/** - - compiler-rt/include/sanitizer/lsan_interface.h - - compiler-rt/test/lsan/** - -compiler-rt:msan: - - changed-files: - - any-glob-to-any-file: - - compiler-rt/lib/msan/** - - compiler-rt/include/sanitizer/msan_interface.h - - compiler-rt/test/msan/** - -compiler-rt:sanitizer: - - changed-files: - - any-glob-to-any-file: - - llvm/lib/Transforms/Instrumentation/*Sanitizer* - - compiler-rt/lib/interception/** - - compiler-rt/lib/*san*/** - - compiler-rt/include/sanitizer/** - - compiler-rt/test/*san*/** - - compiler-rt/lib/fuzzer/** - - compiler-rt/include/fuzzer/** - - compiler-rt/test/fuzzer/** - - compiler-rt/lib/scudo/** - - compiler-rt/test/scudo/** - -compiler-rt:scudo: - - changed-files: - - any-glob-to-any-file: - - compiler-rt/lib/scudo/** - - compiler-rt/test/scudo/** - -compiler-rt:tsan: - - changed-files: - - any-glob-to-any-file: - - compiler-rt/lib/tsan/** - - compiler-rt/include/sanitizer/tsan_interface.h - - compiler-rt/include/sanitizer/tsan_interface_atomic.h - - compiler-rt/test/tsan/** - -compiler-rt:ubsan: - - changed-files: - - any-glob-to-any-file: - - compiler-rt/lib/ubsan/** - - compiler-rt/include/sanitizer/ubsan_interface.h - - compiler-rt/test/ubsan/** - - compiler-rt/lib/ubsan_minimal/** - - compiler-rt/test/ubsan_minimal/** - -xray: - - changed-files: - - any-glob-to-any-file: - - llvm/tools/llvm-xray/** - - compiler-rt/*/xray/** - - clang/include/clang/Basic/XRay* - - clang/lib/Basic/XRay* - - compiler-rt/*/xray/** - - llvm/include/llvm/XRay/** - - llvm/lib/XRay/** - - llvm/tools/llvm-xray/** - - llvm/unittests/XRay/** - - compiler-rt/*/xray/** - -clang:codegen: - - changed-files: - - any-glob-to-any-file: - - clang/lib/CodeGen/** - - clang/include/clang/CodeGen/** - -mlir: - - changed-files: - - any-glob-to-any-file: - - mlir/** - -mlir:core: - - changed-files: - - any-glob-to-any-file: - - mlir/include/mlir/Support/** - - mlir/lib/Support/** - - mlir/include/mlir/Parser/** - - mlir/lib/Parser/** - - mlir/include/mlir/IR/** - - mlir/lib/IR/** - - mlir/include/mlir/Bytecode/** - - mlir/lib/Bytecode/** - - mlir/include/mlir/AsmParser/** - - mlir/lib/AsmParser/** - - mlir/include/mlir/Pass/** - - mlir/lib/Pass/** - - mlir/include/mlir/Tools/** - - mlir/lib/Tools/** - - mlir/include/mlir/Reducer/** - - mlir/lib/Reducer/** - - mlir/include/mlir/Transforms/** - - mlir/lib/Transforms/** - - mlir/include/mlir/Debug/** - - mlir/lib/Debug/** - - mlir/tools/** - -mlir:ods: - - changed-files: - - any-glob-to-any-file: - - mlir/TableGen/** - - mlir/tblgen/** - - mlir/include/mlir/IR/*.td - -mlir:bindings: - - changed-files: - - any-glob-to-any-file: - - mlir/Bindings/** - -mlir:gpu: - - changed-files: - - any-glob-to-any-file: - - mlir/**/*GPU*/** - -mlir:amdgpu: - - changed-files: - - any-glob-to-any-file: - - mlir/**/AMDGPU/** - -mlir:amx: - - changed-files: - - any-glob-to-any-file: - - mlir/**/AMX/** - -mlir:affine: - - changed-files: - - any-glob-to-any-file: - - mlir/**/Affine/** - -mlir:arith: - - changed-files: - - any-glob-to-any-file: - - mlir/**/Arith/** - -mlir:neon: - - changed-files: - - any-glob-to-any-file: - - mlir/**/ArmNeon/** - -mlir:sme: - - changed-files: - - any-glob-to-any-file: - - mlir/**/ArmSME/** - -mlir:sve: - - changed-files: - - any-glob-to-any-file: - - mlir/**/ArmSVE/** - -mlir:async: - - changed-files: - - any-glob-to-any-file: - - mlir/**/Async/** - - mlir/**/Async/** - -mlir:bufferization: - - changed-files: - - any-glob-to-any-file: - - mlir/**/Bufferization/** - -mlir:complex: - - changed-files: - - any-glob-to-any-file: - - mlir/**/Complex/** - -mlir:cf: - - changed-files: - - any-glob-to-any-file: - - mlir/**/ControlFlow/** - -mlir:dlti: - - changed-files: - - any-glob-to-any-file: - - mlir/**/DLTI/** - -mlir:emitc: - - changed-files: - - any-glob-to-any-file: - - mlir/**/*EmitC*/** - - mlir/lib/Target/Cpp/** - -mlir:func: - - changed-files: - - any-glob-to-any-file: - - mlir/**/Func/** - -mlir:irdl: - - changed-files: - - any-glob-to-any-file: - - mlir/**/IRDL/** - -mlir:index: - - changed-files: - - any-glob-to-any-file: - - mlir/**/Index/** - -mlir:llvm: - - changed-files: - - any-glob-to-any-file: - - mlir/**/LLVM* - - mlir/**/LLVM*/** - -mlir:linalg: - - changed-files: - - any-glob-to-any-file: - - mlir/**/*linalg/** - - mlir/**/*Linalg/** - -mlir:mlprogram: - - changed-files: - - any-glob-to-any-file: - - mlir/**/MLProgram/** - -mlir:math: - - changed-files: - - any-glob-to-any-file: - - mlir/**/Math/** - -mlir:memref: - - changed-files: - - any-glob-to-any-file: - - mlir/**/MemRef/** - -mlir:nvgpu: - - changed-files: - - any-glob-to-any-file: - - mlir/**/NVGPU/** - -mlir:openacc: - - changed-files: - - any-glob-to-any-file: - - mlir/**/*OpenACC* - - mlir/**/*OpenACC*/** - -mlir:openmp: - - changed-files: - - any-glob-to-any-file: - - mlir/**/*OpenMP* - - mlir/**/*OpenMP*/** - -mlir:pdl: - - changed-files: - - any-glob-to-any-file: - - mlir/**/PDL/** - -mlir:quant: - - changed-files: - - any-glob-to-any-file: - - mlir/**/Quant/** - -mlir:scf: - - changed-files: - - any-glob-to-any-file: - - mlir/**/SCF/** - -mlir:spirv: - - changed-files: - - any-glob-to-any-file: - - mlir/**/SPIRV/** - - mlir/**/SPIRVTo*/** - - mlir/**/*ToSPIRV/** - - mlir/tools/mlir-spirv-cpu-runner/** - - mlir/tools/mlir-vulkan-runner/** - - mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp - -mlir:shape: - - changed-files: - - any-glob-to-any-file: - - mlir/**/Shape/** - -mlir:sparse: - - changed-files: - - any-glob-to-any-file: - - mlir/**/SparseTensor/** - -mlir:tensor: - - changed-files: - - any-glob-to-any-file: - - mlir/**/Tensor/** - -mlir:tosa: - - changed-files: - - any-glob-to-any-file: - - mlir/**/*Tosa*/** - -mlir:ub: - - changed-files: - - any-glob-to-any-file: - - mlir/**/UB/** - -mlir:vector: - - changed-files: - - any-glob-to-any-file: - - mlir/**/*Vector/** - -mlir:execution-engine: - - changed-files: - - any-glob-to-any-file: - - mlir/**/ExecutionEngine/** - -mlir:presburger: - - changed-files: - - any-glob-to-any-file: - - mlir/**/*Presburger*/** - -mlir:python: - - changed-files: - - any-glob-to-any-file: - - mlir/python/**/* - -mlir:vectorops: - - changed-files: - - any-glob-to-any-file: - - mlir/**/Vector/**/* - -coroutines: - - changed-files: - - any-glob-to-any-file: - - clang/docs/DebuggingCoroutines.rst - - clang/lib/Sema/SemaCoroutine.cpp - - clang/lib/CodeGen/CGCoroutine.cpp - - clang/test/CodeGenCoroutines/** - - llvm/docs/Coroutines.rst - - llvm/include/llvm/Transforms/Coroutines/** - - llvm/lib/Transforms/Coroutines/** - - llvm/test/Transforms/Coroutines/* - -clang:modules: - - changed-files: - - any-glob-to-any-file: - - clang/docs/StandardCPlusPlusModules.rst - - clang/include/clang/AST/AbstractBasicReader.h - - clang/include/clang/AST/AbstractBasicWriter.h - - clang/include/clang/AST/AbstractTypeReader.h - - clang/include/clang/AST/AbstractTypeWriter.h - - clang/include/clang/AST/PropertiesBase.td - - clang/include/clang/AST/ODRHash.h - - clang/include/clang/AST/TypeProperties.td - - clang/include/clang/Basic/Module.h - - clang/include/clang/Frontend/PrecompiledPreamble.h - - clang/include/clang/Lex/ModuleLoader.h - - clang/include/clang/Lex/ModuleMap.h - - clang/include/clang/Serialization/** - - clang/lib/AST/ODRHash.cpp - - clang/lib/AST/StmtProfile.cpp - - clang/lib/Basic/Module.cpp - - clang/lib/Frontend/ModuleDependencyCollector.cpp - - clang/lib/Frontend/PrecompiledPreamble.cpp - - clang/lib/Lex/ModuleMap.cpp - - clang/lib/Sema/SemaModule.cpp - - clang/lib/Serialization/** - - clang/test/CXX/module/** - - clang/test/Modules/** - - clang/unittests/Serialization/* - -clang-tidy: - - changed-files: - - any-glob-to-any-file: - - clang-tools-extra/clang-tidy/** - - clang-tools-extra/docs/clang-tidy/** - - clang-tools-extra/test/clang-tidy/** - -clang-tools-extra: - - changed-files: - - any-glob-to-any-file: - - clang-tools-extra/** - -tools:llvm-mca: - - changed-files: - - any-glob-to-any-file: - - llvm/tools/llvm-mca/** - - llvm/include/llvm/MCA/** - - llvm/lib/MCA/** - -clang: - - changed-files: - - all-globs-to-all-files: - - clang/** - - '!clang/**/Format/**' - - '!clang/tools/clang-format/**' - -testing-tools: - - changed-files: - - any-glob-to-any-file: - - llvm/include/llvm/FileCheck/** - - llvm/lib/FileCheck/** - - llvm/test/FileCheck/** - - llvm/unittests/FileCheck/** - - llvm/utils/lit/** - - llvm/utils/split-file/** - - llvm/utils/not/** - - llvm/utils/count/** - - llvm/utils/FileCheck/** - - llvm/docs/CommandGuide/FileCheck.rst - - llvm/docs/CommandGuide/lit.rst - - llvm/docs/TestingGuide.rst - - llvm/test/Other/FileCheck-space.txt - - llvm/utils/UpdateTestChecks/** - - llvm/utils/update*_test_checks.py - -debuginfo: - - changed-files: - - any-glob-to-any-file: - - clang/lib/CodeGen/CGDebugInfo.* - - llvm/include/llvm/BinaryFormat/Dwarf.* - - llvm/include/llvm/CodeGen/*Debug*.* - - llvm/include/llvm/DebugInfo/** - - llvm/include/llvm/Debuginfod/** - - llvm/include/llvm/Frontend/Debug/** - - llvm/include/llvm/IR/Debug*.* - - llvm/include/llvm/Object/*Debug*.* - - llvm/include/llvm/ObjectYAML/*Debug*.* - - llvm/include/llvm/Transforms/Utils/*Debug*.* - - llvm/include/llvm-c/DebugInfo.h - - llvm/lib/BinaryFormat/Dwarf.cpp - - llvm/lib/CodeGen/AsmPrinter/*Debug*.* - - llvm/lib/CodeGen/AsmPrinter/Dwarf*.* - - llvm/lib/CodeGen/AsmPrinter/DIE*.* - - llvm/lib/CodeGen/LiveDebugValues/** - - llvm/lib/CodeGen/*Debug*.* - - llvm/lib/CodeGen/DwarfEHPrepare.cpp - - llvm/lib/DebugInfo/** - - llvm/lib/Debuginfod/** - - llvm/lib/DWARFLinkerParallel/** - - llvm/lib/IR/Debug*.cpp - - llvm/lib/MC/MCDwarf.cpp - - llvm/lib/Transforms/Utils/*Debug*.* - - llvm/test/DebugInfo/** - - llvm/test/tools/dsymutil/** - - llvm/test/tools/llvm-debuginfo-analyzer/** - - llvm/test/tools/llvm-debuginfod/** - - llvm/test/tools/llvm-debuginfod-find/** - - llvm/test/tools/llvm-dwarfdump/** - - llvm/test/tools/llvm-dwarfutil/** - - llvm/test/tools/llvm-dwp/** - - llvm/test/tools/llvm-gsymutil/** - - llvm/test/tools/llvm-pdbuti/** - - llvm/tools/dsymutil/** - - llvm/tools/llvm-debuginfo-analyzer/** - - llvm/tools/llvm-debuginfod/** - - llvm/tools/llvm-debuginfod-find/** - - llvm/tools/llvm-dwarfdump/** - - llvm/tools/llvm-dwarfutil/** - - llvm/tools/llvm-dwp/** - - llvm/tools/llvm-gsymutil/** - - llvm/tools/llvm-pdbutil/** - -github:workflow: - - changed-files: - - any-glob-to-any-file: - - .github/workflows/** - -cmake: - - changed-files: - - any-glob-to-any-file: - - cmake/** - - llvm/cmake/** - - runtimes/** - -flang:driver: - - changed-files: - - any-glob-to-any-file: - - flang/tools/flang-driver/** - - flang/unittests/Frontend/** - - flang/lib/FrontendTool/** - - flang/lib/Frontend/** - - flang/include/flang/Frontend/** - - flang/include/flang/FrontendTool/** - - flang/test/Driver/** - -backend:m68k: - - changed-files: - - any-glob-to-any-file: - - llvm/lib/Target/M68k/** - - clang/lib/Basic/Targets/M68k.* - - clang/lib/CodeGen/Targets/M68k.cpp - - llvm/test/CodeGen/M68k/** - - llvm/test/MC/Disassembler/M68k/** - - llvm/test/MC/M68k/** - -libc++: - - changed-files: - - any-glob-to-any-file: - - libcxx/** - - .github/workflows/libcxx-* - -libc++abi: - - changed-files: - - any-glob-to-any-file: - - libcxxabi/** - -libunwind: - - changed-files: - - any-glob-to-any-file: - - libunwind/** - -objectyaml: - - changed-files: - - any-glob-to-any-file: - - llvm/include/llvm/ObjectYAML/** - - llvm/lib/ObjectYAML/** - - llvm/test/tools/obj2yaml/** - - llvm/test/tools/yaml2obj/** - - llvm/tools/obj2yaml/** - - llvm/tools/yaml2obj/** - -clang:analysis: - - changed-files: - - any-glob-to-any-file: - - clang/include/clang/Analysis/** - - clang/lib/Analysis/** - -clang:static analyzer: - - changed-files: - - any-glob-to-any-file: - - clang/include/clang/StaticAnalyzer/** - - clang/lib/StaticAnalyzer/** - - clang/tools/scan-build/** - - clang/utils/analyzer/** - - clang/docs/analyzer/** - - clang/test/Analysis/** - -pgo: - - changed-files: - - any-glob-to-any-file: - - llvm/lib/Transforms/Instrumentation/CGProfile.cpp - - llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp - - llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp - - llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp - - llvm/lib/Transforms/Instrumentation/PGO* - - llvm/lib/Transforms/Instrumentation/ValueProfile* - - llvm/test/Instrumentation/InstrProfiling/** - - llvm/test/Transforms/PGOProfile/** - - compiler-rt/lib/profile/** - - compiler-rt/lib/memprof/** - - compiler-rt/test/profile/** - - compiler-rt/test/memprof/** - - llvm/tools/llvm-profdata/** - - llvm/tools/llvm-profgen/** - - llvm/test/tools/llvm-profdata/** - - llvm/test/tools/llvm-profgen/** - - llvm/unittests/ProfileData/* - -openacc: - - changed-files: - - any-glob-to-any-file: - - flang/**/OpenACC/** - - flang/include/flang/Lower/OpenACC.h - - flang/docs/OpenACC.md - - flang/lib/Parser/openacc-parsers.cpp - - flang/lib/Lower/OpenACC.cpp - - llvm/**/Frontend/OpenACC/** - - llvm/unittests/Frontend/OpenACCTest.cpp - - mlir/test/Target/LLVMIR/openacc-llvm.mlir - - mlir/**/*OpenACC/** - -flang:runtime: - - changed-files: - - any-glob-to-any-file: - - flang/runtime/** - -flang:parser: - - changed-files: - - any-glob-to-any-file: - - flang/**/Parser/** - -flang:semantics: - - changed-files: - - any-glob-to-any-file: - - flang/**/Evaluate/** - - flang/**/Semantics/** - -flang:fir-hlfir: - - changed-files: - - any-glob-to-any-file: - - flang/**/Lower/** - - flang/**/Optimizer/** - -flang:codegen: - - changed-files: - - any-glob-to-any-file: - - flang/**/CodeGen/** - -llvm:codegen: - - changed-files: - - any-glob-to-any-file: - - llvm/lib/CodeGen/* - - llvm/lib/CodeGen/MIRParser/* - - llvm/lib/CodeGen/LiveDebugValues/* - - llvm/lib/CodeGen/AsmPrinter/* - -llvm:globalisel: - - changed-files: - - any-glob-to-any-file: - - llvm/**/GlobalISel/** - - llvm/utils/TableGen/GlobalISel* - -function-specialization: - - changed-files: - - any-glob-to-any-file: - - llvm/include/llvm/Transforms/Utils/SCCPSolver.h - - llvm/lib/Transforms/Utils/SCCPSolver.cpp - - llvm/include/llvm/Transforms/IPO/FunctionSpecialization.h - - llvm/lib/Transforms/IPO/FunctionSpecialization.cpp - - llvm/test/Transforms/FunctionSpecialization/* - -libc: - - changed-files: - - any-glob-to-any-file: - - libc/** - - utils/bazel/llvm-project-overlay/libc/** - -clang-format: - - changed-files: - - any-glob-to-any-file: - - clang/**/Format/** - - clang/tools/clang-format/** - -flang:openmp: - - changed-files: - - any-glob-to-any-file: - - flang/test/**/OpenMP/** - - flang/lib/Lower/OpenMP.cpp - - flang/lib/Semantics/resolve-directives.cpp - - flang/lib/Semantics/check-omp-structure.cpp - - flang/lib/Optimizer/Transforms/OMP* - - flang/test/Fir/convert-to-llvm-openmp-and-fir.fir - - flang/test/Lower/OpenMP/** - - flang/test/Transforms/omp* - - mlir/**/*OpenMP* - - mlir/test/Target/LLVMIR/openmp* - - llvm/lib/Frontend/OpenMP/** - - llvm/include/llvm/Frontend/OpenMP/** - - llvm/unittests/Frontend/OpenMP* - -llvm:ir: - - changed-files: - - any-glob-to-any-file: - - llvm/lib/IR/** - - llvm/include/llvm/IR/** - - llvm/docs/LangRef.rst - - llvm/unittests/IR/** - -llvm:SandboxIR: - - changed-files: - - any-glob-to-any-file: - - llvm/lib/SandboxIR/** - - llvm/include/llvm/SandboxIR/** - - llvm/docs/SandboxIR.md - - llvm/unittests/SandboxIR/** - -llvm:analysis: - - changed-files: - - any-glob-to-any-file: - - llvm/lib/Analysis/** - - llvm/include/llvm/Analysis/** - - llvm/test/Analysis/** - - llvm/unittests/Analysis/** - -llvm:adt: - - changed-files: - - any-glob-to-any-file: - - llvm/**/ADT/* - -llvm:support: - - changed-files: - - any-glob-to-any-file: - - llvm/**/Support/** - -# Skip llvm/test/MC and llvm/unittests/MC, which includes target-specific directories. -llvm:mc: - - changed-files: - - any-glob-to-any-file: - - llvm/include/llvm/MC/** - - llvm/lib/MC/** - - llvm/tools/llvm-mc/** - -llvm:transforms: - - changed-files: - - any-glob-to-any-file: - - llvm/lib/Transforms/** - - llvm/include/llvm/Transforms/** - - llvm/test/Transforms/** - - llvm/unittests/Transforms/** - -llvm:instcombine: - - changed-files: - - any-glob-to-any-file: - - llvm/lib/Analysis/InstructionSimplify.cpp - - llvm/lib/Transforms/InstCombine/** - - llvm/include/llvm/Transforms/InstCombine/ - - llvm/include/llvm/Analysis/InstructionSimplify.h - - llvm/test/Transforms/InstCombine/** - - llvm/test/Transforms/InstSimplify/** - -llvm:vectorcombine: - - changed-files: - - any-glob-to-any-file: - - llvm/lib/Transforms/Vectorize/VectorCombine.cpp - - llvm/test/Transforms/VectorCombine/** - -clangd: - - changed-files: - - any-glob-to-any-file: - - clang-tools-extra/clangd/** - -hlsl: - - changed-files: - - any-glob-to-any-file: - - clang/test/ParserHLSL/** - - clang/test/SemaHLSL/** - - clang/test/AST/HLSL/** - - clang/test/CodeGenHLSL/** - - clang/cmake/caches/HLSL.cmake - - clang/include/clang/Basic/HLSL*.h - - clang/include/clang/Sema/HLSL*.h - - clang/docs/HLSL/** - - clang/lib/Driver/ToolChains/HLSL* - - clang/lib/Parse/ParseHLSL.cpp - - clang/lib/Sema/HLSLExternalSemaSource.cpp - - clang/lib/Sema/SemaHLSL.cpp - - clang/lib/CodeGen/CGHLSLRuntime.* - - clang/lib/CodeGen/CGHLSLBuiltins.cpp - - llvm/include/llvm/Frontend/HLSL/** - - llvm/lib/Frontend/HLSL/** - -llvm:SelectionDAG: - - changed-files: - - any-glob-to-any-file: - - llvm/include/llvm/CodeGen/SelectionDAG*.h - - llvm/include/llvm/CodeGen/SDNodeProperties.td - - llvm/include/llvm/Target/TargetSelectionDAG.td - - llvm/lib/CodeGen/SelectionDAG/** - - llvm/utils/TableGen/CodeGenDAG* - - llvm/utils/TableGen/DAGISel* - - llvm/include/llvm/CodeGen/DAGCombine.h - - llvm/include/llvm/CodeGen/ISDOpcodes.h - -backend:DirectX: - - changed-files: - - any-glob-to-any-file: - - '**/*DirectX*' - - '**/*DXIL*' - - '**/*dxil*' - - '**/*DirectX*/**' - - '**/*DXIL*/**' - - '**/*dxil*/**' - - '**/*DXContainer*' - - '**/*DXContainer*/**' - - clang/lib/Sema/SemaDirectX.cpp - - clang/include/clang/Sema/SemaDirectX.h - - clang/include/clang/Basic/BuiltinsDirectX.td - - clang/lib/CodeGen/TargetBuiltins/DirectX.cpp - - clang/test/CodeGenDirectX/** - - clang/test/SemaDirectX/** - -backend:SPIR-V: - - changed-files: - - any-glob-to-any-file: - - clang/lib/Driver/ToolChains/SPIRV.* - - clang/lib/Sema/SemaSPIRV.cpp - - clang/include/clang/Sema/SemaSPIRV.h - - clang/include/clang/Basic/BuiltinsSPIRV.td - - clang/test/CodeGenSPIRV/** - - clang/test/SemaSPIRV/** - - llvm/lib/Target/SPIRV/** - - llvm/test/CodeGen/SPIRV/** - - llvm/test/Frontend/HLSL/** - - llvm/docs/SPIRVUsage.rst - -mlgo: - - changed-files: - - any-glob-to-any-file: - - llvm/lib/Analysis/ML* - - llvm/include/llvm/Analysis/ML* - - llvm/lib/Analysis/*Runner.cpp - - llvm/include/llvm/Analysis/*Runner.h - - llvm/unittests/Analysis/ML* - - llvm/lib/Analysis/FunctionPropertiesAnalysis.cpp - - llvm/lib/Analysis/TrainingLogger.cpp - - llvm/include/llvm/Analysis/FunctionPropertiesAnalysis.h - - llvm/include/llvm/Analysis/Utils/TrainingLogger.h - - llvm/test/Analysis/FunctionPropertiesAnalysis/* - - llvm/unittests/Analysis/FunctionPropertiesAnalysisTest.cpp - - llvm/test/Transforms/inline/ML/** - - llvm/lib/CodeGen/ML* - - llvm/unittests/CodeGen/ML* - - llvm/test/CodeGen/MLRegAlloc/** - - llvm/utils/mlgo-utils/** - - llvm/docs/MLGO.rst - - llvm/include/llvm/Analysis/IR2Vec.h - - llvm/lib/Analysis/IR2Vec.cpp - - llvm/lib/Analysis/models/** - - llvm/include/llvm/CodeGen/MIR2Vec.h - - llvm/lib/CodeGen/MIR2Vec.cpp - - llvm/test/Analysis/IR2Vec/** - - llvm/test/CodeGen/MIR2Vec/** - - llvm/unittests/Analysis/IR2VecTest.cpp - - llvm/unittests/CodeGen/MIR2VecTest.cpp - - llvm/tools/llvm-ir2vec/** - - llvm/docs/CommandGuide/llvm-ir2vec.rst - -tools:llvm-exegesis: - - changed-files: - - any-glob-to-any-file: - - llvm/tools/llvm-exegesis/** - - llvm/test/tools/llvm-exegesis/** - - llvm/unittests/tools/llvm-exegesis/** - -tools:llvm-reduce: - - changed-files: - - any-glob-to-any-file: - - llvm/tools/llvm-reduce/** - -platform:windows: - - changed-files: - - any-glob-to-any-file: - - lld/COFF/** - - clang/lib/Driver/MSVC.cpp - - clang/lib/Driver/MinGW.cpp - - llvm/lib/DebugInfo/CodeView/** - - llvm/lib/DebugInfo/PDB/** - - llvm/lib/WindowsDriver/** - - llvm/lib/Support/Windows/** - - llvm/lib/BinaryFormat/COFF.cpp - -llvm:regalloc: - - changed-files: - - any-glob-to-any-file: - - llvm/**/CodeGen/CalcSpillWeights* - - llvm/**/CodeGen/InlineSpiller* - - llvm/**/CodeGen/InterferenceCache* - - llvm/**/CodeGen/LiveInterval* - - llvm/**/CodeGen/LiveRange* - - llvm/**/CodeGen/LiveReg* - - llvm/**/CodeGen/LiveVariables* - - llvm/**/CodeGen/MachineCopyPropagation* - - llvm/**/CodeGen/PHIElimination* - - llvm/**/CodeGen/ProcessImplicitDefs.cpp - - llvm/**/CodeGen/Register* - - llvm/**/CodeGen/RegUsage* - - llvm/**/CodeGen/RenameIndependentSubregs.cpp - - llvm/**/CodeGen/SlotIndexes.h - - llvm/**/CodeGen/SpillPlacement* - - llvm/**/CodeGen/SplitKit* - - llvm/**/CodeGen/VirtRegMap.h - - llvm/include/PBQP/** - - llvm/include/PBQPRAConstraint.h - - llvm/include/llvm/CodeGen/Spiller.h - - llvm/**/*RegAlloc - -lldb: - - changed-files: - - any-glob-to-any-file: - - lldb/** - -lldb-dap: - - changed-files: - - any-glob-to-any-file: - - lldb/tools/lldb-dap/** - -backend:AMDGPU: - - changed-files: - - any-glob-to-any-file: - - '**/*amdgpu*' - - '**/*AMDGPU*' - - '**/*amdgpu*/**' - - '**/*AMDGPU*/**' - -backend:NVPTX: - - changed-files: - - any-glob-to-any-file: - - 'llvm/**/*nvvm*' - - 'llvm/**/*NVVM*' - - 'llvm/**/*nvptx*' - - 'llvm/**/*NVPTX*' - - 'llvm/**/*nvvm*/**' - - 'llvm/**/*NVVM*/**' - - 'llvm/**/*nvptx*/**' - - 'llvm/**/*NVPTX*/**' - -backend:MIPS: - - changed-files: - - any-glob-to-any-file: - - '**/*mips*' - - '**/*Mips*' - - '**/*mips*/**' - - '**/*Mips*/**' - -backend:RISC-V: - - changed-files: - - any-glob-to-any-file: - - '**/*riscv*' - - '**/*RISCV*' - - '**/*riscv*/**' - - '**/*RISCV*/**' - -backend:Xtensa: - - changed-files: - - any-glob-to-any-file: - - '**/*xtensa*' - - '**/*Xtensa*' - - '**/*xtensa*/**' - - '**/*Xtensa*/**' - -lld:coff: - - changed-files: - - any-glob-to-any-file: - - lld/**/COFF/** - - lld/Common/** - -lld:elf: - - changed-files: - - any-glob-to-any-file: - - lld/**/ELF/** - - lld/Common/** - -lld:macho: - - changed-files: - - any-glob-to-any-file: - - lld/**/MachO/** - - lld/Common/** - -lld:wasm: - - changed-files: - - any-glob-to-any-file: - - lld/**/wasm/** - - lld/Common/** - -backend:ARC: - - changed-files: - - any-glob-to-any-file: - - llvm/lib/Target/ARC/** - - clang/lib/Basic/Targets/ARC.h - - clang/lib/Basic/Targets/ARC.cpp - - clang/lib/CodeGen/Targets/ARC.cpp - -backend:ARM: - - changed-files: - - any-glob-to-any-file: - - llvm/include/llvm/IR/IntrinsicsARM.td - - llvm/test/MC/ARM/** - - llvm/lib/Target/ARM/** - - llvm/test/CodeGen/ARM/** - - clang/lib/Basic/Targets/ARM* - - clang/lib/Driver/ToolChains/Arch/ARM.* - - clang/lib/CodeGen/Targets/ARM.cpp - - clang/include/clang/Basic/BuiltinsARM* - - llvm/test/MC/DisasemblerARM/** - - clang/include/clang/Sema/SemaARM.h - - clang/lib/Sema/SemaARM.cpp - -backend:AArch64: - - changed-files: - - any-glob-to-any-file: - - llvm/include/llvm/IR/IntrinsicsAArch64.td - - llvm/test/MC/AArch64/** - - llvm/lib/Target/AArch64/** - - llvm/test/CodeGen/AArch64/** - - clang/lib/Basic/Targets/AArch64* - - clang/lib/Driver/ToolChains/Arch/AArch64.* - - clang/lib/CodeGen/Targets/AArch64.cpp - - clang/include/clang/Basic/BuiltinsAArch64* - - llvm/test/MC/Disassembler/AArch64/** - - clang/include/clang/Sema/SemaARM.h - - clang/lib/Sema/SemaARM.cpp - -backend:CSKY: - - changed-files: - - any-glob-to-any-file: - - llvm/lib/Target/CSKY/** - - llvm/include/llvm/TargetParser/CSKYTargetParser.def - - llvm/include/llvm/TargetParser/CSKYTargetParser.h - - llvm/include/llvm/BinaryFormat/ELFRelocs/CSKY.def - - llvm/lib/TargetParser/CSKYTargetParser.cpp - - llvm/lib/Support/CSKYAttributes.cpp - - llvm/lib/Support/CSKYAttributeParser.cpp - - clang/lib/Basic/Targets/CSKY.h - - clang/lib/Basic/Targets/CSKY.cpp - - clang/lib/CodeGen/Targets/CSKY.cpp - - clang/lib/Driver/ToolChains/CSKY* - -backend:Hexagon: - - changed-files: - - any-glob-to-any-file: - - clang/include/clang/Basic/BuiltinsHexagon*.def - - clang/include/clang/Sema/SemaHexagon.h - - clang/lib/Basic/Targets/Hexagon.* - - clang/lib/CodeGen/Targets/Hexagon.cpp - - clang/lib/Driver/ToolChains/Hexagon.* - - clang/lib/Sema/SemaHexagon.cpp - - lld/ELF/Arch/Hexagon.cpp - - lldb/source/Plugins/ABI/Hexagon/** - - lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/** - - llvm/include/llvm/BinaryFormat/ELFRelocs/Hexagon.def - - llvm/include/llvm/IR/IntrinsicsHexagon* - - llvm/include/llvm/Support/Hexagon* - - llvm/lib/Support/Hexagon* - - llvm/lib/Target/Hexagon/** - - llvm/test/CodeGen/Hexagon/** - - llvm/test/CodeGen/*/Hexagon/** - - llvm/test/DebugInfo/*/Hexagon/** - - llvm/test/Transforms/*/Hexagon - - llvm/test/MC/Disassembler/Hexagon/** - - llvm/test/MC/Hexagon/** - - llvm/test/tools/llvm-objdump/ELF/Hexagon/** - -backend:Lanai: - - changed-files: - - any-glob-to-any-file: - - llvm/lib/Target/Lanai/** - - clang/lib/Basic/Targets/Lanai.h - - clang/lib/Basic/Targets/Lanai.cpp - - clang/lib/CodeGen/Targets/Lanai.cpp - - clang/lib/Driver/ToolChains/Lanai* - -backend:loongarch: - - changed-files: - - any-glob-to-any-file: - - llvm/include/llvm/IR/IntrinsicsLoongArch.td - - llvm/test/MC/LoongArch/** - - llvm/lib/Target/LoongArch/** - - llvm/test/CodeGen/LoongArch/** - - clang/lib/Basic/Targets/LoongArch* - - clang/lib/Driver/ToolChains/Arch/LoongArch.* - - clang/lib/CodeGen/Targets/LoongArch.cpp - - clang/include/clang/Basic/BuiltinsLoongArch* - - clang/include/clang/Sema/SemaLoongArch.h - - clang/lib/Sema/SemaLoongArch.cpp - -backend:MSP430: - - changed-files: - - any-glob-to-any-file: - - llvm/include/llvm/IR/IntrinsicsMSP430.td - - llvm/test/MC/MSP430/** - - llvm/lib/Target/MSP430/** - - llvm/test/CodeGen/MSP430/** - - clang/lib/Basic/Targets/MSP430* - - clang/lib/Driver/ToolChains/Arch/MSP430.* - - clang/lib/CodeGen/Targets/MSP430.cpp - - clang/include/clang/Basic/BuiltinsMSP430* - - llvm/test/MC/Disassembler/MSP430/** - -backend:Sparc: - - changed-files: - - any-glob-to-any-file: - - llvm/include/llvm/IR/IntrinsicsSparc.td - - llvm/test/MC/Sparc/** - - llvm/lib/Target/Sparc/** - - llvm/test/CodeGen/Sparc/** - - clang/lib/Basic/Targets/Sparc* - - clang/lib/Driver/ToolChains/Arch/Sparc.* - - clang/lib/CodeGen/Targets/Sparc.cpp - - clang/include/clang/Basic/BuiltinsSparc* - - llvm/test/MC/Disassembler/Sparc/** - -backend:WebAssembly: - - changed-files: - - any-glob-to-any-file: - - llvm/lib/Target/WebAssembly/** - - llvm/test/CodeGen/WebAssembly/** - - clang/lib/Basic/Targets/WebAssembly* - - clang/include/clang/Basic/BuiltinsWebAssembly.def - - clang/include/clang/Basic/WebAssemblyReferenceTypes.def - - clang/lib/CodeGen/Targets/WebAssembly* - - llvm/include/llvm/IR/IntinsicsWebAssembly.td - - llvm/include/llvm/Object/Wasm* - - llvm/lib/CodeGen/AsmPrinter/Wasm* - - llvm/lib/CodeGen/Wasm* - - llvm/lib/MC/MCParser/Wasm* - - llvm/lib/MC/Wasm* - - llvm/lib/ObjCopy/wasm/** - - llvm/lib/Object/Wasm* - - clang/lib/Driver/Toolchains/WebAssembly* - - clang/lib/Headers/wasm_simd128.h - - clang/test/CodeGen/WebAssembly/** - - clang/test/SemaCXX/*wasm* - - clang/test/Sema/*wasm* - - llvm/include/llvm/BinaryFormat/Wasm.h - - llvm/unittests/Target/WebAssembly/** - - llvm/test/DebugInfo/WebAssembly/** - - llvm/test/MC/WebAssembly/** - - clang/include/clang/Sema/SemaWasm.h - - clang/lib/Sema/SemaLoongWasm.cpp - -backend:X86: - - changed-files: - - any-glob-to-any-file: - - llvm/include/llvm/IR/IntrinsicsX86.td - - llvm/lib/Target/X86/** - - llvm/test/CodeGen/X86/** - - llvm/test/MC/X86/** - - llvm/test/MC/Disassembler/X86/** - - llvm/test/Analysis/CostModel/X86/** - - llvm/test/tools/llvm-mca/X86/** - - clang/lib/Basic/Targets/X86/** - - clang/lib/Driver/ToolChains/Arch/X86.* - - clang/lib/CodeGen/Targets/X86.* - - clang/lib/Headers/** - - clang/test/CodeGen/X86/** - - clang/include/clang/Basic/BuiltinsX86* - - llvm/include/llvm/Support/X86DisassemblerDecoderCommon.h - - llvm/include/llvm/TargetParser/X86* - - llvm/lib/TargetParser/X86* - - llvm/utils/TableGen/X86* - - clang/include/clang/Sema/SemaX86.h - - clang/lib/Sema/SemaX86.cpp - -backend:PowerPC: - - changed-files: - - any-glob-to-any-file: - - llvm/include/llvm/BinaryFormat/ELFRelocs/PowerPC* - - llvm/include/llvm/BinaryFormat/XCOFF.h - - llvm/include/llvm/IR/IntrinsicsPowerPC.td - - llvm/lib/CodeGen/AsmPrinter/AIXException.cpp - - llvm/lib/Target/PowerPC/** - - llvm/test/Analysis/**/PowerPC/** - - llvm/test/CodeGen/PowerPC/** - - llvm/test/CodeGen/MIR/PowerPC/** - - llvm/test/DebugInfo/XCOFF/** - - llvm/test/DebugInfo/PowerPC/** - - llvm/test/LTO/PowerPC/** - - llvm/test/MC/Disassembler/PowerPC/** - - llvm/test/MC/PowerPC/** - - llvm/test/MC/XCOFF/** - - llvm/test/Transforms/**/PowerPC/** - - clang/include/clang/Basic/BuiltinsPPC.* - - clang/lib/Basic/Targets/PPC.* - - clang/lib/CodeGen/Targets/PPC.cpp - - clang/lib/Driver/ToolChains/PPC* - - clang/lib/Driver/ToolChains/AIX* - - clang/lib/Driver/ToolChains/Arch/PPC.* - - clang/test/CodeGen/PowerPC/** - - clang/include/clang/Sema/SemaPPC.h - - clang/lib/Sema/SemaPPC.cpp - -backend:SystemZ: - - changed-files: - - any-glob-to-any-file: - - llvm/include/llvm/BinaryFormat/ELFRelocs/SystemZ* - - llvm/include/llvm/BinaryFormat/GOFF.h - - llvm/include/llvm/IR/IntrinsicsSystemZ.td - - llvm/lib/Target/SystemZ/** - - llvm/test/Analysis/**/SystemZ/** - - llvm/test/CodeGen/SystemZ/** - - llvm/test/DebugInfo/SystemZ/** - - llvm/test/ExecutionEngine/**/SystemZ/** - - llvm/test/MC/Disassembler/SystemZ/** - - llvm/test/MC/GOFF/** - - llvm/test/MC/SystemZ/** - - llvm/test/Transforms/**/SystemZ/** - - clang/include/clang/Basic/BuiltinsSystemZ.* - - clang/lib/Basic/Targets/SystemZ.* - - clang/lib/CodeGen/Targets/SystemZ.cpp - - clang/lib/Driver/ToolChains/ZOS* - - clang/lib/Driver/ToolChains/Arch/SystemZ.* - - clang/test/CodeGen/SystemZ/** - - clang/include/clang/Sema/SemaSystemZ.h - - clang/lib/Sema/SemaSystemZ.cpp - -third-party:unittests: - - changed-files: - - any-glob-to-any-file: - - third-party/unittests/** - -third-party:benchmark: - - changed-files: - - any-glob-to-any-file: - - third-party/benchmark/** - -llvm:binary-utilities: - - changed-files: - - any-glob-to-any-file: - - llvm/docs/CommandGuide/llvm-* - - llvm/include/llvm/BinaryFormat/** - - llvm/include/llvm/DebugInfo/Symbolize/** - - llvm/include/llvm/ObjCopy/** - - llvm/include/llvm/Object/** - - llvm/lib/BinaryFormat/** - - llvm/lib/DebugInfo/Symbolize/** - - llvm/lib/ObjCopy/** - - llvm/lib/Object/** - - llvm/test/Object/** - - llvm/test/tools/llvm-ar/** - - llvm/test/tools/llvm-cxxfilt/** - - llvm/test/tools/llvm-nm/** - - llvm/test/tools/llvm-objcopy/** - - llvm/test/tools/llvm-objdump/** - - llvm/test/tools/llvm-readobj/** - - llvm/test/tools/llvm-size/** - - llvm/test/tools/llvm-strings/** - - llvm/test/tools/llvm-symbolizer/** - - llvm/tools/llvm-ar/** - - llvm/tools/llvm-cxxfilt/** - - llvm/tools/llvm-nm/** - - llvm/tools/llvm-objcopy/** - - llvm/tools/llvm-objdump/** - - llvm/tools/llvm-readobj/** - - llvm/tools/llvm-size/** - - llvm/tools/llvm-strings/** - - llvm/tools/llvm-symbolizer/** - -clang:openmp: - - changed-files: - - any-glob-to-any-file: - - clang/include/clang/Basic/OpenMP* - - clang/include/clang/AST/OpenMPClause.h - - clang/include/clang/AST/DeclOpenMP.h - - clang/include/clang/AST/ExprOpenMP.h - - clang/include/clang/AST/StmtOpenMP.h - - clang/lib/AST/DeclOpenMP.cpp - - clang/lib/AST/OpenMPClause.cpp - - clang/lib/AST/StmtOpenMP.cpp - - clang/lib/Headers/openmp_wrappers/** - - clang/lib/Parse/ParseOpenMP.cpp - - clang/lib/Basic/OpenMPKinds.cpp - - clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp - - clang/lib/Driver/ToolChains/AMDGPUOpenMP.h - - clang/lib/CodeGen/CgStmtOpenMP.cpp - - clang/lib/CodeGen/CGOpenMP* - - clang/lib/Sema/SemaOpenMP.cpp - - clang/test/OpenMP/** - - clang/test/AST/ast-dump-openmp-* - - llvm/lib/Frontend/OpenMP/** - - llvm/lib/Transforms/IPO/OpenMPOpt.cpp - - llvm/include/llvm/Frontend/OpenMP/** - - llvm/include/llvm/Transforms/IPO/OpenMPOpt.h - - llvm/unittests/Frontend/OpenMP* - - llvm/test/Transforms/OpenMP/** - -clang:temporal-safety: - - changed-files: - - any-glob-to-any-file: - - clang/include/clang/Analysis/Analyses/LifetimeSafety/** - - clang/lib/Analysis/LifetimeSafety/** - - clang/unittests/Analysis/LifetimeSafety* - - clang/test/Sema/*lifetime-safety* - - clang/test/Sema/*lifetime-analysis* - - clang/test/Analysis/LifetimeSafety/** - -clang:as-a-library: - - changed-files: - - any-glob-to-any-file: - - clang/tools/libclang/** - - clang/bindings/** - - clang/include/clang-c/** - - clang/test/LibClang/** - - clang/unittest/libclang/** - -openmp:libomp: - - changed-files: - - any-glob-to-any-file: - - 'openmp/**' - -openmp:libomptarget: - - changed-files: - - all-globs-to-all-files: - - openmp/** - - '!openmp/runtime/**' - -bazel: - - changed-files: - - any-glob-to-any-file: - - utils/bazel/** - -offload: - - changed-files: - - any-glob-to-any-file: - - offload/** - -tablegen: - - changed-files: - - any-glob-to-any-file: - - llvm/include/TableGen/** - - llvm/lib/TableGen/** - - llvm/utils/TableGen/** - -infrastructure: - - changed-files: - - any-glob-to-any-file: - - .ci/** diff --git a/.github/renovate.json b/.github/renovate.json deleted file mode 100644 index 8e89ba8c4b32a..0000000000000 --- a/.github/renovate.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "config:recommended" - ], - "includePaths": [".github/**"], - "schedule": "* 0 * * 1", - "minimumReleaseAge": "3 days", - "assignees": ["boomanaiden154"], - "ignorePaths": [".github/workflows/containers/**"], - "groupName": "[Github] Update GHA Dependencies", - "packageRules": [ - { - "matchPackageNames": ["windows", "macos"], - "matchManagers": ["github-actions"], - "enabled": false - } - ] -} diff --git a/.github/workflows/README.md b/.github/workflows/README.md deleted file mode 100644 index ce34d2337e9c5..0000000000000 --- a/.github/workflows/README.md +++ /dev/null @@ -1 +0,0 @@ -Github action workflows should be stored in this directory. diff --git a/.github/workflows/bazel-checks.yml b/.github/workflows/bazel-checks.yml deleted file mode 100644 index aa318569532ec..0000000000000 --- a/.github/workflows/bazel-checks.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: Bazel Checks - -permissions: - contents: read - -on: - push: - paths: - - '.github/workflows/bazel-checks.yml' - - 'utils/bazel/**' - branches: - - main - pull_request: - paths: - - '.github/workflows/bazel-checks.yml' - - 'utils/bazel/**' - -jobs: - buildifier: - name: "Buildifier" - runs-on: ubuntu-24.04 - if: github.repository == 'llvm/llvm-project' - steps: - - name: Fetch LLVM sources - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - - name: Setup Buildifier - run: | - sudo curl -L https://github.com/bazelbuild/buildtools/releases/download/v8.2.1/buildifier-linux-amd64 -o /usr/bin/buildifier --fail - sudo chmod +x /usr/bin/buildifier - - name: Run Buildifier - run: | - buildifier --mode=check $(find ./utils/bazel -name *BUILD*) - - bazel-build: - name: "Bazel Build/Test" - # Only run on US Central workers so we only have to keep one cache warm as - # the cache buckets are per cluster. - runs-on: - group: llvm-premerge-cluster-us-central - labels: llvm-premerge-linux-runners - if: github.repository == 'llvm/llvm-project' - steps: - - name: Fetch LLVM sources - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - # TODO(boomanaiden154): We should use a purpose built container for this. Move - # over when we have fixed the issues with using custom containers with Github - # ARC in GKE. - - name: Setup System Dependencies - run: | - sudo apt-get update - sudo apt-get install -y libmpfr-dev libpfm4-dev m4 libedit-dev - sudo curl -L https://github.com/bazelbuild/bazelisk/releases/download/v1.27.0/bazelisk-amd64.deb --fail > /tmp/bazelisk.deb - sudo apt-get install -y /tmp/bazelisk.deb - rm /tmp/bazelisk.deb - - name: Build/Test - working-directory: utils/bazel - run: | - bazelisk test --config=ci --sandbox_base="" \ - --remote_cache=https://storage.googleapis.com/$CACHE_GCS_BUCKET-bazel \ - --google_default_credentials \ - @llvm-project//... //... diff --git a/.github/workflows/build-ci-container-tooling.yml b/.github/workflows/build-ci-container-tooling.yml deleted file mode 100644 index c75d84829bba6..0000000000000 --- a/.github/workflows/build-ci-container-tooling.yml +++ /dev/null @@ -1,77 +0,0 @@ -name: Build CI Tooling Containers - -permissions: - contents: read - -on: - push: - branches: - - main - paths: - - .github/workflows/build-ci-container-tooling.yml - - '.github/workflows/containers/github-action-ci-tooling/**' - - llvm/utils/git/requirements_formatting.txt - - llvm/utils/git/requirements_linting.txt - - '.github/actions/build-container/**' - - '.github/actions/push-container/**' - pull_request: - paths: - - .github/workflows/build-ci-container-tooling.yml - - '.github/workflows/containers/github-action-ci-tooling/**' - - llvm/utils/git/requirements_formatting.txt - - llvm/utils/git/requirements_linting.txt - - '.github/actions/build-container/**' - - '.github/actions/push-container/**' - -jobs: - build-ci-container-tooling: - name: Build Container ${{ matrix.container-name }} - if: github.repository_owner == 'llvm' - runs-on: ubuntu-24.04 - strategy: - fail-fast: false - matrix: - include: - - container-name: format - test-command: 'cd $HOME && clang-format --version | grep version && git-clang-format -h | grep usage && black --version | grep black' - - container-name: lint - test-command: 'cd $HOME && clang-tidy --version | grep version && clang-tidy-diff.py -h | grep usage' - - container-name: abi-tests - test-command: 'cd $HOME && abi-compliance-checker --help' - target: abi-tests - steps: - - name: Checkout LLVM - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - sparse-checkout: | - .github/workflows/containers/github-action-ci-tooling/ - llvm/utils/git/requirements_formatting.txt - llvm/utils/git/requirements_linting.txt - clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py - .github/actions/build-container - - - name: Build Container - uses: ./.github/actions/build-container - with: - container-name: ci-ubuntu-24.04-${{ matrix.container-name }} - dockerfile: .github/workflows/containers/github-action-ci-tooling/Dockerfile - target: ci-container-${{ matrix.target || format('code-{0}', matrix.container-name) }} - test-command: ${{ matrix.test-command }} - - push-ci-container: - if: github.event_name == 'push' - needs: - - build-ci-container-tooling - permissions: - packages: write - runs-on: ubuntu-24.04 - steps: - - name: Checkout LLVM - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - sparse-checkout: | - .github/actions/push-container - - - uses: ./.github/actions/push-container - with: - token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/build-ci-container-windows.yml b/.github/workflows/build-ci-container-windows.yml deleted file mode 100644 index 3fd1c73d0ee40..0000000000000 --- a/.github/workflows/build-ci-container-windows.yml +++ /dev/null @@ -1,77 +0,0 @@ -name: Build Windows CI Container - -permissions: - contents: read - -on: - push: - branches: - - main - paths: - - .github/workflows/build-ci-container-windows.yml - - '.github/workflows/containers/github-action-ci-windows/**' - pull_request: - paths: - - .github/workflows/build-ci-container-windows.yml - - '.github/workflows/containers/github-action-ci-windows/**' - -jobs: - build-ci-container-windows: - if: github.repository_owner == 'llvm' - runs-on: windows-2022 - outputs: - container-name: ${{ steps.vars.outputs.container-name }} - container-name-tag: ${{ steps.vars.outputs.container-name-tag }} - container-filename: ${{ steps.vars.outputs.container-filename }} - steps: - - name: Checkout LLVM - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - sparse-checkout: .github/workflows/containers/github-action-ci-windows - - name: Write Variables - id: vars - run: | - $tag = [int64](Get-Date -UFormat %s) - $container_name="ghcr.io/$env:GITHUB_REPOSITORY_OWNER/ci-windows-2022" - echo "container-name=${container_name}" >> $env:GITHUB_OUTPUT - echo "container-name-tag=${container_name}:${tag}" >> $env:GITHUB_OUTPUT - echo "container-filename=ci-windows-${tag}.tar" >> $env:GITHUB_OUTPUT - - name: Build Container - working-directory: .github/workflows/containers/github-action-ci-windows - run: | - docker build -t ${{ steps.vars.outputs.container-name-tag }} . - - name: Save container image - run: | - docker save ${{ steps.vars.outputs.container-name-tag }} > ${{ steps.vars.outputs.container-filename }} - - name: Upload container image - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 - with: - name: container - path: ${{ steps.vars.outputs.container-filename }} - retention-days: 14 - - push-ci-container: - if: github.event_name == 'push' - needs: - - build-ci-container-windows - permissions: - packages: write - runs-on: ubuntu-24.04 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - steps: - - name: Download container - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 - with: - name: container - - name: Push Container - run: | - sudo apt-get update - sudo apt-get install -y skopeo - skopeo login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io - skopeo copy docker-archive:${{ needs.build-ci-container-windows.outputs.container-filename }} \ - --dest-compress-format zstd \ - docker://${{ needs.build-ci-container-windows.outputs.container-name-tag }} - skopeo copy docker-archive:${{ needs.build-ci-container-windows.outputs.container-filename }} \ - --dest-compress-format zstd \ - docker://${{ needs.build-ci-container-windows.outputs.container-name }}:latest diff --git a/.github/workflows/build-ci-container.yml b/.github/workflows/build-ci-container.yml deleted file mode 100644 index e17e852166cee..0000000000000 --- a/.github/workflows/build-ci-container.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: Build CI Container - -permissions: - contents: read - -on: - push: - branches: - - main - paths: - - .github/workflows/build-ci-container.yml - - '.github/workflows/containers/github-action-ci/**' - - '.github/actions/build-container/**' - - '.github/actions/push-container/**' - pull_request: - paths: - - .github/workflows/build-ci-container.yml - - '.github/workflows/containers/github-action-ci/**' - - '.github/actions/build-container/**' - - '.github/actions/push-container/**' - -jobs: - build-ci-container: - name: Build Container ${{ matrix.container-name }} ${{ (contains(matrix.runs-on, 'arm') && 'ARM64') || 'X64' }} - if: github.repository_owner == 'llvm' - runs-on: ${{ matrix.runs-on }} - strategy: - matrix: - runs-on: - - depot-ubuntu-24.04-16 - - depot-ubuntu-24.04-arm-16 - container-name: - - '' - - agent - test-command: - - cd $HOME && printf '#include \nint main(int argc, char **argv) { std::cout << "Hello\\n"; }' | clang++ -x c++ - && ./a.out | grep Hello - steps: - - name: Checkout LLVM - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - sparse-checkout: | - .github/workflows/containers/github-action-ci/ - .github/actions/build-container - - - name: Build Container - uses: ./.github/actions/build-container - with: - container-name: ci-ubuntu-24.04${{ matrix.container-name && format('-{0}', matrix.container-name)}} - context: .github/workflows/containers/github-action-ci/ - dockerfile: .github/workflows/containers/github-action-ci/Dockerfile - target: ci-container${{ matrix.container-name && format('-{0}', matrix.container-name) }} - test-command: ${{ matrix.test-command }} - - push-ci-container: - if: github.event_name == 'push' - needs: - - build-ci-container - permissions: - packages: write - runs-on: ubuntu-24.04 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - steps: - - name: Checkout LLVM - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - sparse-checkout: | - .github/actions/push-container - - - uses: ./.github/actions/push-container - with: - token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/build-metrics-container.yml b/.github/workflows/build-metrics-container.yml deleted file mode 100644 index 0436e6ec82fda..0000000000000 --- a/.github/workflows/build-metrics-container.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: Build Metrics Container - -permissions: - contents: read - -on: - push: - branches: - - main - paths: - - .github/workflows/build-metrics-container.yml - - '.ci/metrics/**' - pull_request: - branches: - - main - paths: - - .github/workflows/build-metrics-container.yml - - '.ci/metrics/**' - -jobs: - build-metrics-container: - if: github.repository_owner == 'llvm' - runs-on: ubuntu-24.04 - steps: - - name: Checkout LLVM - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - sparse-checkout: | - .ci/metrics/ - .github/actions/build-container - - name: Build Container - uses: ./.github/actions/build-container - with: - container-name: metrics - context: .ci/metrics - dockerfile: .ci/metrics/Dockerfile - - push-metrics-container: - if: github.event_name == 'push' - needs: - - build-metrics-container - permissions: - packages: write - runs-on: ubuntu-24.04 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - steps: - - name: Checkout LLVM - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - sparse-checkout: | - .github/actions/push-container - - - uses: ./.github/actions/push-container - with: - token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/check-ci.yml b/.github/workflows/check-ci.yml deleted file mode 100644 index 9f63b4ce22a28..0000000000000 --- a/.github/workflows/check-ci.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Check CI Scripts - -permissions: - contents: read - -on: - push: - branches: - - main - paths: - - '.ci/**' - - '.github/workflows/check-ci.yml' - pull_request: - paths: - - '.ci/**' - - '.github/workflows/check-ci.yml' - -jobs: - test-python: - name: "Check Python Tests" - runs-on: ubuntu-24.04 - if: github.repository == 'llvm/llvm-project' - steps: - - name: Fetch LLVM sources - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - sparse-checkout: .ci - - name: Setup Python - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 - with: - python-version: 3.14 - cache: 'pip' - - name: Install Python Dependencies - run: | - pip3 install -r .ci/all_requirements.txt - pip3 install -r .ci/metrics/requirements.lock.txt - pip3 install pytest==8.4.1 - - name: Run Tests - working-directory: .ci - run: pytest diff --git a/.github/workflows/ci-post-commit-analyzer-run.py b/.github/workflows/ci-post-commit-analyzer-run.py deleted file mode 100644 index e5f52d3b2fa67..0000000000000 --- a/.github/workflows/ci-post-commit-analyzer-run.py +++ /dev/null @@ -1,34 +0,0 @@ -import json -import multiprocessing -import os -import re -import subprocess -import sys - - -def run_analyzer(data): - os.chdir(data["directory"]) - command = ( - data["command"] - + f" --analyze --analyzer-output html -o analyzer-results -Xclang -analyzer-config -Xclang max-nodes=75000" - ) - print(command) - subprocess.run(command, shell=True, check=True) - - -def pool_error(e): - print("Error analyzing file:", e) - - -def main(): - db_path = sys.argv[1] - database = json.load(open(db_path)) - - with multiprocessing.Pool() as pool: - pool.map_async(run_analyzer, [k for k in database], error_callback=pool_error) - pool.close() - pool.join() - - -if __name__ == "__main__": - main() diff --git a/.github/workflows/ci-post-commit-analyzer.yml b/.github/workflows/ci-post-commit-analyzer.yml deleted file mode 100644 index a823dadb5979f..0000000000000 --- a/.github/workflows/ci-post-commit-analyzer.yml +++ /dev/null @@ -1,95 +0,0 @@ -name: Post-Commit Static Analyzer - -permissions: - contents: read - -on: - push: - branches: - - 'release/**' - paths: - - 'clang/**' - - 'llvm/**' - - '.github/workflows/ci-post-commit-analyzer.yml' - pull_request: - types: - - opened - - synchronize - - reopened - - closed - paths: - - '.github/workflows/ci-post-commit-analyzer.yml' - - '.github/workflows/ci-post-commit-analyzer-run.py' - schedule: - - cron: '30 0 * * *' - -concurrency: - group: >- - llvm-project-${{ github.workflow }}-${{ github.event_name == 'pull_request' && - ( github.event.pull_request.number || github.ref) }} - cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} - -jobs: - post-commit-analyzer: - if: >- - github.repository_owner == 'llvm' && - github.event.action != 'closed' - runs-on: ubuntu-24.04 - container: - image: 'ghcr.io/llvm/ci-ubuntu-24.04:latest' - env: - LLVM_VERSION: 18 - steps: - - name: Checkout Source - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - - - name: Setup ccache - uses: hendrikmuhs/ccache-action@5ebbd400eff9e74630f759d94ddd7b6c26299639 # v1.2.20 - with: - # A full build of llvm, clang, lld, and lldb takes about 250MB - # of ccache space. There's not much reason to have more than this, - # because we usually won't need to save cache entries from older - # builds. Also, there is an overall 10GB cache limit, and each - # run creates a new cache entry so we want to ensure that we have - # enough cache space for all the tests to run at once and still - # fit under the 10 GB limit. - # Default to 2G to workaround: https://github.com/hendrikmuhs/ccache-action/issues/174 - max-size: 2G - key: post-commit-analyzer - variant: sccache - - - name: Configure - run: | - cmake -B build -S llvm -G Ninja \ - -DLLVM_ENABLE_ASSERTIONS=ON \ - -DLLVM_ENABLE_PROJECTS=clang \ - -DLLVM_BUILD_LLVM_DYLIB=ON \ - -DLLVM_LINK_LLVM_DYLIB=ON \ - -DCMAKE_CXX_COMPILER=clang++ \ - -DCMAKE_C_COMPILER=clang \ - -DCMAKE_CXX_COMPILER_LAUNCHER=sccache \ - -DCMAKE_C_COMPILER_LAUNCHER=sccache \ - -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ - -DLLVM_INCLUDE_TESTS=OFF \ - -DCLANG_INCLUDE_TESTS=OFF \ - -DCMAKE_BUILD_TYPE=Release - - - name: Build - run: | - # FIXME: We need to build all the generated header files in order to be able to run - # the analyzer on every file. Building libLLVM and libclang is probably overkill for - # this, but it's better than building every target. - ninja -v -C build libLLVM.so libclang.so - - # Run the analyzer. - python3 .github/workflows/ci-post-commit-analyzer-run.py build/compile_commands.json - - scan-build --generate-index-only build/analyzer-results - - - name: Upload Results - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 - if: always() - with: - name: analyzer-results - path: 'build/analyzer-results/*' - diff --git a/.github/workflows/commit-access-greeter.yml b/.github/workflows/commit-access-greeter.yml deleted file mode 100644 index d11bdec6b2ea8..0000000000000 --- a/.github/workflows/commit-access-greeter.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Commit Access Greeter - -on: - issues: - types: - - labeled - -permissions: - contents: read - -jobs: - commit-access-greeter: - permissions: - issues: write - pull-requests: read - if: >- - github.repository_owner == 'llvm' && - github.event.label.name == 'infra:commit-access-request' - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - sparse-checkout: llvm/utils/git/ - - - name: Setup Automation Script - working-directory: ./llvm/utils/git/ - run: | - pip install --require-hashes -r requirements.txt - - - name: Add comments to issue - working-directory: ./llvm/utils/git/ - env: - LABEL_NAME: ${{ github.event.label.name }} - GITHUB_TOKEN: ${{ github.token }} - ISSUE_NUMBER: ${{ github.event.issue.number }} - run: | - python3 ./github-automation.py \ - --token $GITHUB_TOKEN \ - commit-request-greeter \ - --issue-number $ISSUE_NUMBER diff --git a/.github/workflows/commit-access-review.py b/.github/workflows/commit-access-review.py deleted file mode 100644 index 52b9fd35290e5..0000000000000 --- a/.github/workflows/commit-access-review.py +++ /dev/null @@ -1,321 +0,0 @@ -#!/usr/bin/env python3 -# ===-- commit-access-review.py --------------------------------------------===# -# -# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -# See https://llvm.org/LICENSE.txt for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# -# ===------------------------------------------------------------------------===# -# -# ===------------------------------------------------------------------------===# - -import datetime -import github -import re -import requests -import time -import sys -import re - - -class User: - THRESHOLD = 5 - - def __init__(self, name, triage_list): - self.name = name - self.authored = 0 - self.merged = 0 - self.reviewed = 0 - self.triage_list = triage_list - - def add_authored(self, val=1): - self.authored += val - if self.meets_threshold(): - print(self.name, "meets the threshold with authored commits") - del self.triage_list[self.name] - - def set_authored(self, val): - self.authored = 0 - self.add_authored(val) - - def add_merged(self, val=1): - self.merged += val - if self.meets_threshold(): - print(self.name, "meets the threshold with merged commits") - del self.triage_list[self.name] - - def add_reviewed(self, val=1): - self.reviewed += val - if self.meets_threshold(): - print(self.name, "meets the threshold with reviewed commits") - del self.triage_list[self.name] - - def get_total(self): - return self.authored + self.merged + self.reviewed - - def meets_threshold(self): - return self.get_total() >= self.THRESHOLD - - def __repr__(self): - return "{} : a: {} m: {} r: {}".format( - self.name, self.authored, self.merged, self.reviewed - ) - - -def check_manual_requests( - gh: github.Github, start_date: datetime.datetime -) -> list[str]: - """ - Return a list of users who have been asked since ``start_date`` if they - want to keep their commit access or if they have applied for commit - access since ``start_date`` - """ - - query = """ - query ($query: String!, $after: String) { - search(query: $query, type: ISSUE, first: 100, after: $after) { - nodes { - ... on Issue { - author { - login - } - body - } - } - pageInfo { - hasNextPage - endCursor - } - } - } - """ - formatted_start_date = start_date.strftime("%Y-%m-%dT%H:%M:%S") - variables = { - "query": f"type:issue created:>{formatted_start_date} org:llvm repo:llvm-project label:infra:commit-access,infra:commit-access-request" - } - - has_next_page = True - users = [] - while has_next_page: - res_header, res_data = gh._Github__requester.graphql_query( - query=query, variables=variables - ) - data = res_data["data"] - for issue in data["search"]["nodes"]: - users.extend([user[1:] for user in re.findall("@[^ ,\n]+", issue["body"])]) - if issue["author"]: - users.append(issue["author"]["login"]) - has_next_page = data["search"]["pageInfo"]["hasNextPage"] - if has_next_page: - variables["after"] = data["search"]["pageInfo"]["endCursor"] - return users - - -def get_num_commits(gh: github.Github, user: str, start_date: datetime.datetime) -> int: - """ - Get number of commits that ``user`` has been made since ``start_date`. - """ - variables = { - "owner": "llvm", - "user": user, - "start_date": start_date.strftime("%Y-%m-%dT%H:%M:%S"), - } - - user_query = """ - query ($user: String!) { - user(login: $user) { - id - } - } - """ - - res_header, res_data = gh._Github__requester.graphql_query( - query=user_query, variables=variables - ) - data = res_data["data"] - variables["user_id"] = data["user"]["id"] - - query = """ - query ($owner: String!, $user_id: ID!, $start_date: GitTimestamp!){ - organization(login: $owner) { - teams(query: "llvm-committers" first:1) { - nodes { - repositories { - nodes { - ref(qualifiedName: "main") { - target { - ... on Commit { - history(since: $start_date, author: {id: $user_id }) { - totalCount - } - } - } - } - } - } - } - } - } - } - """ - count = 0 - res_header, res_data = gh._Github__requester.graphql_query( - query=query, variables=variables - ) - data = res_data["data"] - for repo in data["organization"]["teams"]["nodes"][0]["repositories"]["nodes"]: - count += int(repo["ref"]["target"]["history"]["totalCount"]) - if count >= User.THRESHOLD: - break - return count - - -def get_review_count( - gh: github.Github, user: str, start_date: datetime.datetime -) -> int: - """ - Return the number of reviews that ``user`` has done since ``start_date``. - """ - query = """ - query ($query: String!) { - search(query: $query, type: ISSUE, first: 5) { - issueCount - } - } - """ - formatted_start_date = start_date.strftime("%Y-%m-%dT%H:%M:%S") - variables = { - "owner": "llvm", - "repo": "llvm-project", - "user": user, - "query": f"type:pr commenter:{user} -author:{user} merged:>{formatted_start_date} org:llvm", - } - - res_header, res_data = gh._Github__requester.graphql_query( - query=query, variables=variables - ) - data = res_data["data"] - return int(data["search"]["issueCount"]) - - -def count_prs(gh: github.Github, triage_list: dict, start_date: datetime.datetime): - """ - Fetch all the merged PRs for the project since ``start_date`` and update - ``triage_list`` with the number of PRs merged for each user. - """ - - query = """ - query ($query: String!, $after: String) { - search(query: $query, type: ISSUE, first: 100, after: $after) { - issueCount, - nodes { - ... on PullRequest { - author { - login - } - mergedBy { - login - } - } - } - pageInfo { - hasNextPage - endCursor - } - } - } - """ - date_begin = start_date - date_end = None - while date_begin < datetime.datetime.now(): - date_end = date_begin + datetime.timedelta(days=7) - formatted_date_begin = date_begin.strftime("%Y-%m-%dT%H:%M:%S") - formatted_date_end = date_end.strftime("%Y-%m-%dT%H:%M:%S") - variables = { - "query": f"type:pr is:merged merged:{formatted_date_begin}..{formatted_date_end} org:llvm", - } - has_next_page = True - while has_next_page: - print(variables) - res_header, res_data = gh._Github__requester.graphql_query( - query=query, variables=variables - ) - data = res_data["data"] - for pr in data["search"]["nodes"]: - # Users can be None if the user has been deleted. - if not pr["author"]: - continue - author = pr["author"]["login"] - if author in triage_list: - triage_list[author].add_authored() - - if not pr["mergedBy"]: - continue - merger = pr["mergedBy"]["login"] - if author == merger: - continue - if merger not in triage_list: - continue - triage_list[merger].add_merged() - - has_next_page = data["search"]["pageInfo"]["hasNextPage"] - if has_next_page: - variables["after"] = data["search"]["pageInfo"]["endCursor"] - date_begin = date_end - - -def main(): - token = sys.argv[1] - gh = github.Github(login_or_token=token) - org = gh.get_organization("llvm") - repo = org.get_repo("llvm-project") - one_year_ago = datetime.datetime.now() - datetime.timedelta(days=365) - triage_list = {} - for collaborator in repo.get_collaborators(permission="push"): - triage_list[collaborator.login] = User(collaborator.login, triage_list) - - print("Start:", len(triage_list), "triagers") - # Step 0 Check if users have requested commit access in the last year. - for user in check_manual_requests(gh, one_year_ago): - if user in triage_list: - print(user, "requested commit access in the last year.") - del triage_list[user] - print("After Request Check:", len(triage_list), "triagers") - - # Step 1 count all PRs authored or merged - count_prs(gh, triage_list, one_year_ago) - - print("After PRs:", len(triage_list), "triagers") - - if len(triage_list) == 0: - sys.exit(0) - - # Step 2 check for reviews - for user in list(triage_list.keys()): - review_count = get_review_count(gh, user, one_year_ago) - triage_list[user].add_reviewed(review_count) - - print("After Reviews:", len(triage_list), "triagers") - - if len(triage_list) == 0: - sys.exit(0) - - # Step 3 check for number of commits - for user in list(triage_list.keys()): - num_commits = get_num_commits(gh, user, one_year_ago) - # Override the total number of commits to not double count commits and - # authored PRs. - triage_list[user].set_authored(num_commits) - - print("After Commits:", len(triage_list), "triagers") - - print("Complete:", len(triage_list), "triagers") - - with open("triagers.log", "w") as triagers_log: - for user in triage_list: - print(triage_list[user].__repr__()) - triagers_log.write(user + "\n") - - -if __name__ == "__main__": - main() diff --git a/.github/workflows/commit-access-review.yml b/.github/workflows/commit-access-review.yml deleted file mode 100644 index f6ec0bc9d4a9a..0000000000000 --- a/.github/workflows/commit-access-review.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Commit Access Review - -on: - workflow_dispatch: - schedule: - # * is a special character in YAML so you have to quote this string - - cron: '0 7 1 * *' - -permissions: - contents: read - -jobs: - commit-access-review: - if: github.repository_owner == 'llvm' - runs-on: ubuntu-24.04 - steps: - - name: Fetch LLVM sources - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - - - name: Install dependencies - run: | - pip install --require-hashes -r ./llvm/utils/git/requirements.txt - - - name: Run Script - env: - GITHUB_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }} - run: | - python3 .github/workflows/commit-access-review.py $GITHUB_TOKEN - - - name: Upload Triage List - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 - with: - name: triagers - path: triagers.log diff --git a/.github/workflows/containers/github-action-ci-tooling/Dockerfile b/.github/workflows/containers/github-action-ci-tooling/Dockerfile deleted file mode 100644 index b78c99efb9be3..0000000000000 --- a/.github/workflows/containers/github-action-ci-tooling/Dockerfile +++ /dev/null @@ -1,122 +0,0 @@ -ARG LLVM_VERSION=21.1.0 -# FIXME: Use "${LLVM_VERSION%%.*}" instead of "LLVM_VERSION_MAJOR" once we update runners to Ubuntu-26.04 with Buildah >= 1.37 -ARG LLVM_VERSION_MAJOR=21 - -FROM docker.io/library/ubuntu:24.04 AS llvm-downloader -ARG LLVM_VERSION -ARG LLVM_VERSION_MAJOR - -RUN apt-get update && \ - apt-get install -y wget xz-utils && \ - wget -O llvm.tar.xz https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/LLVM-${LLVM_VERSION}-Linux-X64.tar.xz && \ - mkdir -p /llvm-extract && \ - tar -xvJf llvm.tar.xz -C /llvm-extract \ - # Only unpack these tools to save space on Github runner. - LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-${LLVM_VERSION_MAJOR} \ - LLVM-${LLVM_VERSION}-Linux-X64/lib/clang/${LLVM_VERSION_MAJOR}/include \ - LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-tidy \ - LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-format \ - LLVM-${LLVM_VERSION}-Linux-X64/bin/git-clang-format && \ - rm llvm.tar.xz - - -FROM docker.io/library/ubuntu:24.04 AS base -ENV LLVM_SYSROOT=/opt/llvm -ENV PATH=${LLVM_SYSROOT}/bin:${PATH} - -# Need nodejs for some of the GitHub actions. -# Need git for git-clang-format. -RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y \ - git \ - nodejs \ - sudo \ - # These are needed by the premerge pipeline. - # Pip is used to install dependent python packages. - python3-pip \ - python-is-python3 && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -# Create a new user with id 1001 as that is the user id that -# Github Actions uses to perform the checkout action. -RUN useradd gha -u 1001 -m -s /bin/bash -RUN adduser gha sudo -RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers -# Don't set USER gha right away because we still need to install packages -# as root in 'ci-container-code-format' and 'ci-container-code-lint' containers - - -FROM base AS ci-container-build-tools -ARG LLVM_VERSION -ARG LLVM_VERSION_MAJOR - -COPY --from=llvm-downloader /llvm-extract/LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-${LLVM_VERSION_MAJOR} \ - ${LLVM_SYSROOT}/bin/ -COPY --from=llvm-downloader /llvm-extract/LLVM-${LLVM_VERSION}-Linux-X64/lib/clang/${LLVM_VERSION_MAJOR}/include \ - ${LLVM_SYSROOT}/lib/clang/${LLVM_VERSION_MAJOR}/include -RUN ln -s ${LLVM_SYSROOT}/bin/clang-${LLVM_VERSION_MAJOR} ${LLVM_SYSROOT}/bin/clang && \ - ln -s ${LLVM_SYSROOT}/bin/clang ${LLVM_SYSROOT}/bin/clang++ - -RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y \ - cmake \ - ninja-build && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -ENV CC=${LLVM_SYSROOT}/bin/clang -ENV CXX=${LLVM_SYSROOT}/bin/clang++ - - -FROM base AS ci-container-code-format -ARG LLVM_VERSION - -COPY --from=llvm-downloader /llvm-extract/LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-format \ - /llvm-extract/LLVM-${LLVM_VERSION}-Linux-X64/bin/git-clang-format \ - ${LLVM_SYSROOT}/bin/ - - -# Install dependencies for 'pr-code-format.yml' job -COPY llvm/utils/git/requirements_formatting.txt requirements_formatting.txt -RUN pip install -r requirements_formatting.txt --break-system-packages && \ - rm requirements_formatting.txt -USER gha -WORKDIR /home/gha - - -FROM ci-container-build-tools AS ci-container-code-lint -ARG LLVM_VERSION -ARG LLVM_VERSION_MAJOR - -COPY --from=llvm-downloader /llvm-extract/LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-tidy \ - ${LLVM_SYSROOT}/bin/ -COPY clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py ${LLVM_SYSROOT}/bin/clang-tidy-diff.py - -# Install dependencies for 'pr-code-lint.yml' job -COPY llvm/utils/git/requirements_linting.txt requirements_linting.txt -RUN pip install -r requirements_linting.txt --break-system-packages && \ - rm requirements_linting.txt -USER gha -WORKDIR /home/gha - - -FROM ci-container-build-tools as ci-container-abi-tests - -RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y \ - abi-compliance-checker \ - abi-dumper \ - autoconf \ - parallel \ - pkg-config && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -RUN git clone https://github.com/universal-ctags/ctags.git && \ - cd ctags && \ - ./autogen.sh && \ - ./configure && \ - sudo make install && \ - rm -Rf ../ctags - diff --git a/.github/workflows/containers/github-action-ci-windows/Dockerfile b/.github/workflows/containers/github-action-ci-windows/Dockerfile deleted file mode 100644 index 509b3d2335106..0000000000000 --- a/.github/workflows/containers/github-action-ci-windows/Dockerfile +++ /dev/null @@ -1,142 +0,0 @@ -# Agent image for LLVM org cluster. -# .net 4.8 is required by chocolately package manager. -FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2022 - -# Restore the default Windows shell for correct batch processing. -SHELL ["cmd", "/S", "/C"] - -# Download the Build Tools bootstrapper. -ADD https://aka.ms/vs/16/release/vs_buildtools.exe /TEMP/vs_buildtools.exe - -RUN powershell -Command Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) - -# Download channel for fixed install. -ARG CHANNEL_URL=https://aka.ms/vs/16/release/channel -ADD ${CHANNEL_URL} /TEMP/VisualStudio.chman - -# Install Build Tools with C++ workload. -# - Documentation for docker installation -# https://docs.microsoft.com/en-us/visualstudio/install/build-tools-container?view=vs-2019 -# - Documentation on workloads -# https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools?view=vs-2019#c-build-tools -# - Documentation on flags -# https://docs.microsoft.com/en-us/visualstudio/install/use-command-line-parameters-to-install-visual-studio?view=vs-2019 -RUN /TEMP/vs_buildtools.exe --quiet --wait --norestart --nocache \ - --channelUri C:\TEMP\VisualStudio.chman \ - --installChannelUri C:\TEMP\VisualStudio.chman \ - --installPath C:\BuildTools \ - --add Microsoft.VisualStudio.Workload.VCTools \ - --add Microsoft.VisualStudio.Component.VC.ATL \ - --includeRecommended \ - || IF "%ERRORLEVEL%"=="3010" EXIT 0 - -# Register DIA dll (Debug Interface Access) so it can be used to symbolize -# the stack traces. Register dll for 32 and 64 bit. -# see https://developercommunity.visualstudio.com/content/problem/290674/msdia140dll-is-not-registered-on-vs2017-hosts.html - -RUN regsvr32 /S "C:\BuildTools\DIA SDK\bin\amd64\msdia140.dll" & \ - regsvr32 /S "C:\BuildTools\DIA SDK\bin\msdia140.dll" - -# install tools as described in https://llvm.org/docs/GettingStartedVS.html -# and a few more that were not documented... -# Pin an older version of Python; the current Python 3.10 fails when -# doing "pip install" for the other dependencies, as it fails to find libxml -# while compiling some package. -# We version pin the other packages as well to ensure the container build is as -# reproducible as possible to prevent issues when upgrading only part of the -# container. -RUN choco install -y ninja --version 1.13.1 && \ - choco install -y git --version 2.50.1 && \ - choco install -y sccache --version 0.10.0 && \ - choco install -y python3 --version 3.9.7 - -# Testing requires psutil -RUN pip install psutil - -# configure Python encoding -ENV PYTHONIOENCODING=UTF-8 - -# update the path variable -# C:\Program Files\Git\usr\bin contains a usable bash and other unix tools. -# C:\llvm-mingw\bin contains Clang configured for mingw targets and -# corresponding sysroots. Both the 'llvm' package (with Clang defaulting -# to MSVC targets) and this directory contains executables named -# 'clang.exe' - add this last to let the other one have precedence. -# To use these compilers, use the triple prefixed form, e.g. -# x86_64-w64-mingw32-clang. -# C:\buildtools and SDK paths are ones that are set by c:\BuildTools\Common7\Tools\VsDevCmd.bat -arch=amd64 -host_arch=amd64 -RUN powershell -Command \ - [System.Environment]::SetEnvironmentVariable('PATH', \ - [System.Environment]::GetEnvironmentVariable('PATH', 'machine') + ';C:\Program Files\Git\usr\bin;C:\llvm-mingw\bin' \ - + ';C:\BuildTools\Common7\IDE\' \ - + ';C:\BuildTools\Common7\IDE\CommonExt ensions\Microsoft\TeamFoundation\Team Explorer' \ - + ';C:\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin' \ - + ';C:\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja' \ - + ';C:\BuildTools\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer' \ - + ';C:\BuildTools\Common7\IDE\CommonExtensions\Microsoft\TestWindow' \ - + ';C:\BuildTools\Common7\IDE\VC\VCPackages' \ - + ';C:\BuildTools\Common7\Tools\' \ - + ';C:\BuildTools\Common7\Tools\devinit' \ - + ';C:\BuildTools\MSBuild\Current\Bin' \ - + ';C:\BuildTools\MSBuild\Current\bin\Roslyn' \ - + ';C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64' \ - + ';C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64\' \ - + ';C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64' \ - + ';C:\Program Files (x86)\Windows Kits\10\bin\x64' \ - + ';C:\Windows\Microsoft.NET\Framework64\v4.0.30319' \ - ,'machine') - -# support long file names during git checkout -RUN git config --system core.longpaths true & \ - git config --global core.autocrlf false - -ARG RUNNER_VERSION=2.330.0 -ENV RUNNER_VERSION=$RUNNER_VERSION - -RUN powershell -Command \ - Invoke-WebRequest -Uri https://github.com/actions/runner/releases/download/v${env:RUNNER_VERSION}/actions-runner-win-x64-${env:RUNNER_VERSION}.zip -OutFile actions-runner-win.zip ; \ - Add-Type -AssemblyName System.IO.Compression.FileSystem ; \ - [System.IO.Compression.ZipFile]::ExtractToDirectory('actions-runner-win.zip', $PWD) ;\ - rm actions-runner-win.zip - -# Set the LLVM_VERSION environment variable -ENV LLVM_VERSION=21.1.2 - -# Download and extract Clang compiler. -# Create directories, download, extract, and clean up all in one layer -RUN powershell -Command \ - # --- Setup directories --- \ - Write-Host "Creating directories..."; \ - New-Item -Path "C:\temp-download" -ItemType "Directory" -Force ; \ - New-Item -Path "C:\xz-utils" -ItemType "Directory" -Force ; \ - New-Item -Path "C:\clang" -ItemType "Directory" -Force ; \ - # --- 1. Download and extract xz --- \ - Set-Location C:\temp-download ; \ - Invoke-WebRequest -Uri "http://github.com/tukaani-project/xz/releases/download/v5.8.1/xz-5.8.1-windows.zip" -OutFile "xz.zip"; \ - (Get-FileHash -Path "C:\temp-download\xz.zip" -Algorithm MD5).Hash -eq 'c3c69fdce3e825cc0b76123b36b0bcc2' ; \ - Add-Type -AssemblyName "System.IO.Compression.FileSystem"; \ - [System.IO.Compression.ZipFile]::ExtractToDirectory('C:\temp-download\xz.zip', 'C:\xz-utils'); \ - # --- 2. Download and decompress Clang --- \ - Invoke-WebRequest -Uri "http://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.2/clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz" -OutFile "clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz" ; \ - (Get-FileHash -Path "C:\temp-download\clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz" -Algorithm MD5).Hash -eq '0ae1d3effd9ab9d323f7fa595777f0a2' ; \ - C:\xz-utils\bin_x86-64\xz.exe -d -qq clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz ; \ - # --- 3. Extract clang --- \ - C:\Windows\System32\tar.exe -xf clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar -C C:\clang ; \ - # --- 4. Clean up --- \ - Set-Location C:\ ; \ - Remove-Item C:\temp-download -Recurse -Force; \ - Remove-Item C:\xz-utils -Recurse -Force; \ - # -- 5. Shorten path to clang files & remove unnecessary files -- \ - Set-Location C:\clang ; \ - Rename-Item -Path "C:\clang\clang+llvm-21.1.2-x86_64-pc-windows-msvc" -NewName "C:\clang\clang-msvc" ; \ - Set-Location C:\clang\clang-msvc ; \ - Remove-Item -Path C:\clang\clang-msvc\libexec -Recurse -Force ; \ - Remove-Item -Path C:\clang\clang-msvc\share -Recurse -Force ; \ - Rename-Item -Path "C:\clang\clang-msvc\bin" -NewName "C:\clang\clang-msvc\bin-full" ; \ - New-Item -Path "C:\clang\clang-msvc\bin" -ItemType Directory -Force ; \ - Set-Location C:\clang\clang-msvc\bin ; \ - Copy-Item -Path C:\clang\clang-msvc\bin-full\*.dll -Destination C:\clang\clang-msvc\bin\. ; \ - Copy-Item -Path C:\clang\clang-msvc\bin-full\clang-cl.exe -Destination C:\clang\clang-msvc\bin\. ; \ - Copy-Item -Path C:\clang\clang-msvc\bin-full\lld-link.exe -Destination C:\clang\clang-msvc\bin\. ; \ - Set-Location C:\clang\clang-msvc ; \ - Remove-Item -Path C:\clang\clang-msvc\bin-full -Recurse -Force ; diff --git a/.github/workflows/containers/github-action-ci/Dockerfile b/.github/workflows/containers/github-action-ci/Dockerfile deleted file mode 100644 index 37b0f2009179e..0000000000000 --- a/.github/workflows/containers/github-action-ci/Dockerfile +++ /dev/null @@ -1,109 +0,0 @@ -FROM docker.io/library/ubuntu:24.04 AS base -ENV LLVM_SYSROOT=/opt/llvm - -FROM base AS stage1-toolchain -ENV LLVM_VERSION=21.1.3 - -RUN apt-get update && \ - apt-get install -y \ - wget \ - gcc \ - g++ \ - cmake \ - ninja-build \ - python3 \ - git \ - curl \ - zlib1g-dev && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -RUN curl -O -L https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-$LLVM_VERSION.tar.gz && \ - tar -xf llvmorg-$LLVM_VERSION.tar.gz && \ - rm -f llvmorg-$LLVM_VERSION.tar.gz - -WORKDIR /llvm-project-llvmorg-$LLVM_VERSION - -RUN cmake -B ./build -G Ninja ./llvm \ - -C ./clang/cmake/caches/BOLT-PGO.cmake \ - -DBOOTSTRAP_LLVM_ENABLE_LLD=ON \ - -DBOOTSTRAP_BOOTSTRAP_LLVM_ENABLE_LLD=ON \ - -DPGO_INSTRUMENT_LTO=Thin \ - -DLLVM_ENABLE_RUNTIMES="compiler-rt" \ - -DCMAKE_INSTALL_PREFIX="$LLVM_SYSROOT" \ - -DLLVM_ENABLE_PROJECTS="bolt;clang;lld;clang-tools-extra" \ - -DLLVM_DISTRIBUTION_COMPONENTS="lld;compiler-rt;clang-format;scan-build;llvm-symbolizer" \ - -DCLANG_DEFAULT_LINKER="lld" - -RUN ninja -C ./build stage2-clang-bolt stage2-install-distribution && ninja -C ./build install-distribution - -FROM base AS ci-container - -COPY --from=stage1-toolchain $LLVM_SYSROOT $LLVM_SYSROOT - -# Need to install curl for hendrikmuhs/ccache-action -# Need nodejs for some of the GitHub actions. -# Need perl-modules for clang analyzer tests. -# Need git for SPIRV-Tools tests. -RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y \ - binutils \ - cmake \ - curl \ - git \ - libstdc++-11-dev \ - ninja-build \ - nodejs \ - perl-modules \ - python3-psutil \ - sudo \ - # These are needed by the premerge pipeline. Pip is used to install - # dependent python packages. File and tzdata are used for tests. - # Having a symlink from python to python3 enables code sharing between - # the Linux and Windows pipelines. - python3-pip \ - file \ - tzdata \ - python-is-python3 && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -# We need sccache for caching. We cannot use the apt repository version because -# it is too old and has bugs related to features we require (particularly GCS -# caching), so we manually install it here. -# TODO(boomanaiden154): We should return to installing this from the apt -# repository once a version containing the necessary bug fixes is available. -RUN curl -L "https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-$(arch)-unknown-linux-musl.tar.gz" > /tmp/sccache.tar.gz && \ - echo $( [ $(arch) = 'x86_64' ] && echo "1fbb35e135660d04a2d5e42b59c7874d39b3deb17de56330b25b713ec59f849b" || echo "d6a1ce4acd02b937cd61bc675a8be029a60f7bc167594c33d75732bbc0a07400") /tmp/sccache.tar.gz | sha256sum -c && \ - tar xzf /tmp/sccache.tar.gz -O --wildcards '*/sccache' > '/usr/local/bin/sccache' && \ - rm /tmp/sccache.tar.gz && \ - chmod +x /usr/local/bin/sccache - -ENV LLVM_SYSROOT=$LLVM_SYSROOT -ENV PATH=${LLVM_SYSROOT}/bin:${PATH} -ENV CC=clang -ENV CXX=clang++ - -# Create a new user to avoid test failures related to a lack of expected -# permissions issues in some tests. Set the user id to 1001 as that is the -# user id that Github Actions uses to perform the checkout action. -RUN useradd gha -u 1001 -m -s /bin/bash - -# Also add the user to passwordless sudoers so that we can install software -# later on without having to rebuild the container. -RUN adduser gha sudo -RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - -USER gha -WORKDIR /home/gha - -FROM ci-container AS ci-container-agent - -ENV GITHUB_RUNNER_VERSION=2.330.0 - -RUN mkdir actions-runner && \ - cd actions-runner && \ - curl -O -L https://github.com/actions/runner/releases/download/v$GITHUB_RUNNER_VERSION/actions-runner-linux-x64-$GITHUB_RUNNER_VERSION.tar.gz && \ - tar xzf ./actions-runner-linux-x64-$GITHUB_RUNNER_VERSION.tar.gz && \ - rm ./actions-runner-linux-x64-$GITHUB_RUNNER_VERSION.tar.gz - diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index f621bb1d64086..0000000000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,215 +0,0 @@ -# LLVM Documentation CI -# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -# See https://llvm.org/LICENSE.txt for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -name: "Test documentation build" - -permissions: - contents: read - -on: - push: - branches: - - 'main' - paths: - - 'llvm/docs/**' - - 'clang/docs/**' - - 'clang/include/clang/Basic/AttrDocs.td' - - 'clang/include/clang/Driver/ClangOptionDocs.td' - - 'clang/include/clang/Basic/DiagnosticDocs.td' - - 'clang-tools-extra/docs/**' - - 'lldb/docs/**' - - 'libunwind/docs/**' - - 'libcxx/docs/**' - - 'libc/docs/**' - - 'lld/docs/**' - - 'openmp/docs/**' - - 'polly/docs/**' - - 'flang/docs/**' - - 'flang/include/flang/Optimizer/Dialect/FIROps.td' - - '.github/workflows/docs.yml' - pull_request: - paths: - - 'llvm/docs/**' - - 'clang/docs/**' - - 'clang/include/clang/Basic/AttrDocs.td' - - 'clang/include/clang/Driver/ClangOptionDocs.td' - - 'clang/include/clang/Basic/DiagnosticDocs.td' - - 'clang-tools-extra/docs/**' - - 'lldb/docs/**' - - 'libunwind/docs/**' - - 'libcxx/docs/**' - - 'libc/docs/**' - - 'lld/docs/**' - - 'openmp/docs/**' - - 'polly/docs/**' - - 'flang/docs/**' - - 'flang/include/flang/Optimizer/Dialect/FIROps.td' - - '.github/workflows/docs.yml' - -jobs: - check-docs-build: - name: "Test documentation build" - runs-on: ubuntu-24.04 - if: github.repository == 'llvm/llvm-project' - steps: - - name: Fetch LLVM sources - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - fetch-depth: 2 - - name: Get subprojects that have doc changes - id: docs-changed-subprojects - uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47.0.0 - with: - skip_initial_fetch: true - base_sha: 'HEAD~1' - sha: 'HEAD' - files_yaml: | - llvm: - - 'llvm/docs/**' - clang: - - 'clang/docs/**' - - 'clang/include/clang/Basic/AttrDocs.td' - - 'clang/include/clang/Driver/ClangOptionDocs.td' - - 'clang/include/clang/Basic/DiagnosticDocs.td' - clang-tools-extra: - - 'clang-tools-extra/docs/**' - lldb: - - 'lldb/docs/**' - libunwind: - - 'libunwind/docs/**' - libcxx: - - 'libcxx/docs/**' - libc: - - 'libc/docs/**' - lld: - - 'lld/docs/**' - openmp: - - 'openmp/docs/**' - polly: - - 'polly/docs/**' - flang: - - 'flang/docs/**' - - 'flang/include/flang/Optimizer/Dialect/FIROps.td' - workflow: - - '.github/workflows/docs.yml' - - name: Setup Python env - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 - with: - python-version: '3.14' - cache: 'pip' - cache-dependency-path: 'llvm/docs/requirements-hashed.txt' - - name: Install python dependencies - run: pip install -r llvm/docs/requirements-hashed.txt - - name: Install system dependencies - run: | - sudo apt-get update - # swig and graphviz are lldb specific dependencies - sudo apt-get install -y cmake ninja-build swig graphviz - - name: Setup output folder - run: mkdir built-docs - - name: Build LLVM docs - if: | - steps.docs-changed-subprojects.outputs.llvm_any_changed == 'true' || - steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true' - run: | - cmake -B llvm-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_SPHINX=ON ./llvm - TZ=UTC ninja -C llvm-build docs-llvm-html docs-llvm-man - mkdir built-docs/llvm - cp -r llvm-build/docs/* built-docs/llvm/ - - name: Build Clang docs - if: | - steps.docs-changed-subprojects.outputs.clang_any_changed == 'true' || - steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true' - run: | - cmake -B clang-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_ENABLE_SPHINX=ON ./llvm - TZ=UTC ninja -C clang-build docs-clang-html docs-clang-man - mkdir built-docs/clang - cp -r clang-build/docs/* built-docs/clang/ - - name: Build clang-tools-extra docs - if: | - steps.docs-changed-subprojects.outputs.clang-tools-extra_any_changed == 'true' || - steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true' - run: | - cmake -B clang-tools-extra-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" -DLLVM_ENABLE_SPHINX=ON ./llvm - TZ=UTC ninja -C clang-tools-extra-build docs-clang-tools-html docs-clang-tools-man - mkdir built-docs/clang-tools-extra - cp -r clang-tools-extra-build/docs/* built-docs/clang-tools-extra/ - - name: Build LLDB docs - if: | - steps.docs-changed-subprojects.outputs.lldb_any_changed == 'true' || - steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true' - run: | - cmake -B lldb-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;lldb" -DLLVM_ENABLE_SPHINX=ON ./llvm - TZ=UTC ninja -C lldb-build docs-lldb-html docs-lldb-man - mkdir built-docs/lldb - cp -r lldb-build/docs/* built-docs/lldb/ - - name: Build libunwind docs - if: | - steps.docs-changed-subprojects.outputs.libunwind_any_changed == 'true' || - steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true' - run: | - cmake -B libunwind-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RUNTIMES="libunwind" -DLLVM_ENABLE_SPHINX=ON ./runtimes - TZ=UTC ninja -C libunwind-build docs-libunwind-html - mkdir built-docs/libunwind - cp -r libunwind-build/libunwind/docs/* built-docs/libunwind - - name: Build libcxx docs - if: | - steps.docs-changed-subprojects.outputs.libcxx_any_changed == 'true' || - steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true' - run: | - cmake -B libcxx-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RUNTIMES="libcxxabi;libcxx;libunwind" -DLLVM_ENABLE_SPHINX=ON ./runtimes - TZ=UTC ninja -C libcxx-build docs-libcxx-html - mkdir built-docs/libcxx - cp -r libcxx-build/libcxx/docs/* built-docs/libcxx/ - - name: Build libc docs - if: | - steps.docs-changed-subprojects.outputs.libc_any_changed == 'true' || - steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true' - run: | - cmake -B libc-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RUNTIMES="libc" -DLLVM_ENABLE_SPHINX=ON ./runtimes - TZ=UTC ninja -C libc-build docs-libc-html - mkdir built-docs/libc - cp -r libc-build/libc/docs/* built-docs/libc/ - - name: Build LLD docs - if: | - steps.docs-changed-subprojects.outputs.lld_any_changed == 'true' || - steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true' - run: | - cmake -B lld-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="lld" -DLLVM_ENABLE_SPHINX=ON ./llvm - TZ=UTC ninja -C lld-build docs-lld-html - mkdir built-docs/lld - cp -r lld-build/docs/* built-docs/lld/ - - name: Build OpenMP docs - if: | - steps.docs-changed-subprojects.outputs.openmp_any_changed == 'true' || - steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true' - run: | - cmake -B openmp-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;openmp" -DLLVM_ENABLE_SPHINX=ON ./llvm - TZ=UTC ninja -C openmp-build docs-openmp-html - mkdir built-docs/openmp - cp -r openmp-build/docs/* built-docs/openmp/ - - name: Build Polly docs - if: | - steps.docs-changed-subprojects.outputs.polly_any_changed == 'true' || - steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true' - run: | - cmake -B polly-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="polly" -DLLVM_ENABLE_SPHINX=ON ./llvm - TZ=UTC ninja -C polly-build docs-polly-html docs-polly-man - mkdir built-docs/polly - cp -r polly-build/docs/* built-docs/polly/ - - name: Build Flang docs - if: | - steps.docs-changed-subprojects.outputs.flang_any_changed == 'true' || - steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true' - run: | - cmake -B flang-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;mlir;flang" -DLLVM_ENABLE_SPHINX=ON ./llvm - TZ=UTC ninja -C flang-build docs-flang-html docs-flang-man - mkdir built-docs/flang - cp -r flang-build/docs/* built-docs/flang/ - - name: Upload docs - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 - with: - name: docs-output - path: built-docs/ diff --git a/.github/workflows/email-check.yaml b/.github/workflows/email-check.yaml deleted file mode 100644 index 28cd2905d816d..0000000000000 --- a/.github/workflows/email-check.yaml +++ /dev/null @@ -1,47 +0,0 @@ -name: "Check for private emails used in PRs" - -on: - pull_request: - types: - - opened - -permissions: - contents: read - -jobs: - validate_email: - runs-on: ubuntu-24.04 - if: github.repository == 'llvm/llvm-project' - steps: - - name: Fetch LLVM sources - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - ref: ${{ github.event.pull_request.head.sha }} - - - name: Extract author email - id: author - run: | - git log -1 - echo "EMAIL=$(git show -s --format='%ae' HEAD~0)" >> $GITHUB_OUTPUT - # Create empty comment file - echo "[]" > comments - - - name: Validate author email - if: ${{ endsWith(steps.author.outputs.EMAIL, 'noreply.github.com') }} - env: - COMMENT: >- - ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo.
- Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account.
- See [LLVM Developer Policy](https://llvm.org/docs/DeveloperPolicy.html#email-addresses) and - [LLVM Discourse](https://discourse.llvm.org/t/hidden-emails-on-github-should-we-do-something-about-it) for more information. - run: | - cat << EOF > comments - [{"body" : "$COMMENT"}] - EOF - - - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 - if: always() - with: - name: workflow-args - path: | - comments diff --git a/.github/workflows/get-llvm-version/action.yml b/.github/workflows/get-llvm-version/action.yml deleted file mode 100644 index 2218d926fc13d..0000000000000 --- a/.github/workflows/get-llvm-version/action.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Get LLVM Version -description: >- - Get the LLVM version from the llvm-project source tree. This action assumes - the llvm-project sources have already been checked out into GITHUB_WORKSPACE. - -outputs: - major: - description: LLVM major version - value: ${{ steps.version.outputs.major }} - minor: - description: LLVM minor version - value: ${{ steps.version.outputs.minor }} - patch: - description: LLVM patch version - value: ${{ steps.version.outputs.patch }} - -runs: - using: "composite" - steps: - - name: Get Version - shell: bash - id: version - run: | - for v in major minor patch; do - echo "$v=`llvm/utils/release/get-llvm-version.sh --$v`" >> $GITHUB_OUTPUT - done diff --git a/.github/workflows/gha-codeql.yml b/.github/workflows/gha-codeql.yml index 7baaa6ce0cf08..622ef326cb96d 100644 --- a/.github/workflows/gha-codeql.yml +++ b/.github/workflows/gha-codeql.yml @@ -6,7 +6,7 @@ permissions: on: pull_request: branches: - - main + - npu/main paths: - '.github/**' schedule: @@ -19,7 +19,7 @@ concurrency: jobs: codeql: name: 'Github Actions CodeQL' - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest permissions: security-events: write steps: diff --git a/.github/workflows/hlsl-matrix.yaml b/.github/workflows/hlsl-matrix.yaml deleted file mode 100644 index c63a32acd2b3e..0000000000000 --- a/.github/workflows/hlsl-matrix.yaml +++ /dev/null @@ -1,30 +0,0 @@ -name: HLSL Tests - -permissions: - contents: read - -on: - workflow_dispatch: - pull_request: - branches: - - main - paths: - - llvm/**/DirectX/** - - .github/workflows/hlsl* - - clang/*HLSL*/**/* - - clang/**/*HLSL* - - llvm/**/Frontend/HLSL/**/* - -jobs: - HLSL-Tests: - strategy: - fail-fast: false - matrix: - runs-on: - - hlsl-macos - - uses: ./.github/workflows/hlsl-test-all.yaml - with: - SKU: hlsl-macos - TestTarget: check-hlsl-clang-mtl # TODO: This target changes based on SKU - LLVM-ref: ${{ github.ref }} diff --git a/.github/workflows/hlsl-test-all.yaml b/.github/workflows/hlsl-test-all.yaml deleted file mode 100644 index cc4b52ae6a728..0000000000000 --- a/.github/workflows/hlsl-test-all.yaml +++ /dev/null @@ -1,82 +0,0 @@ -name: HLSL Test - -permissions: - contents: read - -on: - workflow_call: - inputs: - OffloadTest-branch: - description: 'Test Suite Branch' - required: false - default: 'main' - type: string - LLVM-ref: - description: 'LLVM Branch' - required: false - default: 'main' - type: string - SKU: - required: true - type: string - TestTarget: - required: false - default: 'check-hlsl' - type: string - -jobs: - build: - runs-on: ${{ inputs.SKU }} - steps: - - name: Checkout DXC - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - repository: Microsoft/DirectXShaderCompiler - ref: main - path: DXC - submodules: true - - name: Checkout LLVM - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - ref: ${{ inputs.LLVM-branch }} - path: llvm-project - - name: Checkout OffloadTest - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - repository: llvm/offload-test-suite - ref: main - path: OffloadTest - - name: Checkout Golden Images - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - repository: llvm/offload-golden-images - ref: main - path: golden-images - - name: Build DXC - run: | - cd DXC - mkdir build - cd build - cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -C ${{ github.workspace }}/DXC/cmake/caches/PredefinedParams.cmake -C ${{ github.workspace }}/OffloadTest/cmake/caches/sccache.cmake -DHLSL_DISABLE_SOURCE_GENERATION=On ${{ github.workspace }}/DXC/ - ninja dxv llvm-dis - - name: Build LLVM - run: | - cd llvm-project - mkdir build - cd build - cmake -G Ninja -DDXIL_DIS=${{ github.workspace }}/DXC/build/bin/llvm-dis -DLLVM_INCLUDE_DXIL_TESTS=On -DCMAKE_BUILD_TYPE=Release -C ${{ github.workspace }}/llvm-project/clang/cmake/caches/HLSL.cmake -C ${{ github.workspace }}/OffloadTest/cmake/caches/sccache.cmake -DDXC_DIR=${{ github.workspace }}/DXC/build/bin -DLLVM_EXTERNAL_OFFLOADTEST_SOURCE_DIR=${{ github.workspace }}/OffloadTest -DLLVM_EXTERNAL_PROJECTS="OffloadTest" -DLLVM_LIT_ARGS="--xunit-xml-output=testresults.xunit.xml -v" -DGOLDENIMAGE_DIR=${{ github.workspace }}/golden-images ${{ github.workspace }}/llvm-project/llvm/ - ninja hlsl-test-depends llvm-test-depends clang-test-depends - - name: Run HLSL Tests - run: | - cd llvm-project - cd build - ninja check-llvm - ninja check-clang - ninja check-hlsl-unit - ninja ${{ inputs.TestTarget }} - - name: Publish Test Results - uses: EnricoMi/publish-unit-test-result-action/macos@34d7c956a59aed1bfebf31df77b8de55db9bbaaf # v2.21.0 - if: always() && runner.os == 'macOS' - with: - comment_mode: off - files: llvm-project/build/**/testresults.xunit.xml diff --git a/.github/workflows/issue-release-workflow.yml b/.github/workflows/issue-release-workflow.yml deleted file mode 100644 index 9aa1276e10e92..0000000000000 --- a/.github/workflows/issue-release-workflow.yml +++ /dev/null @@ -1,69 +0,0 @@ -# This contains the workflow definitions that allow users to test backports -# to the release branch using comments on issues. -# -# /cherry-pick <...> -# -# This comment will attempt to cherry-pick the given commits to the latest -# release branch (release/Y.x) and if successful, push the result to a branch -# on github. -# -# /branch // -# -# This comment will create a pull request from to the latest release -# branch. - -name: Issue Release Workflow - -permissions: - contents: read - -on: - issue_comment: - types: - - created - - edited - issues: - types: - - opened - -env: - COMMENT_BODY: ${{ github.event.action == 'opened' && github.event.issue.body || github.event.comment.body }} - -jobs: - backport-commits: - name: Backport Commits - runs-on: ubuntu-24.04 - permissions: - issues: write - pull-requests: write - if: >- - (github.repository == 'llvm/llvm-project') && - !startswith(github.event.comment.body, '') && - contains(github.event.action == 'opened' && github.event.issue.body || github.event.comment.body, '/cherry-pick') - steps: - - name: Fetch LLVM sources - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - repository: llvm/llvm-project - # GitHub stores the token used for checkout and uses it for pushes - # too, but we want to use a different token for pushing, so we need - # to disable persist-credentials here. - persist-credentials: false - fetch-depth: 0 - - - name: Setup Environment - run: | - pip install --require-hashes -r ./llvm/utils/git/requirements.txt - ./llvm/utils/git/github-automation.py --token ${{ github.token }} setup-llvmbot-git - - - name: Backport Commits - run: | - printf "%s" "$COMMENT_BODY" | - ./llvm/utils/git/github-automation.py \ - --repo "$GITHUB_REPOSITORY" \ - --token "${{ secrets.RELEASE_WORKFLOW_PR_CREATE }}" \ - release-workflow \ - --branch-repo-token ${{ secrets.RELEASE_WORKFLOW_PUSH_SECRET }} \ - --issue-number ${{ github.event.issue.number }} \ - --requested-by ${{ (github.event.action == 'opened' && github.event.issue.user.login) || github.event.comment.user.login }} \ - auto diff --git a/.github/workflows/issue-subscriber.yml b/.github/workflows/issue-subscriber.yml deleted file mode 100644 index 0006b982aeae6..0000000000000 --- a/.github/workflows/issue-subscriber.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Issue Subscriber - -on: - issues: - types: - - labeled - -permissions: - contents: read - -jobs: - auto-subscribe: - runs-on: ubuntu-24.04 - if: github.repository == 'llvm/llvm-project' - steps: - - name: Checkout Automation Script - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - sparse-checkout: llvm/utils/git/ - ref: main - - - name: Setup Automation Script - working-directory: ./llvm/utils/git/ - run: | - pip install --require-hashes -r requirements.txt - - - name: Update watchers - working-directory: ./llvm/utils/git/ - # https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable - env: - LABEL_NAME: ${{ github.event.label.name }} - run: | - python3 ./github-automation.py \ - --token '${{ secrets.ISSUE_SUBSCRIBER_TOKEN }}' \ - issue-subscriber \ - --issue-number '${{ github.event.issue.number }}' \ - --label-name "$LABEL_NAME" diff --git a/.github/workflows/issue-write.yml b/.github/workflows/issue-write.yml deleted file mode 100644 index ece6081ce9ba6..0000000000000 --- a/.github/workflows/issue-write.yml +++ /dev/null @@ -1,159 +0,0 @@ -name: Comment on an issue - -on: - workflow_run: - workflows: - - "Check code formatting" - - "Check for private emails used in PRs" - - "PR Request Release Note" - - "Code lint" - - "CI Checks" - types: - - completed - -permissions: - contents: read - -jobs: - pr-comment: - runs-on: ubuntu-24.04 - permissions: - pull-requests: write - if: > - github.event.workflow_run.event == 'pull_request' && - ( - github.event.workflow_run.conclusion == 'success' || - github.event.workflow_run.conclusion == 'failure' - ) - steps: - - name: Fetch Sources - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - sparse-checkout: | - .github/workflows/unprivileged-download-artifact/action.yml - sparse-checkout-cone-mode: false - - name: 'Download artifact' - uses: ./.github/workflows/unprivileged-download-artifact - id: download-artifact - with: - run-id: ${{ github.event.workflow_run.id }} - artifact-name: workflow-args - - - name: 'Comment on PR' - if: steps.download-artifact.outputs.artifact-id != '' - uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - var fs = require('fs'); - const comments = JSON.parse(fs.readFileSync('./comments')); - if (!comments || comments.length == 0) { - return; - } - - let runInfo = await github.rest.actions.getWorkflowRun({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: context.payload.workflow_run.id - }); - - console.log(runInfo); - - - // Query to find the number of the pull request that triggered this job. - // The associated pull requests are based off of the branch name, so if - // you create a pull request for a branch, close it, and then create - // another pull request with the same branch, then this query will return - // two associated pull requests. This is why we have to fetch all the - // associated pull requests and then iterate through them to find the - // one that is open. - const gql_query = ` - query($repo_owner : String!, $repo_name : String!, $branch: String!) { - repository(owner: $repo_owner, name: $repo_name) { - ref (qualifiedName: $branch) { - associatedPullRequests(first: 100) { - nodes { - baseRepository { - owner { - login - } - } - number - state - } - } - } - } - } - ` - const gql_variables = { - repo_owner: runInfo.data.head_repository.owner.login, - repo_name: runInfo.data.head_repository.name, - branch: runInfo.data.head_branch - } - const gql_result = await github.graphql(gql_query, gql_variables); - console.log(gql_result); - // If the branch for the PR was deleted before this job has a chance - // to run, then the ref will be null. This can happen if someone: - // 1. Rebase the PR, which triggers some workflow. - // 2. Immediately merges the PR and deletes the branch. - // 3. The workflow finishes and triggers this job. - if (!gql_result.repository.ref) { - console.log("Ref has been deleted"); - return; - } - console.log(gql_result.repository.ref.associatedPullRequests.nodes); - - var pr_number = 0; - gql_result.repository.ref.associatedPullRequests.nodes.forEach((pr) => { - - // The largest PR number is the one we care about. The only way - // to have more than one associated pull requests is if all the - // old pull requests are in the closed state. - if (pr.baseRepository.owner.login = context.repo.owner && pr.number > pr_number) { - pr_number = pr.number; - } - }); - if (pr_number == 0) { - console.log("Error retrieving pull request number"); - return; - } - - await comments.forEach(function (comment) { - if (comment.id) { - // Security check: Ensure that this comment was created by - // the github-actions bot, so a malicious input won't overwrite - // a user's comment. - github.rest.issues.getComment({ - owner: context.repo.owner, - repo: context.repo.repo, - comment_id: comment.id - }).then((old_comment) => { - console.log(old_comment); - if (old_comment.data.user.login != "github-actions[bot]") { - console.log("Invalid comment id: " + comment.id); - return; - } - github.rest.issues.updateComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: pr_number, - comment_id: comment.id, - body: comment.body - }); - }); - } else { - github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: pr_number, - body: comment.body - }); - } - }); - - - name: Dump comments file - if: >- - always() && - steps.download-artifact.outputs.artifact-id != '' - run: cat comments diff --git a/.github/workflows/libc-fullbuild-tests.yml b/.github/workflows/libc-fullbuild-tests.yml deleted file mode 100644 index 3c7dc5d4fcd75..0000000000000 --- a/.github/workflows/libc-fullbuild-tests.yml +++ /dev/null @@ -1,184 +0,0 @@ -# This workflow is for pre-commit testing of the LLVM-libc project. -name: LLVM-libc Pre-commit Fullbuild Tests -permissions: - contents: read -on: - pull_request: - branches: [ "main" ] - paths: - - 'libc/**' - - '.github/workflows/libc-fullbuild-tests.yml' - -jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - # Build basic linux configuration with Debug/Release/MinSizeRel and all - # other configurations in Debug only. - include: - - os: ubuntu-24.04 - build_type: Debug - c_compiler: clang-22 - cpp_compiler: clang++-22 - target: x86_64-unknown-linux-llvm - include_scudo: ON - - os: ubuntu-24.04 - build_type: Release - c_compiler: clang-22 - cpp_compiler: clang++-22 - target: x86_64-unknown-linux-llvm - include_scudo: ON - - os: ubuntu-24.04 - build_type: MinSizeRel - c_compiler: clang-22 - cpp_compiler: clang++-22 - target: x86_64-unknown-linux-llvm - include_scudo: ON - - os: ubuntu-24.04-arm - build_type: Debug - c_compiler: clang-22 - cpp_compiler: clang++-22 - target: aarch64-unknown-linux-llvm - include_scudo: ON - - os: ubuntu-24.04 - build_type: Debug - c_compiler: clang-22 - cpp_compiler: clang++-22 - target: x86_64-unknown-uefi-llvm - include_scudo: OFF - - os: ubuntu-24.04 - build_type: MinSizeRel - c_compiler: clang-22 - cpp_compiler: clang++-22 - target: armv6m-none-eabi - include_scudo: OFF - - os: ubuntu-24.04 - build_type: MinSizeRel - c_compiler: clang-22 - cpp_compiler: clang++-22 - target: armv7m-none-eabi - include_scudo: OFF - - os: ubuntu-24.04 - build_type: MinSizeRel - c_compiler: clang-22 - cpp_compiler: clang++-22 - target: armv7em-none-eabi - include_scudo: OFF - - os: ubuntu-24.04 - build_type: MinSizeRel - c_compiler: clang-22 - cpp_compiler: clang++-22 - target: armv8m.main-none-eabi - include_scudo: OFF - - os: ubuntu-24.04 - build_type: MinSizeRel - c_compiler: clang-22 - cpp_compiler: clang++-22 - target: armv8.1m.main-none-eabi - include_scudo: OFF - - os: ubuntu-24.04 - build_type: MinSizeRel - c_compiler: clang-22 - cpp_compiler: clang++-22 - target: riscv32-unknown-elf - include_scudo: OFF - # TODO: add back gcc build when it is fixed - # - c_compiler: gcc - # cpp_compiler: g++ - steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - - # Libc's build is relatively small comparing with other components of LLVM. - # A fresh fullbuild takes about 190MiB of uncompressed disk space, which can - # be compressed into ~40MiB. Limiting the cache size to 1G should be enough. - # Prefer sccache as it is more modern. - # Do not use direct GHAC access even though it is supported by sccache. GHAC rejects - # frequent small object writes. - - name: Setup ccache - uses: hendrikmuhs/ccache-action@5ebbd400eff9e74630f759d94ddd7b6c26299639 # v1.2.20 - with: - max-size: 1G - key: libc_fullbuild_${{ matrix.c_compiler }} - variant: sccache - - # Notice: - # - MPFR is required by some of the mathlib tests. - # - Debian has a multilib setup, so we need to symlink the asm directory. - # For more information, see https://wiki.debian.org/Multiarch/LibraryPathOverview - - name: Prepare dependencies (Ubuntu) - run: | - wget https://apt.llvm.org/llvm.sh - chmod +x llvm.sh - sudo ./llvm.sh 22 - sudo apt-get update - sudo apt-get install -y libmpfr-dev libgmp-dev libmpc-dev ninja-build linux-libc-dev - sudo ln -sf /usr/include/$(uname -p)-linux-gnu/asm /usr/include/asm - - - name: Set reusable strings - id: strings - shell: bash - run: | - echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" - echo "build-install-dir=${{ github.workspace }}/install" >> "$GITHUB_OUTPUT" - - # Configure libc fullbuild with scudo. - # Use MinSizeRel to reduce the size of the build. - - name: Configure CMake - run: | - export RUNTIMES="libc" - - export CMAKE_FLAGS=" - -G Ninja - -S ${{ github.workspace }}/runtimes - -B ${{ steps.strings.outputs.build-output-dir }} - -DCMAKE_ASM_COMPILER=${{ matrix.c_compiler }} - -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} - -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} - -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} - -DCMAKE_C_COMPILER_LAUNCHER=sccache - -DCMAKE_CXX_COMPILER_LAUNCHER=sccache - -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.build-install-dir }}" - - if [[ ${{ matrix.include_scudo}} == "ON" ]]; then - export RUNTIMES="$RUNTIMES;compiler-rt" - export CMAKE_FLAGS="$CMAKE_FLAGS - -DLLVM_LIBC_INCLUDE_SCUDO=ON - -DCOMPILER_RT_BUILD_SCUDO_STANDALONE_WITH_LLVM_LIBC=ON - -DCOMPILER_RT_BUILD_GWP_ASAN=OFF - -DCOMPILER_RT_SCUDO_STANDALONE_BUILD_SHARED=OFF" - fi - - case "${{ matrix.target }}" in - *-none-eabi|riscv32-unknown-elf) - cmake $CMAKE_FLAGS \ - -C ${{ github.workspace }}/libc/cmake/caches/${{ matrix.target }}.cmake - ;; - *) - cmake -DLLVM_RUNTIME_TARGETS=${{ matrix.target }} \ - -DLLVM_ENABLE_RUNTIMES="$RUNTIMES" \ - -DLLVM_LIBC_FULL_BUILD=ON \ - $CMAKE_FLAGS - ;; - esac - - - name: Build - run: > - cmake - --build ${{ steps.strings.outputs.build-output-dir }} - --parallel - --target install - - - name: Test - # Skip UEFI and baremetal tests until we have testing set up. - if: ${{ - !endsWith(matrix.target, '-uefi-llvm') && - !endsWith(matrix.target, '-none-eabi') && - matrix.target != 'riscv32-unknown-elf' - }} - run: > - cmake - --build ${{ steps.strings.outputs.build-output-dir }} - --parallel - --target check-libc diff --git a/.github/workflows/libc-overlay-tests.yml b/.github/workflows/libc-overlay-tests.yml deleted file mode 100644 index ca6e9ad92ab1b..0000000000000 --- a/.github/workflows/libc-overlay-tests.yml +++ /dev/null @@ -1,114 +0,0 @@ -# This workflow is for pre-commit testing of the LLVM-libc project. -name: LLVM-libc Pre-commit Overlay Tests -permissions: - contents: read -on: - pull_request: - branches: [ "main" ] - paths: - - 'libc/**' - - '.github/workflows/libc-overlay-tests.yml' - -jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. - fail-fast: false - matrix: - os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2022, windows-2025, macos-14] - include: - # TODO: add linux gcc when it is fixed - - os: ubuntu-24.04 - compiler: - c_compiler: clang - cpp_compiler: clang++ - - os: ubuntu-24.04-arm - compiler: - c_compiler: clang - cpp_compiler: clang++ - - os: windows-2022 - compiler: - c_compiler: clang-cl - cpp_compiler: clang-cl - - os: windows-2025 - compiler: - c_compiler: clang-cl - cpp_compiler: clang-cl - - os: macos-14 - compiler: - c_compiler: clang - cpp_compiler: clang++ - - steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - - # Libc's build is relatively small comparing with other components of LLVM. - # A fresh linux overlay takes about 180MiB of uncompressed disk space, which can - # be compressed into ~40MiB. MacOS and Windows overlay builds are less than 10MiB - # after compression. Limiting the cache size to 1G should be enough. - # Prefer sccache as it is modern and it has a guarantee to work with MSVC. - # Do not use direct GHAC access even though it is supported by sccache. GHAC rejects - # frequent small object writes. - - name: Setup ccache - uses: hendrikmuhs/ccache-action@5ebbd400eff9e74630f759d94ddd7b6c26299639 # v1.2.20 - with: - max-size: 1G - key: libc_overlay_build_${{ matrix.os }}_${{ matrix.compiler.c_compiler }} - variant: sccache - - # MPFR is required by some of the mathlib tests. - - name: Prepare dependencies (Ubuntu) - if: runner.os == 'Linux' - run: | - sudo apt-get update - sudo apt-get install -y libmpfr-dev libgmp-dev libmpc-dev ninja-build - - # Chocolatey is shipped with Windows runners. Windows Server 2025 recommends WinGet. - # Consider migrating to WinGet when Windows Server 2025 is available. - - name: Prepare dependencies (Windows) - if: runner.os == 'Windows' - run: | - choco install ninja - - - name: Prepare dependencies (macOS) - if: runner.os == 'macOS' - run: | - brew install ninja - - - name: Set reusable strings - id: strings - shell: bash - run: | - echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" - - # Use MinSizeRel to reduce the size of the build. - # Notice that CMP0141=NEW and MSVC_DEBUG_INFORMATION_FORMAT=Embedded are required - # by the sccache tool. - - name: Configure CMake - run: > - cmake -B ${{ steps.strings.outputs.build-output-dir }} - -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cpp_compiler }} - -DCMAKE_C_COMPILER=${{ matrix.compiler.c_compiler }} - -DCMAKE_BUILD_TYPE=Debug - -DCMAKE_C_COMPILER_LAUNCHER=sccache - -DCMAKE_CXX_COMPILER_LAUNCHER=sccache - -DCMAKE_POLICY_DEFAULT_CMP0141=NEW - -DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded - -DLLVM_ENABLE_RUNTIMES=libc - -G Ninja - -S ${{ github.workspace }}/runtimes - - - name: Build - run: > - cmake - --build ${{ steps.strings.outputs.build-output-dir }} - --parallel - --target libc - - - name: Test - run: > - cmake - --build ${{ steps.strings.outputs.build-output-dir }} - --parallel - --target check-libc diff --git a/.github/workflows/libclang-abi-tests.yml b/.github/workflows/libclang-abi-tests.yml deleted file mode 100644 index cb7dad79f0977..0000000000000 --- a/.github/workflows/libclang-abi-tests.yml +++ /dev/null @@ -1,158 +0,0 @@ -name: libclang ABI Tests - -permissions: - contents: read - -on: - workflow_dispatch: - push: - branches: - - 'release/**' - paths: - - 'clang/**' - - '.github/workflows/libclang-abi-tests.yml' - pull_request: - branches: - - 'release/**' - paths: - - 'clang/**' - - '.github/workflows/libclang-abi-tests.yml' - -concurrency: - # Skip intermediate builds: always. - # Cancel intermediate builds: only if it is a pull request build. - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} - -jobs: - abi-dump-setup: - if: github.repository_owner == 'llvm' - runs-on: ubuntu-24.04 - outputs: - BASELINE_REF: ${{ steps.vars.outputs.BASELINE_REF }} - ABI_HEADERS: ${{ steps.vars.outputs.ABI_HEADERS }} - ABI_LIBS: ${{ steps.vars.outputs.ABI_LIBS }} - BASELINE_VERSION_MAJOR: ${{ steps.vars.outputs.BASELINE_VERSION_MAJOR }} - LLVM_VERSION_MAJOR: ${{ steps.version.outputs.major }} - LLVM_VERSION_MINOR: ${{ steps.version.outputs.minor }} - LLVM_VERSION_PATCH: ${{ steps.version.outputs.patch }} - steps: - - name: Checkout source - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - fetch-depth: 250 - - - name: Get LLVM version - id: version - uses: ./.github/workflows/get-llvm-version - - - name: Setup Variables - id: vars - run: | - remote_repo='https://github.com/llvm/llvm-project' - if [ ${{ steps.version.outputs.patch }} -eq 0 ]; then - major_version=$(( ${{ steps.version.outputs.major }} - 1)) - baseline_ref="llvmorg-$major_version.1.0" - - # If there is a minor release, we want to use that as the base line. - minor_ref=$(git ls-remote --refs -t "$remote_repo" llvmorg-"$major_version".[1-9].[0-9] | tail -n1 | grep -o 'llvmorg-.\+' || true) - if [ -n "$minor_ref" ]; then - baseline_ref="$minor_ref" - else - # Check if we have a release candidate - rc_ref=$(git ls-remote --refs -t "$remote_repo" llvmorg-"$major_version".[1-9].[0-9]-rc* | tail -n1 | grep -o 'llvmorg-.\+' || true) - if [ -n "$rc_ref" ]; then - baseline_ref="$rc_ref" - fi - fi - { - echo "BASELINE_VERSION_MAJOR=$major_version" - echo "BASELINE_REF=$baseline_ref" - echo "ABI_HEADERS=clang-c" - echo "ABI_LIBS=libclang.so" - } >> "$GITHUB_OUTPUT" - else - { - echo "BASELINE_VERSION_MAJOR=${{ steps.version.outputs.major }}" - echo "BASELINE_REF=llvmorg-${{ steps.version.outputs.major }}.1.0" - echo "ABI_HEADERS=." - echo "ABI_LIBS=libclang.so libclang-cpp.so" - } >> "$GITHUB_OUTPUT" - fi - - abi-dump: - if: github.repository_owner == 'llvm' - needs: abi-dump-setup - runs-on: ubuntu-24.04 - container: - image: "ghcr.io/llvm/ci-ubuntu-24.04-abi-tests@sha256:9138b6aea737d935e92ad2afdf5d49325880f9b187b5b979b135ac80cd456135" #ghcr.io/llvm/ci-ubuntu-24.04-abi-tests:9524b37c503f - strategy: - matrix: - name: - - build-baseline - - build-latest - include: - - name: build-baseline - llvm_version_major: ${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MAJOR }} - ref: ${{ needs.abi-dump-setup.outputs.BASELINE_REF }} - repo: llvm/llvm-project - - name: build-latest - llvm_version_major: ${{ needs.abi-dump-setup.outputs.LLVM_VERSION_MAJOR }} - ref: ${{ github.sha }} - repo: ${{ github.repository }} - steps: - - name: Download source code - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - ref: ${{ matrix.ref }} - repository: ${{ matrix.repo }} - - name: Configure - run: | - mkdir install - cmake -B build -S llvm -G Ninja -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD="" -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON -DCMAKE_C_FLAGS_DEBUG="-g1 -Og" -DCMAKE_CXX_FLAGS_DEBUG="-g1 -Og" -DCMAKE_INSTALL_PREFIX="$(pwd)"/install llvm - - name: Build - run: ninja -C build/ ${{ needs.abi-dump-setup.outputs.ABI_LIBS }} install-clang-headers - - name: Dump ABI - run: | - parallel abi-dumper -lver ${{ matrix.ref }} -skip-cxx -public-headers ./install/include/${{ needs.abi-dump-setup.outputs.ABI_HEADERS }} -o {}-${{ matrix.ref }}.abi ./build/lib/{} ::: ${{ needs.abi-dump-setup.outputs.ABI_LIBS }} - for lib in ${{ needs.abi-dump-setup.outputs.ABI_LIBS }}; do - # Remove symbol versioning from dumps, so we can compare across major versions. - sed -i 's/LLVM_[0-9]\+/LLVM_NOVERSION/' $lib-${{ matrix.ref }}.abi - done - - name: Upload ABI file - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # 5.0.0 - with: - name: ${{ matrix.name }} - path: '*${{ matrix.ref }}.abi' - - abi-compare: - if: github.repository_owner == 'llvm' - runs-on: ubuntu-24.04 - container: - image: "ghcr.io/llvm/ci-ubuntu-24.04-abi-tests@sha256:9138b6aea737d935e92ad2afdf5d49325880f9b187b5b979b135ac80cd456135" #ghcr.io/llvm/ci-ubuntu-24.04-abi-tests:9524b37c503f - needs: - - abi-dump-setup - - abi-dump - steps: - - name: Download baseline - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 - with: - name: build-baseline - path: build-baseline - - name: Download latest - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 - with: - name: build-latest - path: build-latest - - - name: Compare ABI - run: | - for lib in ${{ needs.abi-dump-setup.outputs.ABI_LIBS }}; do - abi-compliance-checker -lib $lib -old build-baseline/$lib*.abi -new build-latest/$lib*.abi - done - - name: Upload ABI Comparison - if: always() - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # 5.0.0 - with: - name: compat-report-${{ github.sha }} - path: compat_reports/ diff --git a/.github/workflows/libclang-python-tests.yml b/.github/workflows/libclang-python-tests.yml deleted file mode 100644 index 27ad0aa512c03..0000000000000 --- a/.github/workflows/libclang-python-tests.yml +++ /dev/null @@ -1,57 +0,0 @@ -name: Libclang Python Binding Tests - -permissions: - contents: read - -on: - push: - branches: - - 'main' - paths: - - 'clang/bindings/python/**' - - 'clang/tools/libclang/**' - - 'clang/CMakeList.txt' - - '.github/workflows/libclang-python-tests.yml' - pull_request: - paths: - - 'clang/bindings/python/**' - - 'clang/tools/libclang/**' - - 'clang/CMakeList.txt' - - '.github/workflows/libclang-python-tests.yml' - -jobs: - check-clang-python: - # Build libclang and then run the libclang Python binding's unit tests. - # There is an issue running on "windows-2019". - # See https://github.com/llvm/llvm-project/issues/76601#issuecomment-1873049082. - name: Build and run Python unit tests - if: github.repository == 'llvm/llvm-project' - runs-on: ubuntu-24.04 - strategy: - fail-fast: false - matrix: - python-version: ["3.8", "3.13"] - steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - - name: Setup Python - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 - with: - python-version: ${{ matrix.python-version }} - - name: Setup ccache - uses: hendrikmuhs/ccache-action@5ebbd400eff9e74630f759d94ddd7b6c26299639 # v1.2.20 - with: - max-size: 2G - key: spirv-ubuntu-24.04 - variant: sccache - - name: Build and Test - run: | - mkdir build - cmake -GNinja \ - -S llvm \ - -B build \ - -DCMAKE_BUILD_TYPE=Release \ - -DLLVM_ENABLE_ASSERTIONS=ON \ - -DCMAKE_C_COMPILER_LAUNCHER=sccache \ - -DCMAKE_CXX_COMPILER_LAUNCHER=sccache \ - -DLLVM_ENABLE_PROJECTS=clang - ninja -C build check-clang-python diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml deleted file mode 100644 index bded56d54ed37..0000000000000 --- a/.github/workflows/libcxx-build-and-test.yaml +++ /dev/null @@ -1,295 +0,0 @@ -# This file defines pre-commit CI for libc++, libc++abi, and libunwind (on Github). -# -# We split the configurations in multiple stages with the intent of saving compute time -# when a job fails early in the pipeline. This is why the jobs are marked as `continue-on-error: false`. -# We try to run the CI configurations with the most signal in the first stage. -# -# Stages 1 & 2 are meant to be "smoke tests", and are meant to catch most build/test failures quickly and without using -# too many resources. -# Stage 3 is "everything else", and is meant to catch breakages on more niche or unique configurations. -# -# Therefore, we "fail-fast" for any failures during stages 1 & 2, meaning any job failing cancels all other running jobs, -# under the assumption that if the "smoke tests" fail, then the other configurations will likely fail in the same way. -# However, stage 3 does not fail fast, as it's more likely that any one job failing is a flake or a configuration-specific -# -name: Build and Test libc++ -on: - pull_request: - paths: - - 'libcxx/**' - - 'libcxxabi/**' - - 'libunwind/**' - - 'runtimes/**' - - 'cmake/**' - - '.github/workflows/libcxx-build-and-test.yaml' - schedule: - # Run nightly at 08:00 UTC (aka 00:00 Pacific, aka 03:00 Eastern) - - cron: '0 8 * * *' - -permissions: - contents: read # Default everything to read-only - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number }} - cancel-in-progress: true - -jobs: - stage1: - if: github.repository_owner == 'llvm' - runs-on: llvm-premerge-libcxx-runners - continue-on-error: false - strategy: - fail-fast: false - matrix: - config: [ - 'frozen-cxx03-headers', - 'generic-cxx03', - 'generic-cxx26', - 'generic-modules' - ] - cc: [ 'clang-22' ] - cxx: [ 'clang++-22' ] - include: - - config: 'generic-gcc' - cc: 'gcc-15' - cxx: 'g++-15' - steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - - name: ${{ matrix.config }}.${{ matrix.cxx }} - run: libcxx/utils/ci/run-buildbot ${{ matrix.config }} - env: - CC: ${{ matrix.cc }} - CXX: ${{ matrix.cxx }} - - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 - if: always() - with: - name: ${{ matrix.config }}-${{ matrix.cxx }}-results - path: | - **/test-results.xml - **/*.abilist - **/CMakeConfigureLog.yaml - **/CMakeError.log - **/CMakeOutput.log - **/crash_diagnostics/* - stage2: - if: github.repository_owner == 'llvm' - runs-on: llvm-premerge-libcxx-runners - needs: [ stage1 ] - continue-on-error: false - strategy: - fail-fast: false - matrix: - config: [ - 'generic-cxx11', - 'generic-cxx14', - 'generic-cxx17', - 'generic-cxx20', - 'generic-cxx23' - ] - cc: [ 'clang-22' ] - cxx: [ 'clang++-22' ] - include: - - config: 'generic-gcc-cxx11' - cc: 'gcc-15' - cxx: 'g++-15' - - config: 'generic-cxx26' - cc: 'clang-21' - cxx: 'clang++-21' - - config: 'generic-cxx26' - cc: 'clang-20' - cxx: 'clang++-20' - steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - - name: ${{ matrix.config }} - run: libcxx/utils/ci/run-buildbot ${{ matrix.config }} - env: - CC: ${{ matrix.cc }} - CXX: ${{ matrix.cxx }} - - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 - if: always() # Upload artifacts even if the build or test suite fails - with: - name: ${{ matrix.config }}-${{ matrix.cxx }}-results - path: | - **/test-results.xml - **/*.abilist - **/CMakeConfigureLog.yaml - **/CMakeError.log - **/CMakeOutput.log - **/crash_diagnostics/* - stage3: - if: github.repository_owner == 'llvm' - needs: [ stage2 ] - continue-on-error: false - strategy: - fail-fast: false - max-parallel: 8 - matrix: - config: [ - 'generic-abi-unstable', - 'generic-hardening-mode-debug', - 'generic-hardening-mode-extensive', - 'generic-hardening-mode-extensive-observe-semantic', - 'generic-hardening-mode-fast', - 'generic-hardening-mode-fast-with-abi-breaks', - 'generic-merged', - 'generic-modules-cxx17-lsv', - 'generic-no-exceptions', - 'generic-no-experimental', - 'generic-no-filesystem', - 'generic-no-localization', - 'generic-no-terminal', - 'generic-no-random_device', - 'generic-no-threads', - 'generic-no-tzdb', - 'generic-no-unicode', - 'generic-no-wide-characters', - 'generic-no-rtti', - 'generic-optimized-speed', - 'generic-static', - 'bootstrapping-build' - ] - machine: [ 'llvm-premerge-libcxx-runners' ] - include: - - config: 'generic-cxx26' - machine: llvm-premerge-libcxx-runners - - config: 'generic-asan' - machine: llvm-premerge-libcxx-runners - - config: 'generic-tsan' - machine: llvm-premerge-libcxx-runners - - config: 'generic-ubsan' - machine: llvm-premerge-libcxx-runners - # Use a larger machine for MSAN to avoid timeout and memory allocation issues. - - config: 'generic-msan' - machine: llvm-premerge-libcxx-runners - runs-on: ${{ matrix.machine }} - steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - - name: ${{ matrix.config }} - run: libcxx/utils/ci/run-buildbot ${{ matrix.config }} - env: - CC: clang-22 - CXX: clang++-22 - - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 - if: always() - with: - name: ${{ matrix.config }}-results - path: | - **/test-results.xml - **/*.abilist - **/CMakeConfigureLog.yaml - **/CMakeError.log - **/CMakeOutput.log - **/crash_diagnostics/* - - macos: - needs: [ stage2 ] - strategy: - fail-fast: false - matrix: - include: - - config: generic-cxx03 - os: macos-15 - - config: generic-cxx23 - os: macos-15 - - config: generic-modules - os: macos-15 - - config: apple-configuration - os: macos-15 - # TODO: These jobs are intended to test back-deployment (building against ToT libc++ but running against an - # older system-provided libc++.dylib). Doing this properly would require building the test suite on a - # recent macOS using a recent Clang (hence recent Xcode), and then running the actual test suite on an - # older mac. We could do that by e.g. sharing artifacts between the two jobs. - # - # However, our Lit configuration currently doesn't provide a good way to do that in a batch, so our only - # alternative is to actually build on the same host that we're going to run on. Sadly, that doesn't work - # since older macOSes don't support newer Xcodes. For now, we run the "backdeployment" jobs on recent - # macOS versions as a way to avoid rotting that configuration, but it doesn't provide a lot of additional - # coverage. - - config: apple-system - os: macos-15 - - config: apple-system-hardened - os: macos-15 - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - - uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0 - with: - # https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md - xcode-version: '26.0' - - uses: seanmiddleditch/gha-setup-ninja@3b1f8f94a2f8254bd26914c4ab9474d4f0015f67 # v6 - - name: Build and test - run: | - python3 -m venv .venv - source .venv/bin/activate - python -m pip install psutil - xcrun bash libcxx/utils/ci/run-buildbot ${{ matrix.config }} - env: - CC: clang - CXX: clang++ - - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 - if: always() # Upload artifacts even if the build or test suite fails - with: - name: macos-${{ matrix.config }}-results - path: | - **/test-results.xml - **/*.abilist - **/CMakeConfigureLog.yaml - **/CMakeError.log - **/CMakeOutput.log - **/crash_diagnostics/* - - windows: - needs: [ stage2 ] - strategy: - fail-fast: false - matrix: - include: - - { config: clang-cl-dll, mingw: false, cc: clang-cl, cxx: clang-cl } - - { config: clang-cl-static, mingw: false, cc: clang-cl, cxx: clang-cl } - - { config: clang-cl-no-vcruntime, mingw: false, cc: clang-cl, cxx: clang-cl } - - { config: clang-cl-debug, mingw: false, cc: clang-cl, cxx: clang-cl } - - { config: clang-cl-static-crt, mingw: false, cc: clang-cl, cxx: clang-cl } - - { config: mingw-dll, mingw: true, cc: cc, cxx: c++ } - - { config: mingw-dll, mingw: true, cc: i686-w64-mingw32-clang, cxx: i686-w64-mingw32-clang++ } - - { config: mingw-static, mingw: true, cc: cc, cxx: c++ } - - { config: mingw-incomplete-sysroot, mingw: true, cc: cc, cxx: c++ } - - { config: mingw-static, mingw: true, cc: cc, cxx: c++, runner: windows-11-arm } - runs-on: ${{ matrix.runner != '' && matrix.runner || 'windows-2022' }} - steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - - name: Install dependencies - run: | - pip install psutil - - name: Install a current LLVM - if: ${{ matrix.mingw != true }} - run: | - choco install -y llvm --version=20.1.8 --allow-downgrade - - name: Install llvm-mingw - if: ${{ matrix.mingw == true }} - run: | - curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20250709/llvm-mingw-20250709-ucrt-${{ matrix.runner == 'windows-11-arm' && 'aarch64' || 'x86_64' }}.zip - powershell Expand-Archive llvm-mingw*.zip -DestinationPath . - del llvm-mingw*.zip - mv llvm-mingw* c:\llvm-mingw - echo "c:\llvm-mingw\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append - - name: Simulate a from-scratch build of llvm-mingw - if: ${{ matrix.config == 'mingw-incomplete-sysroot' }} - run: | - rm -r c:\llvm-mingw\include\c++ - rm -r c:\llvm-mingw\*-w64-mingw32\lib\libc++* - rm -r c:\llvm-mingw\*-w64-mingw32\lib\libunwind* - - name: Add Git Bash to the path - run: | - echo "c:\Program Files\Git\usr\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append - - name: Set up the MSVC dev environment - if: ${{ matrix.mingw != true }} - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 - - name: Add the installed Clang at the start of the path - if: ${{ matrix.mingw != true }} - run: | - echo "c:\Program Files\LLVM\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append - - name: Build and test - run: bash libcxx/utils/ci/run-buildbot ${{ matrix.config }} - env: - CC: ${{ matrix.cc }} - CXX: ${{ matrix.cxx }} diff --git a/.github/workflows/libcxx-build-containers.yml b/.github/workflows/libcxx-build-containers.yml deleted file mode 100644 index a49ad812606e8..0000000000000 --- a/.github/workflows/libcxx-build-containers.yml +++ /dev/null @@ -1,84 +0,0 @@ -# This file defines an action that builds the various Docker images used to run -# libc++ CI whenever modifications to those Docker files are pushed to `main`. -# -# The images are pushed to the LLVM package registry at https://github.com/orgs/llvm/packages -# and tagged appropriately. The selection of which Docker image version is used by the libc++ -# CI nodes at any given point is controlled from the workflow files themselves. - -name: Build Docker images for libc++ CI - -permissions: - contents: read - -on: - push: - branches: - - main - paths: - - 'libcxx/utils/ci/docker/**' - - '.github/workflows/libcxx-build-containers.yml' - pull_request: - paths: - - 'libcxx/utils/ci/docker/**' - - '.github/workflows/libcxx-build-containers.yml' - -jobs: - build-and-push: - runs-on: ubuntu-24.04 - if: github.repository_owner == 'llvm' - permissions: - packages: write - - steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - - # The default Docker storage location for GitHub Actions doesn't have - # enough disk space, so change it to /mnt, which has more disk space. - - name: Change Docker storage location - run: | - sudo mkdir /mnt/docker - echo '{ "data-root": "/mnt/docker" }' | sudo tee /etc/docker/daemon.json - sudo systemctl restart docker - - - name: Build the base image - run: docker compose --file libcxx/utils/ci/docker/docker-compose.yml build libcxx-linux-builder-base - env: - TAG: ${{ github.sha }} - - - name: Build the Linux Github Actions image - run: docker compose --file libcxx/utils/ci/docker/docker-compose.yml build libcxx-linux-builder - env: - TAG: ${{ github.sha }} - - - name: Build the Android builder image - run: docker compose --file libcxx/utils/ci/docker/docker-compose.yml build libcxx-android-builder - env: - TAG: ${{ github.sha }} - - - name: Log in to GitHub Container Registry - uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Push the images - if: github.event_name == 'push' - run: docker compose --file libcxx/utils/ci/docker/docker-compose.yml push libcxx-linux-builder-base libcxx-linux-builder libcxx-android-builder - env: - TAG: ${{ github.sha }} - - # We create tarballs with the images and upload them as artifacts, since that's useful for testing - # the images when making changes. - - name: Create image tarballs - run: | - docker image save ghcr.io/llvm/libcxx-linux-builder-base:${{ github.sha }} | gzip > libcxx-linux-builder-base.tar.gz - docker image save ghcr.io/llvm/libcxx-linux-builder:${{ github.sha }} | gzip > libcxx-linux-builder.tar.gz - docker image save ghcr.io/llvm/libcxx-android-builder:${{ github.sha }} | gzip > libcxx-android-builder.tar.gz - - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 - with: - name: libcxx-docker-images - path: | - libcxx-linux-builder-base.tar.gz - libcxx-linux-builder.tar.gz - libcxx-android-builder.tar.gz diff --git a/.github/workflows/libcxx-check-generated-files.yml b/.github/workflows/libcxx-check-generated-files.yml deleted file mode 100644 index ae1f680d95235..0000000000000 --- a/.github/workflows/libcxx-check-generated-files.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: "Check libc++ generated files" -on: - pull_request: - paths: - - 'libcxx/**' - -permissions: - contents: read - -jobs: - check_generated_files: - runs-on: ubuntu-24.04 - steps: - - name: Fetch LLVM sources - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - - - name: Install dependencies - uses: aminya/setup-cpp@9bc9b8cd8a8d678f920e4e1e73f29da8010ced51 # v1.7.2 - with: - clangformat: 17.0.1 - ninja: true - - - name: Check generated files - run: libcxx/utils/ci/run-buildbot check-generated-output - env: - CC: cc - CXX: c++ diff --git a/.github/workflows/libcxx-run-benchmarks.yml b/.github/workflows/libcxx-run-benchmarks.yml deleted file mode 100644 index 9f4cd257704e4..0000000000000 --- a/.github/workflows/libcxx-run-benchmarks.yml +++ /dev/null @@ -1,116 +0,0 @@ -# This file defines a workflow that runs the libc++ benchmarks when a comment is added to the PR. -# -# The comment is of the form: -# -# /libcxx-bot benchmark -# -# That will cause the specified benchmarks to be run on the PR and on the pull-request target, and -# their results to be compared. - -name: Benchmark libc++ - -permissions: - contents: read - -on: - issue_comment: - types: - - created - - edited - -env: - CC: clang-22 - CXX: clang++-22 - -jobs: - run-benchmarks: - permissions: - pull-requests: write - - if: >- - github.event.issue.pull_request && - contains(github.event.comment.body, '/libcxx-bot benchmark') - - runs-on: llvm-premerge-libcxx-next-runners # TODO: This should run on a dedicated set of machines - steps: - - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 - with: - python-version: '3.14' - - - name: Extract information from the PR - id: vars - env: - COMMENT_BODY: ${{ github.event.comment.body }} - run: | - python3 -m venv .venv - source .venv/bin/activate - python -m pip install pygithub - - cat <> ${GITHUB_OUTPUT} - import github - repo = github.Github("${{ github.token }}").get_repo("${{ github.repository }}") - pr = repo.get_pull(${{ github.event.issue.number }}) - print(f"pr_base={pr.base.sha}") - print(f"pr_head={pr.head.sha}") - EOF - BENCHMARKS=$(echo "$COMMENT_BODY" | sed -nE 's/\/libcxx-bot benchmark (.+)/\1/p') - echo "benchmarks=${BENCHMARKS}" >> ${GITHUB_OUTPUT} - - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - ref: ${{ steps.vars.outputs.pr_head }} - fetch-depth: 0 - fetch-tags: true # This job requires access to all the Git branches so it can diff against (usually) main - path: repo # Avoid nuking the workspace, where we have the Python virtualenv - - - name: Run baseline - env: - BENCHMARKS: ${{ steps.vars.outputs.benchmarks }} - run: | - source .venv/bin/activate && cd repo - python -m pip install -r libcxx/utils/requirements.txt - baseline_commit=$(git merge-base ${{ steps.vars.outputs.pr_base }} ${{ steps.vars.outputs.pr_head }}) - ./libcxx/utils/test-at-commit --commit ${baseline_commit} -B build/baseline -- -sv -j1 --param optimization=speed "$BENCHMARKS" - ./libcxx/utils/consolidate-benchmarks build/baseline | tee baseline.lnt - - - name: Run candidate - env: - BENCHMARKS: ${{ steps.vars.outputs.benchmarks }} - run: | - source .venv/bin/activate && cd repo - ./libcxx/utils/test-at-commit --commit ${{ steps.vars.outputs.pr_head }} -B build/candidate -- -sv -j1 --param optimization=speed "$BENCHMARKS" - ./libcxx/utils/consolidate-benchmarks build/candidate | tee candidate.lnt - - - name: Compare baseline and candidate runs - run: | - source .venv/bin/activate && cd repo - ./libcxx/utils/compare-benchmarks baseline.lnt candidate.lnt | tee results.txt - - - name: Update comment with results - run: | - source .venv/bin/activate && cd repo - cat < - - Benchmark results: - - - \`\`\` - {benchmark_results} - \`\`\` - - - """ - - comment.edit(new_comment_text) - EOF diff --git a/.github/workflows/linux-precommit.yml b/.github/workflows/linux-precommit.yml new file mode 100644 index 0000000000000..ad50dcebc42ce --- /dev/null +++ b/.github/workflows/linux-precommit.yml @@ -0,0 +1,97 @@ +name: "Linux precommit" + +permissions: + contents: read + +on: + push: + branches: + - npu/main + - npu/release/** + pull_request: + branches: + - npu/main + - npu/release/** + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} + + +jobs: + Build: + name: Build and Test + runs-on: ubuntu-latest + defaults: + run: + shell: bash + env: + CMAKE_BUILD_TYPE: 'Release' + LLVM_ENABLE_ASSERTIONS: 'ON' + NPU_COMPILER_LLVM_PROJECT: llvm + NPU_COMPILER_LLVM_PROJECT_BUILD_DIR: llvm/build + NPU_COMPILER_LLVM_PROJECT_INSTALL_DIR: llvm/install + steps: + - name: Clone NPU Compiler LLVM sources + uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + with: + submodules: 'true' + - name: Print system info + run: | + # Install pre-requisites for Fedora + if [[ -e /etc/fedora-release ]]; then + yum update -y -q && yum install -y -q procps + fi + echo "System: ${{ runner.os }}" + echo "System Architecture: ${{ runner.arch }}" + echo "CPU Info: "; lscpu + echo "RAM Info: "; free -h --si + echo "MEMORY Info: "; df -h + + - name: Configure CMake + run: | + cmake \ + -B ${NPU_COMPILER_LLVM_PROJECT_BUILD_DIR} \ + -S ${NPU_COMPILER_LLVM_PROJECT} \ + -DCMAKE_INSTALL_PREFIX=${NPU_COMPILER_LLVM_PROJECT_INSTALL_DIR} \ + -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \ + -DLLVM_ENABLE_WARNINGS=OFF \ + -DLLVM_ENABLE_BINDINGS=OFF \ + -DLLVM_ENABLE_RTTI=ON \ + -DLLVM_ENABLE_EH=ON \ + -DLLVM_ENABLE_BACKTRACES=ON \ + -DLLVM_ENABLE_CRASH_OVERRIDES=ON \ + -DLLVM_ENABLE_PROJECTS="mlir" \ + -DLLVM_ENABLE_ASSERTIONS=${LLVM_ENABLE_ASSERTIONS} \ + -DLLVM_INCLUDE_TESTS=ON \ + -DLLVM_INCLUDE_BENCHMARKS=OFF \ + -DLLVM_TARGETS_TO_BUILD="host" \ + -DLLVM_ENABLE_TERMINFO=OFF \ + -DLLVM_BUILD_EXAMPLES=OFF \ + -DLLVM_INCLUDE_EXAMPLES=OFF \ + -DLLVM_BUILD_TOOLS=OFF \ + -DLLVM_BUILD_UTILS=ON \ + -DLLVM_INSTALL_UTILS=ON \ + + - name: Build + run: | + cmake \ + --build ${NPU_COMPILER_LLVM_PROJECT_BUILD_DIR} \ + --config ${CMAKE_BUILD_TYPE} \ + --parallel $(nproc) + + - name: Test LLVM + run: | + cmake \ + --build ${NPU_COMPILER_LLVM_PROJECT_BUILD_DIR} \ + --config ${CMAKE_BUILD_TYPE} \ + --parallel $(nproc) \ + --target check-llvm + + - name: Test MLIR + run: | + cmake \ + --build ${NPU_COMPILER_LLVM_PROJECT_BUILD_DIR} \ + --config ${CMAKE_BUILD_TYPE} \ + --parallel $(nproc) \ + --target check-mlir \ No newline at end of file diff --git a/.github/workflows/llvm-abi-tests.yml b/.github/workflows/llvm-abi-tests.yml deleted file mode 100644 index 58eb6fa518989..0000000000000 --- a/.github/workflows/llvm-abi-tests.yml +++ /dev/null @@ -1,172 +0,0 @@ -name: LLVM ABI Tests - -permissions: - contents: read - -on: - workflow_dispatch: - push: - branches: - - 'release/**' - paths: - - 'llvm/**' - - '.github/workflows/llvm-abi-tests.yml' - pull_request: - branches: - - 'release/**' - paths: - - 'llvm/**' - - '.github/workflows/llvm-abi-tests.yml' - -concurrency: - # Skip intermediate builds: always. - # Cancel intermediate builds: only if it is a pull request build. - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} - -jobs: - abi-dump-setup: - if: github.repository_owner == 'llvm' - runs-on: ubuntu-24.04 - outputs: - BASELINE_REF: ${{ steps.vars.outputs.BASELINE_REF }} - ABI_HEADERS: ${{ steps.vars.outputs.ABI_HEADERS }} - BASELINE_VERSION_MAJOR: ${{ steps.vars.outputs.BASELINE_VERSION_MAJOR }} - BASELINE_VERSION_MINOR: ${{ steps.vars.outputs.BASELINE_VERSION_MINOR }} - LLVM_VERSION_MAJOR: ${{ steps.version.outputs.major }} - LLVM_VERSION_MINOR: ${{ steps.version.outputs.minor }} - LLVM_VERSION_PATCH: ${{ steps.version.outputs.patch }} - steps: - - name: Checkout source - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - fetch-depth: 250 - - - name: Get LLVM version - id: version - uses: ./.github/workflows/get-llvm-version - - - name: Setup Variables - id: vars - run: | - # C++ ABI: - # 18.1.0 we aren't doing ABI checks. - # 18.1.1 We want to check 18.1.0. - # C ABI: - # 18.1.0 We want to check 17.0.x - # 18.1.1 We want to check 18.1.0 - echo "BASELINE_VERSION_MINOR=1" >> "$GITHUB_OUTPUT" - if [ ${{ steps.version.outputs.patch }} -eq 0 ]; then - { - echo "BASELINE_VERSION_MAJOR=$(( ${{ steps.version.outputs.major }} - 1))" - echo "ABI_HEADERS=llvm-c" - } >> "$GITHUB_OUTPUT" - else - { - echo "BASELINE_VERSION_MAJOR=${{ steps.version.outputs.major }}" - echo "ABI_HEADERS=." - } >> "$GITHUB_OUTPUT" - fi - - abi-dump: - if: github.repository_owner == 'llvm' - needs: abi-dump-setup - runs-on: ubuntu-24.04 - container: - image: "ghcr.io/llvm/ci-ubuntu-24.04-abi-tests@sha256:9138b6aea737d935e92ad2afdf5d49325880f9b187b5b979b135ac80cd456135" #ghcr.io/llvm/ci-ubuntu-24.04-abi-tests:bb0bd382ab2b" - strategy: - matrix: - name: - - build-baseline - - build-latest - include: - - name: build-baseline - llvm_version_major: ${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MAJOR }} - ref: llvmorg-${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MAJOR }}.${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MINOR }}.0 - repo: llvm/llvm-project - - name: build-latest - llvm_version_major: ${{ needs.abi-dump-setup.outputs.LLVM_VERSION_MAJOR }} - ref: ${{ github.sha }} - repo: ${{ github.repository }} - steps: - - name: Download source code - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - ref: ${{ matrix.ref }} - repository: ${{ matrix.repo }} - - name: Configure - run: | - mkdir install - cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD="" -DLLVM_BUILD_LLVM_DYLIB=ON -DCMAKE_C_FLAGS_DEBUG="-g1 -Og" -DCMAKE_CXX_FLAGS_DEBUG="-g1 -Og" -DCMAKE_INSTALL_PREFIX="$(pwd)"/install llvm - - name: Build - # Need to run install-LLVM twice to ensure the symlink is installed (this is a bug). - run: | - ninja -C build install-LLVM - ninja -C build install-LLVM - ninja -C build install-llvm-headers - - name: Dump ABI - run: | - if [ "${{ needs.abi-dump-setup.outputs.ABI_HEADERS }}" = "llvm-c" ]; then - nm ./install/lib/libLLVM.so | awk "/T _LLVM/ || /T LLVM/ { print $3 }" | sort -u | sed -e "s/^_//g" | cut -d ' ' -f 3 > llvm.symbols - # Even though the -symbols-list option doesn't seem to filter out the symbols, I believe it speeds up processing, so I'm leaving it in. - export EXTRA_ARGS="-symbols-list llvm.symbols" - else - touch llvm.symbols - fi - abi-dumper $EXTRA_ARGS -lver ${{ matrix.ref }} -skip-cxx -public-headers ./install/include/${{ needs.abi-dump-setup.outputs.ABI_HEADERS }} -o ${{ matrix.ref }}.abi ./install/lib/libLLVM.so - # Remove symbol versioning from dumps, so we can compare across major versions. - sed -i 's/LLVM_${{ matrix.llvm_version_major }}/LLVM_NOVERSION/' ${{ matrix.ref }}.abi - - name: Upload ABI file - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # 5.0.0 - with: - name: ${{ matrix.name }} - path: ${{ matrix.ref }}.abi - - - name: Upload symbol list file - if: matrix.name == 'build-baseline' - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # 5.0.0 - with: - name: symbol-list - path: llvm.symbols - - abi-compare: - if: github.repository_owner == 'llvm' - runs-on: ubuntu-24.04 - container: - image: "ghcr.io/llvm/ci-ubuntu-24.04-abi-tests@sha256:9138b6aea737d935e92ad2afdf5d49325880f9b187b5b979b135ac80cd456135" #ghcr.io/llvm/ci-ubuntu-24.04-abi-tests:bb0bd382ab2b - needs: - - abi-dump-setup - - abi-dump - steps: - - name: Download baseline - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 - with: - name: build-baseline - path: build-baseline - - name: Download latest - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 - with: - name: build-latest - path: build-latest - - name: Download symbol list - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 - with: - name: symbol-list - path: symbol-list - - - name: Compare ABI - run: | - if [ -s symbol-list/llvm.symbols ]; then - # This option doesn't seem to work with the ABI dumper, so passing it here. - export EXTRA_ARGS="-symbols-list symbol-list/llvm.symbols" - fi - # FIXME: Reading of gzip'd abi files on the GitHub runners stop - # working some time in March of 2021, likely due to a change in the - # runner's environment. - abi-compliance-checker $EXTRA_ARGS -l libLLVM.so -old build-baseline/*.abi -new build-latest/*.abi || test "${{ needs.abi-dump-setup.outputs.ABI_HEADERS }}" = "llvm-c" - - name: Upload ABI Comparison - if: always() - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # 5.0.0 - with: - name: compat-report-${{ github.sha }} - path: compat_reports/ diff --git a/.github/workflows/llvm-bugs.yml b/.github/workflows/llvm-bugs.yml deleted file mode 100644 index 96fc553abfe35..0000000000000 --- a/.github/workflows/llvm-bugs.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: LLVM Bugs notifier - -permissions: - contents: read - issues: read - -on: - issues: - types: - - opened - -jobs: - auto-subscribe: - runs-on: ubuntu-24.04 - if: github.repository == 'llvm/llvm-project' - steps: - - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 - with: - node-version: 24 - check-latest: true - - run: npm install mailgun.js form-data - - name: Send notification - uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 - env: - MAILGUN_API_KEY: ${{ secrets.LLVM_BUGS_KEY }} - with: - script: | - const Mailgun = require('mailgun.js'); - const formData = require('form-data'); - - const mailgun = new Mailgun(formData); - const DOMAIN = 'email.llvm.org'; - - const mg = mailgun.client({ username: 'api', key: process.env.MAILGUN_API_KEY }); - - github.rest.issues.get({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo - }) - .then((issue) => { - var maybeTruncatedBody = issue.data.body; - if (maybeTruncatedBody.length > 15000) { - maybeTruncatedBody = maybeTruncatedBody.substring(0, - 15000) + - "Please see the issue for the entire body." - } - const payload = { - author : issue.data.user.login, - issue : issue.data.number, - title : issue.data.title, - url : issue.data.html_url, - labels : issue.data.labels.map((label) => label.name), - assignee : issue.data.assignees.map((assignee) => assignee.login), - body : maybeTruncatedBody - }; - - const data = { - from: 'LLVM Bugs ', - to: 'llvm-bugs@lists.llvm.org', - subject: `[Bug ${issue.data.number}] ${issue.data.title}`, - template: 'new-github-issue', - 'o:tracking-clicks': 'no', - 'h:X-Mailgun-Variables': JSON.stringify(payload) - }; - - return mg.messages.create(DOMAIN, data); - }) - .then((msg) => console.log(msg)); diff --git a/.github/workflows/merged-prs.yml b/.github/workflows/merged-prs.yml deleted file mode 100644 index 22786dc10b1ea..0000000000000 --- a/.github/workflows/merged-prs.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: "Add buildbot information to first PRs from new contributors" - -permissions: - contents: read - -on: - # It's safe to use pull_request_target here, because we aren't checking out - # code from the pull request branch. - # See https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ - pull_request_target: - types: - - closed - -jobs: - buildbot_comment: - runs-on: ubuntu-24.04 - permissions: - pull-requests: write - if: >- - (github.repository == 'llvm/llvm-project') && - (github.event.pull_request.merged == true) - steps: - - name: Checkout Automation Script - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - sparse-checkout: llvm/utils/git/ - ref: main - - - name: Setup Automation Script - working-directory: ./llvm/utils/git/ - run: | - pip install --require-hashes -r requirements.txt - - - name: Add Buildbot information comment - working-directory: ./llvm/utils/git/ - run: | - python3 ./github-automation.py \ - --token '${{ secrets.GITHUB_TOKEN }}' \ - pr-buildbot-information \ - --issue-number "${{ github.event.pull_request.number }}" \ - --author "${{ github.event.pull_request.user.login }}" diff --git a/.github/workflows/mlir-spirv-tests.yml b/.github/workflows/mlir-spirv-tests.yml deleted file mode 100644 index ee565aaf5c5a2..0000000000000 --- a/.github/workflows/mlir-spirv-tests.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: MLIR SPIR-V Tests - -permissions: - contents: read - -on: - workflow_dispatch: - pull_request: - paths: - - 'mlir/include/mlir/Dialect/SPIRV/**' - - 'mlir/lib/Dialect/SPIRV/**' - - 'mlir/include/mlir/Target/SPIRV/**' - - 'mlir/lib/Target/SPIRV/**' - - 'mlir/test/Target/SPIRV/**' - - '.github/workflows/mlir-spirv-tests.yml' - -concurrency: - # Skip intermediate builds: always. - # Cancel intermediate builds: only if it is a pull request build. - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} - -jobs: - check_spirv: - if: github.repository_owner == 'llvm' - name: Test MLIR SPIR-V - runs-on: ubuntu-24.04 - container: - image: ghcr.io/llvm/ci-ubuntu-24.04:latest - steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - - name: Setup ccache - uses: hendrikmuhs/ccache-action@5ebbd400eff9e74630f759d94ddd7b6c26299639 # v1.2.20 - with: - max-size: 2G - key: spirv-mlir-ubuntu-24.04 - variant: sccache - - name: Build and Test - run: | - mkdir build - cmake -GNinja \ - -S llvm \ - -B build \ - -DCMAKE_BUILD_TYPE=Release \ - -DLLVM_ENABLE_ASSERTIONS=ON \ - -DCMAKE_C_COMPILER_LAUNCHER=sccache \ - -DCMAKE_CXX_COMPILER_LAUNCHER=sccache \ - -DLLVM_TARGETS_TO_BUILD="host" \ - -DLLVM_INCLUDE_SPIRV_TOOLS_TESTS=ON \ - -DLLVM_ENABLE_PROJECTS=mlir - ninja -C build check-mlir diff --git a/.github/workflows/new-issues.yml b/.github/workflows/new-issues.yml deleted file mode 100644 index cbcf042ac53c1..0000000000000 --- a/.github/workflows/new-issues.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Labeling new issues -on: - issues: - types: ['opened'] - -permissions: - contents: read - -jobs: - automate-issues-labels: - permissions: - issues: write - runs-on: ubuntu-24.04 - if: github.repository == 'llvm/llvm-project' - steps: - - uses: llvm/actions/issue-labeler@5dd955034a6742a2e21d82bf165fcb1050ae7b49 # main - with: - repo-token: ${{ secrets.ISSUE_SUBSCRIBER_TOKEN }} - configuration-path: .github/new-issues-labeler.yml - include-title: 1 - include-body: 0 - sync-labels: 0 - enable-versioned-regex: 0 diff --git a/.github/workflows/new-prs.yml b/.github/workflows/new-prs.yml deleted file mode 100644 index 01032230c3883..0000000000000 --- a/.github/workflows/new-prs.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: "Labelling new pull requests" - -permissions: - contents: read - -on: - # It's safe to use pull_request_target here, because we aren't checking out - # code from the pull request branch. - # See https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ - pull_request_target: - types: - - opened - - reopened - - ready_for_review - - synchronize - -jobs: - greeter: - runs-on: ubuntu-24.04 - permissions: - pull-requests: write - # Only comment on PRs that have been opened for the first time, by someone - # new to LLVM or to GitHub as a whole. Ideally we'd look for FIRST_TIMER - # or FIRST_TIME_CONTRIBUTOR, but this does not appear to work. Instead check - # that we do not have any of the other author associations. - # See https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=opened#pull_request - # for all the possible values. - if: >- - (github.event.action == 'opened') && - (github.event.pull_request.author_association != 'COLLABORATOR') && - (github.event.pull_request.author_association != 'CONTRIBUTOR') && - (github.event.pull_request.author_association != 'MANNEQUIN') && - (github.event.pull_request.author_association != 'MEMBER') && - (github.event.pull_request.author_association != 'OWNER') - steps: - - name: Checkout Automation Script - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - sparse-checkout: llvm/utils/git/ - ref: main - - - name: Setup Automation Script - working-directory: ./llvm/utils/git/ - run: | - pip install --require-hashes -r requirements.txt - - - name: Greet Author - working-directory: ./llvm/utils/git/ - run: | - python3 ./github-automation.py \ - --token '${{ secrets.GITHUB_TOKEN }}' \ - pr-greeter \ - --issue-number "${{ github.event.pull_request.number }}" - - automate-prs-labels: - # Greet first so that only the author gets that notification. - needs: greeter - runs-on: ubuntu-24.04 - # Ignore PRs with more than 10 commits. Pull requests with a lot of - # commits tend to be accidents usually when someone made a mistake while trying - # to rebase. We want to ignore these pull requests to avoid excessive - # notifications. - # always() means that even if greeter is skipped, this job will run. - if: > - always() && github.repository == 'llvm/llvm-project' && - github.event.pull_request.draft == false && - github.event.pull_request.commits < 10 - steps: - - uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1 - with: - configuration-path: .github/new-prs-labeler.yml - repo-token: ${{ secrets.ISSUE_SUBSCRIBER_TOKEN }} diff --git a/.github/workflows/pr-code-format.yml b/.github/workflows/pr-code-format.yml index 441f94960bc0a..cb90f4bb78d23 100644 --- a/.github/workflows/pr-code-format.yml +++ b/.github/workflows/pr-code-format.yml @@ -6,19 +6,16 @@ permissions: on: pull_request: branches: - - main - - 'users/**' + - npu/main + - npu/release/** jobs: code_formatter: - runs-on: ubuntu-24.04 - container: - image: 'ghcr.io/llvm/ci-ubuntu-24.04-format' + runs-on: ubuntu-latest timeout-minutes: 30 concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number }} cancel-in-progress: true - if: github.repository == 'llvm/llvm-project' steps: - name: Fetch LLVM sources uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 @@ -34,7 +31,7 @@ jobs: base_sha: 'HEAD~1' sha: 'HEAD' - - name: "Listed files" + - name: Listed files env: CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} run: | diff --git a/.github/workflows/pr-code-lint.yml b/.github/workflows/pr-code-lint.yml index ea4f8217cd003..8a8642cd4b11f 100644 --- a/.github/workflows/pr-code-lint.yml +++ b/.github/workflows/pr-code-lint.yml @@ -6,21 +6,15 @@ permissions: on: pull_request: branches: - - main - - 'users/**' - paths: - - 'clang-tools-extra/clang-tidy/**' - - '.github/workflows/pr-code-lint.yml' + - npu/main + - npu/release/** jobs: code_linter: - if: github.repository_owner == 'llvm' runs-on: ubuntu-24.04 defaults: run: shell: bash - container: - image: 'ghcr.io/llvm/ci-ubuntu-24.04-lint' timeout-minutes: 60 concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/pr-request-release-note.yml b/.github/workflows/pr-request-release-note.yml deleted file mode 100644 index ac80347d00ab4..0000000000000 --- a/.github/workflows/pr-request-release-note.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: PR Request Release Note - -permissions: - contents: read - -on: - pull_request: - types: - - closed - -jobs: - request-release-note: - if: >- - github.repository_owner == 'llvm' && - startsWith(github.ref, 'refs/heads/release') - - runs-on: ubuntu-24.04 - steps: - # We need to pull the script from the main branch, so that we ensure - # we get the latest version of this script. - - name: Checkout Scripts - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - sparse-checkout: | - llvm/utils/git/requirements.txt - llvm/utils/git/github-automation.py - sparse-checkout-cone-mode: false - - - name: Install Dependencies - run: | - pip install --require-hashes -r llvm/utils/git/requirements.txt - - - name: Request Release Note - env: - # We need to use an llvmbot token here, because we are mentioning a user. - GITHUB_TOKEN: ${{ github.token }} - run: | - python3 llvm/utils/git/github-automation.py \ - --repo "$GITHUB_REPOSITORY" \ - --token "$GITHUB_TOKEN" \ - request-release-note \ - --pr-number ${{ github.event.pull_request.number}} - - - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 - if: always() - with: - name: workflow-args - path: | - comments diff --git a/.github/workflows/pr-subscriber.yml b/.github/workflows/pr-subscriber.yml deleted file mode 100644 index eac93be196356..0000000000000 --- a/.github/workflows/pr-subscriber.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: PR Subscriber - -on: - pull_request_target: - types: - - labeled - -permissions: - contents: read - -jobs: - auto-subscribe: - runs-on: ubuntu-24.04 - if: github.repository == 'llvm/llvm-project' - steps: - - name: Checkout Automation Script - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - sparse-checkout: llvm/utils/git/ - ref: main - - - name: Setup Automation Script - working-directory: ./llvm/utils/git/ - run: | - pip install --require-hashes -r requirements.txt - - - name: Update watchers - working-directory: ./llvm/utils/git/ - run: | - python3 ./github-automation.py \ - --token '${{ secrets.ISSUE_SUBSCRIBER_TOKEN }}' \ - pr-subscriber \ - --issue-number "${{ github.event.number }}" \ - --label-name "${{ github.event.label.name }}" diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml deleted file mode 100644 index 10f7f6a827b30..0000000000000 --- a/.github/workflows/premerge.yaml +++ /dev/null @@ -1,236 +0,0 @@ -name: CI Checks - -permissions: - contents: read - -on: - pull_request: - types: - - opened - - synchronize - - reopened - # When a PR is closed, we still start this workflow, but then skip - # all the jobs, which makes it effectively a no-op. The reason to - # do this is that it allows us to take advantage of concurrency groups - # to cancel in progress CI jobs whenever the PR is closed. - - closed - push: - branches: - - 'release/**' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: true - -jobs: - premerge-checks-linux: - name: Build and Test Linux${{ (startsWith(matrix.runs-on, 'depot-ubuntu-24.04-arm') && ' AArch64') || '' }} - if: >- - github.repository_owner == 'llvm' && - (github.event_name != 'pull_request' || github.event.action != 'closed') - strategy: - fail-fast: false - matrix: - runs-on: - - depot-ubuntu-24.04-arm-16 - - llvm-premerge-linux-runners - runs-on: ${{ matrix.runs-on }} - container: - # The llvm-premerge agents are already containers and running the - # this same image, so we can't use a container for the github action - # job. The depot containers are running on VMs, so we can use a - # container. This helps ensure the build environment is as close - # as possible on both the depot runners and the llvm-premerge runners. - image: ${{ (startsWith(matrix.runs-on, 'depot-ubuntu-24.04-arm') && format('ghcr.io/{0}/arm64v8/ci-ubuntu-24.04',github.repository_owner) ) || null }} - # --privileged is needed to run the lldb tests that disable aslr. - # The SCCACHE environment variables are need to be copied from the host - # to the container to make sure it is configured correctly to use the - # depot cache. - options: >- - --privileged - --env SCCACHE_WEBDAV_ENDPOINT - --env SCCACHE_WEBDAV_TOKEN - defaults: - run: - # The run step defaults to using sh as the shell when running in a - # container, so make bash the default to ensure consistency between - # container and non-container jobs. - shell: bash - steps: - - name: Checkout LLVM - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - fetch-depth: 2 - - name: Build and Test - timeout-minutes: 120 - continue-on-error: ${{ runner.arch == 'ARM64' }} - env: - GITHUB_TOKEN: ${{ github.token }} - GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }} - run: | - git config --global --add safe.directory '*' - - source <(git diff --name-only HEAD~1...HEAD | python3 .ci/compute_projects.py) - - if [[ "${projects_to_build}" == "" ]]; then - echo "No projects to build" - exit 0 - fi - - echo "Building projects: ${projects_to_build}" - echo "Running project checks targets: ${project_check_targets}" - echo "Building runtimes: ${runtimes_to_build}" - echo "Running runtimes checks targets: ${runtimes_check_targets}" - echo "Running runtimes checks requiring reconfiguring targets: ${runtimes_check_targets_needs_reconfig}" - - export CC=/opt/llvm/bin/clang - export CXX=/opt/llvm/bin/clang++ - - # The linux-premerge runners are hosted on GCP and have a different - # cache setup than the depot runners. - if [[ "${{ matrix.runs-on }}" = "llvm-premerge-linux-runners" ]]; then - # This environment variable is passes into the container through the - # runner pod definition. This differs between our two clusters which - # why we do not hardcode it. - export SCCACHE_GCS_BUCKET=$CACHE_GCS_BUCKET - export SCCACHE_GCS_RW_MODE=READ_WRITE - fi - env - - # Set the idle timeout to zero to ensure sccache runs for the - # entire duration of the job. Otherwise it might stop if we run - # several test suites in a row and discard statistics that we want - # to save in the end. - export SCCACHE_IDLE_TIMEOUT=0 - mkdir artifacts - SCCACHE_LOG=info SCCACHE_ERROR_LOG=$(pwd)/artifacts/sccache.log sccache --start-server - - ./.ci/monolithic-linux.sh "${projects_to_build}" "${project_check_targets}" "${runtimes_to_build}" "${runtimes_check_targets}" "${runtimes_check_targets_needs_reconfig}" "${enable_cir}" - - name: Upload Artifacts - # In some cases, Github will fail to upload the artifact. We want to - # continue anyways as a failed artifact upload is an infra failure, not - # a checks failure. - # https://github.com/actions/upload-artifact/issues/569 - continue-on-error: true - if: '!cancelled()' - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 - with: - name: Premerge Artifacts (Linux ${{ runner.arch }}) - path: artifacts/ - retention-days: 5 - include-hidden-files: 'true' - - name: Upload Comment - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 - if: ${{ always() && !startsWith(matrix.runs-on, 'depot-ubuntu-24.04-arm') }} - continue-on-error: true - with: - name: workflow-args - path: | - comments - - premerge-checks-windows: - name: Build and Test Windows - if: >- - github.repository_owner == 'llvm' && - (github.event_name != 'pull_request' || github.event.action != 'closed') - runs-on: llvm-premerge-windows-2022-runners - defaults: - run: - shell: bash - steps: - - name: Checkout LLVM - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - fetch-depth: 2 - - name: Compute Projects - id: vars - run: | - source <(git diff --name-only HEAD~1...HEAD | python .ci/compute_projects.py) - - if [[ "${projects_to_build}" == "" ]]; then - echo "No projects to build" - fi - - echo "Building projects: ${projects_to_build}" - echo "Running project checks targets: ${project_check_targets}" - echo "Building runtimes: ${runtimes_to_build}" - echo "Running runtimes checks targets: ${runtimes_check_targets}" - - echo "windows-projects=${projects_to_build}" >> $GITHUB_OUTPUT - echo "windows-check-targets=${project_check_targets}" >> $GITHUB_OUTPUT - echo "windows-runtimes=${runtimes_to_build}" >> $GITHUB_OUTPUT - echo "windows-runtimes-check-targets=${runtimes_check_targets}" >> $GITHUB_OUTPUT - - name: Build and Test - timeout-minutes: 180 - if: ${{ steps.vars.outputs.windows-projects != '' }} - shell: cmd - env: - GITHUB_TOKEN: ${{ github.token }} - GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }} - run: | - call C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat -arch=amd64 -host_arch=amd64 - # See the comments above in the Linux job for why we define each of - # these environment variables. - bash -c "export SCCACHE_GCS_BUCKET=$CACHE_GCS_BUCKET; export SCCACHE_GCS_RW_MODE=READ_WRITE; export SCCACHE_IDLE_TIMEOUT=0; mkdir artifacts; SCCACHE_LOG=info SCCACHE_ERROR_LOG=$(pwd)/artifacts/sccache.log sccache --start-server; .ci/monolithic-windows.sh \"${{ steps.vars.outputs.windows-projects }}\" \"${{ steps.vars.outputs.windows-check-targets }}\" \"${{ steps.vars.outputs.windows-runtimes }}\" \"${{ steps.vars.outputs.windows-runtimes-check-targets }}\"" - - name: Upload Artifacts - # In some cases, Github will fail to upload the artifact. We want to - # continue anyways as a failed artifact upload is an infra failure, not - # a checks failure. - # https://github.com/actions/upload-artifact/issues/569 - continue-on-error: true - if: '!cancelled()' - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 - with: - name: Premerge Artifacts (Windows) - path: artifacts/ - retention-days: 5 - include-hidden-files: 'true' - - premerge-check-macos: - name: MacOS Premerge Checks - runs-on: macos-14 - if: >- - github.repository_owner == 'llvm' && - (startswith(github.ref_name, 'release/') || - startswith(github.base_ref, 'release/')) && - (github.event_name != 'pull_request' || github.event.action != 'closed') - steps: - - name: Checkout LLVM - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - fetch-depth: 2 - - name: Setup ccache - uses: hendrikmuhs/ccache-action@5ebbd400eff9e74630f759d94ddd7b6c26299639 # v1.2.20 - with: - max-size: "2000M" - - name: Install Ninja - run: | - brew install ninja - - name: Build and Test - run: | - source <(git diff --name-only HEAD~1...HEAD | python3 .ci/compute_projects.py) - - if [[ "${projects_to_build}" == "" ]]; then - echo "No projects to build" - exit 0 - fi - - echo "Building projects: ${projects_to_build}" - echo "Running project checks targets: ${project_check_targets}" - - # -DLLVM_DISABLE_ASSEMBLY_FILES=ON is for - # https://github.com/llvm/llvm-project/issues/81967 - # Disable sharding in lit so that the LIT_XFAIL environment var works. - cmake -G Ninja \ - -B build \ - -S llvm \ - -DLLVM_ENABLE_PROJECTS="${projects_to_build}" \ - -DLLVM_DISABLE_ASSEMBLY_FILES=ON \ - -DCMAKE_BUILD_TYPE=Release \ - -DLLDB_INCLUDE_TESTS=OFF \ - -DLLVM_ENABLE_ASSERTIONS=ON \ - -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache - - # The libcxx tests fail, so we are skipping the runtime targets. - ninja -C build ${project_check_targets} diff --git a/.github/workflows/release-asset-audit.py b/.github/workflows/release-asset-audit.py deleted file mode 100644 index 0cff6c695921f..0000000000000 --- a/.github/workflows/release-asset-audit.py +++ /dev/null @@ -1,104 +0,0 @@ -import github -import re -import sys - -_SPECIAL_CASE_BINARIES = { - "keith": {"clang+llvm-18.1.8-arm64-apple-macos11.tar.xz"}, -} - - -def _is_valid(uploader_name, valid_uploaders, asset_name): - if uploader_name in valid_uploaders: - return True - - if uploader_name in _SPECIAL_CASE_BINARIES: - return asset_name in _SPECIAL_CASE_BINARIES[uploader_name] - - return False - - -def _get_uploaders(release_version): - # Until llvm 18, assets were uploaded by community members, the release managers - # and the GitHub Actions bot. - if release_version <= 18: - return set( - [ - "DimitryAndric", - "stefanp-synopsys", - "lei137", - "omjavaid", - "nicolerabjohn", - "amy-kwan", - "mandlebug", - "zmodem", - "androm3da", - "tru", - "rovka", - "rorth", - "quinnlp", - "kamaub", - "abrisco", - "jakeegan", - "maryammo", - "tstellar", - "github-actions[bot]", - ] - ) - # llvm 19 and beyond, only the release managers, bot and a much smaller - # number of community members. - elif release_version >= 19: - return set( - [ - "zmodem", - "omjavaid", - "tru", - "tstellar", - "github-actions[bot]", - "c-rhodes", - "dyung", - ] - ) - - -def _get_major_release_version(release_title): - # All release titles are of the form "LLVM X.Y.Z(-rcN)". - match = re.match("LLVM ([0-9]+)\.", release_title) - if match is None: - _write_comment_and_exit_with_error( - f'Could not parse release version from release title "{release_title}".' - ) - else: - return int(match.groups()[0]) - - -def _write_comment_and_exit_with_error(comment): - with open("comment", "w") as file: - file.write(comment) - sys.exit(1) - - -def main(): - token = sys.argv[1] - - gh = github.Github(login_or_token=token) - repo = gh.get_repo("llvm/llvm-project") - - for release in repo.get_releases(): - print("Release:", release.title) - uploaders = _get_uploaders(_get_major_release_version(release.title)) - for asset in release.get_assets(): - created_at = asset.created_at - updated_at = ( - "" if asset.created_at == asset.updated_at else asset.updated_at - ) - print( - f"{asset.name} : {asset.uploader.login} [{created_at} {updated_at}] ( {asset.download_count} )" - ) - if not _is_valid(asset.uploader.login, uploaders, asset.name): - _write_comment_and_exit_with_error( - f"@{asset.uploader.login} is not a valid uploader." - ) - - -if __name__ == "__main__": - main() diff --git a/.github/workflows/release-asset-audit.yml b/.github/workflows/release-asset-audit.yml deleted file mode 100644 index 66ea3537a9162..0000000000000 --- a/.github/workflows/release-asset-audit.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: Release Asset Audit - -on: - workflow_dispatch: - release: - schedule: - # * is a special character in YAML so you have to quote this string - # Run once an hour - - cron: '5 * * * *' - - pull_request: - paths: - - ".github/workflows/release-asset-audit.py" - - ".github/workflows/release-asset-audit.yml" - -permissions: - contents: read # Default everything to read-only - -jobs: - audit: - name: "Release Asset Audit" - runs-on: ubuntu-24.04 - if: github.repository == 'llvm/llvm-project' - steps: - - name: Checkout LLVM - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - sparse-checkout: | - .github/workflows/release-asset-audit.py - llvm/utils/git/requirements.txt - - name: "Run Audit Script" - env: - GITHUB_TOKEN: ${{ github.token }} - run: | - pip install --require-hashes -r ./llvm/utils/git/requirements.txt - python3 ./.github/workflows/release-asset-audit.py $GITHUB_TOKEN - - name: "File Issue" - if: >- - github.event_name != 'pull_request' && - failure() - uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 - with: - github-token: ${{ secrets.ISSUE_SUBSCRIBER_TOKEN }} - script: | - var fs = require('fs'); - var body = '' - if (fs.existsSync('./comment')) { - body = fs.readFileSync('./comment') + "\n\n"; - } - body = body + `\n\nhttps://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}` - - const issue = await github.rest.issues.create({ - owner: context.repo.owner, - repo: context.repo.repo, - title: "Release Asset Audit Failed", - labels: ['infrastructure'], - body: body - }); - console.log(issue); diff --git a/.github/workflows/release-binaries-all.yml b/.github/workflows/release-binaries-all.yml deleted file mode 100644 index eef49b5e3625d..0000000000000 --- a/.github/workflows/release-binaries-all.yml +++ /dev/null @@ -1,104 +0,0 @@ -name: Release Binaries All - -permissions: - contents: read # Default everything to read-only - -on: - workflow_dispatch: - inputs: - release-version: - description: 'Release Version' - required: true - type: string - upload: - description: 'Upload binaries to the release page' - required: true - default: false - type: boolean - - workflow_call: - inputs: - release-version: - description: 'Release Version' - required: true - type: string - upload: - description: 'Upload binaries to the release page' - required: true - default: false - type: boolean - secrets: - RELEASE_TASKS_USER_TOKEN: - description: "Secret used to check user permissions." - required: false - - pull_request: - types: - - opened - - synchronize - - reopened - # When a PR is closed, we still start this workflow, but then skip - # all the jobs, which makes it effectively a no-op. The reason to - # do this is that it allows us to take advantage of concurrency groups - # to cancel in progress CI jobs whenever the PR is closed. - - closed - paths: - - '.github/workflows/release-binaries-all.yml' - - '.github/workflows/release-binaries.yml' - - '.github/workflows/release-binaries-setup-stage/*' - - '.github/workflows/release-binaries-save-stage/*' - - 'clang/cmake/caches/Release.cmake' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || 'dispatch' }} - cancel-in-progress: True - -jobs: - setup-variables: - if: >- - (github.event_name != 'pull_request' || github.event.action != 'closed') - runs-on: ubuntu-24.04 - outputs: - release-version: ${{ steps.vars.outputs.release-version }} - upload: ${{ steps.vars.outputs.upload }} - steps: - - shell: bash - id: vars - run: | - upload="${{ inputs.upload }}" - release_version="${{ inputs.release-version }}" - if [ "${{ github.event_name }}" = "pull_request" ]; then - upload="false" - release_version="" - fi - echo "release-version=$release_version" >> "$GITHUB_OUTPUT" - echo "upload=$upload" >> "$GITHUB_OUTPUT" - - release-binaries-all: - name: Build Release Binaries - needs: - - setup-variables - permissions: - contents: write # For release uploads - id-token: write # For artifact attestations - attestations: write # For artifact attestations - strategy: - fail-fast: false - matrix: - # We use ubuntu-22.04 rather than the latest version to make the built - # binaries more portable (eg functional aginast older glibc). - runs-on: - - ubuntu-22.04 - - ubuntu-22.04-arm - - macos-14 - - uses: ./.github/workflows/release-binaries.yml - with: - release-version: "${{ needs.setup-variables.outputs.release-version }}" - upload: ${{ needs.setup-variables.outputs.upload == 'true'}} - runs-on: "${{ matrix.runs-on }}" - secrets: - # This will be empty for pull_request events, but that's fine, because - # the release-binaries workflow does not use this secret for the - # pull_request event. - RELEASE_TASKS_USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }} diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml deleted file mode 100644 index a8bae830fc609..0000000000000 --- a/.github/workflows/release-binaries.yml +++ /dev/null @@ -1,289 +0,0 @@ -name: Release Binaries - -on: - workflow_dispatch: - inputs: - release-version: - description: 'Release Version' - required: false - type: string - upload: - description: 'Upload binaries to the release page' - required: true - default: false - type: boolean - runs-on: - description: "Runner to use for the build" - required: true - type: choice - # We use ubuntu-22.04 rather than the latest version to make the built - # binaries more portable (eg functional aginast older glibc). - options: - - ubuntu-22.04 - - ubuntu-22.04-arm - - macos-14 - - workflow_call: - inputs: - release-version: - description: 'Release Version' - required: false - type: string - upload: - description: 'Upload binaries to the release page' - required: true - default: false - type: boolean - runs-on: - description: "Runner to use for the build" - required: true - type: string - secrets: - RELEASE_TASKS_USER_TOKEN: - description: "Secret used to check user permissions." - required: false - - -permissions: - contents: read # Default everything to read-only - -jobs: - prepare: - name: Prepare to build binaries - runs-on: ${{ inputs.runs-on }} - if: github.repository_owner == 'llvm' - outputs: - release-version: ${{ steps.vars.outputs.release-version }} - ref: ${{ steps.vars.outputs.ref }} - upload: ${{ steps.vars.outputs.upload }} - target-cmake-flags: ${{ steps.vars.outputs.target-cmake-flags }} - build-flang: ${{ steps.vars.outputs.build-flang }} - release-binary-basename: ${{ steps.vars.outputs.release-binary-basename }} - release-binary-filename: ${{ steps.vars.outputs.release-binary-filename }} - build-runs-on: ${{ steps.vars.outputs.build-runs-on }} - test-runs-on: ${{ steps.vars.outputs.build-runs-on }} - - steps: - # It's good practice to use setup-python, but this is also required on macos-14 - # due to https://github.com/actions/runner-images/issues/10385 - - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 - with: - python-version: '3.14' - - - name: Checkout LLVM - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - - - name: Install Dependencies - shell: bash - run: | - pip install --require-hashes -r ./llvm/utils/git/requirements.txt - - - name: Check Permissions - if: github.event_name != 'pull_request' - env: - GITHUB_TOKEN: ${{ github.token }} - USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }} - shell: bash - run: | - ./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --user "$GITHUB_ACTOR" --user-token "$USER_TOKEN" check-permissions - - - name: Collect Variables - id: vars - shell: bash - # In order for the test-release.sh script to run correctly, the LLVM - # source needs to be at the following location relative to the build dir: - # | X.Y.Z-rcN | ./rcN/llvm-project - # | X.Y.Z | ./final/llvm-project - # - # We also need to set divergent flags based on the release version: - # | X.Y.Z-rcN | -rc N -test-asserts - # | X.Y.Z | -final - run: | - trimmed=$(echo ${{ inputs.release-version }} | xargs) - if [ -n "$trimmed" ]; then - release_version="$trimmed" - ref="llvmorg-$release_version" - else - release_version="${{ (github.event_name == 'pull_request' && format('PR{0}', github.event.pull_request.number)) || 'CI'}}-$GITHUB_SHA" - ref="$GITHUB_SHA" - fi - if [ -n "${{ inputs.upload }}" ]; then - upload="${{ inputs.upload }}" - else - upload="false" - fi - echo "release-version=$release_version">> $GITHUB_OUTPUT - echo "ref=$ref" >> $GITHUB_OUTPUT - echo "upload=$upload" >> $GITHUB_OUTPUT - - release_binary_basename="LLVM-$release_version-$RUNNER_OS-$RUNNER_ARCH" - echo "release-binary-basename=$release_binary_basename" >> $GITHUB_OUTPUT - echo "release-binary-filename=$release_binary_basename.tar.xz" >> $GITHUB_OUTPUT - - target="$RUNNER_OS-$RUNNER_ARCH" - - # The macOS builds try to cross compile some libraries so we need to - # add extra CMake args to disable them. - # See https://github.com/llvm/llvm-project/issues/99767 - if [ "$RUNNER_OS" = "macOS" ]; then - target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_BOOTSTRAP_COMPILER_RT_ENABLE_IOS=OFF" - if [ "$RUNNER_ARCH" = "ARM64" ]; then - arches=arm64 - fi - target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_BOOTSTRAP_DARWIN_osx_ARCHS=$arches -DBOOTSTRAP_BOOTSTRAP_DARWIN_osx_BUILTIN_ARCHS=$arches" - fi - - if [ "$RUNNER_OS" = "Windows" ]; then - # The build times out on Windows, so we need to disable LTO. - target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_LTO=OFF" - fi - - case "${{ inputs.runs-on }}" in - ubuntu-22.04*) - build_runs_on="depot-${{ inputs.runs-on }}-16" - test_runs_on=$build_runs_on - ;; - macos-14) - if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then - build_runs_on="${{ inputs.runs-on }}" - else - build_runs_on="depot-macos-14" - fi - test_runs_on="${{ inputs.runs-on }}" - ;; - *) - test_runs_on="${{ inputs.runs-on }}" - build_runs_on=$test_runs_on - ;; - esac - - case "$build_runs_on" in - # These runners cannot build the full release package faster than - # the 6 hours timeout limit, so we need to use a configuration - # that builds more quickly. - macos-14) - bootstrap_prefix="BOOTSTRAP" - target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_LTO=OFF -DLLVM_RELEASE_ENABLE_PGO=OFF" - ;; - *) - bootstrap_prefix="BOOTSTRAP_BOOTSTRAP" - ;; - esac - - target_cmake_flags="$target_cmake_flags -D${bootstrap_prefix}_CPACK_PACKAGE_FILE_NAME=$release_binary_basename" - - echo "target-cmake-flags=$target_cmake_flags" >> $GITHUB_OUTPUT - echo "build-runs-on=$build_runs_on" >> $GITHUB_OUTPUT - echo "test-runs-on=$test_runs_on" >> $GITHUB_OUTPUT - - build-release-package: - name: "Build Release Package" - needs: prepare - if: github.repository_owner == 'llvm' - runs-on: ${{ needs.prepare.outputs.build-runs-on }} - steps: - - - name: Checkout LLVM - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - ref: ${{ needs.prepare.outputs.ref }} - - - name: Set Build Prefix - id: setup-stage - shell: bash - run: | - build_prefix=`pwd` - if [ "${{ runner.os }}" = "Linux" ]; then - sudo chown $USER:$USER /mnt/ - build_prefix=/mnt/ - fi - echo "build-prefix=$build_prefix" >> $GITHUB_OUTPUT - - - name: Configure - id: build - shell: bash - run: | - # There were some issues on the ARM64 MacOS runners with trying to build x86 object, - # so we need to set some extra cmake flags to disable this. - cmake -G Ninja -S llvm -B ${{ steps.setup-stage.outputs.build-prefix }}/build \ - ${{ needs.prepare.outputs.target-cmake-flags }} \ - -C clang/cmake/caches/Release.cmake - - - name: Build - shell: bash - run: | - ninja -v -C ${{ steps.setup-stage.outputs.build-prefix }}/build stage2-package - release_dir=`find ${{ steps.setup-stage.outputs.build-prefix }}/build -iname 'stage2-bins'` - mv $release_dir/${{ needs.prepare.outputs.release-binary-filename }} . - - - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 - with: - name: ${{ runner.os }}-${{ runner.arch }}-release-binary - # Due to path differences on Windows when running in bash vs running on node, - # we need to search for files in the current workspace. - path: | - ${{ needs.prepare.outputs.release-binary-filename }} - - - name: Run Tests - # These almost always fail so don't let them fail the build and prevent the uploads. - continue-on-error: true - run: | - ninja -C ${{ steps.setup-stage.outputs.build-prefix }}/build stage2-check-all - - upload-release-binaries: - name: "Upload Release Binaries" - needs: - - prepare - - build-release-package - if: >- - github.event_name != 'pull_request' && - needs.prepare.outputs.upload == 'true' - runs-on: ubuntu-24.04 - permissions: - contents: write # For release uploads - id-token: write # For artifact attestations - attestations: write # For artifact attestations - - steps: - - name: Checkout Release Scripts - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - sparse-checkout: | - llvm/utils/release/github-upload-release.py - llvm/utils/git/requirements.txt - sparse-checkout-cone-mode: false - - - name: 'Download artifact' - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 - with: - pattern: '*-release-binary' - merge-multiple: true - - - name: Attest Build Provenance - id: provenance - uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0 - with: - subject-path: ${{ needs.prepare.outputs.release-binary-filename }} - - - name: Rename attestation file - run: - mv ${{ steps.provenance.outputs.bundle-path }} ${{ needs.prepare.outputs.release-binary-filename }}.jsonl - - - name: Upload Build Provenance - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 - with: - name: ${{ needs.prepare.outputs.release-binary-filename }}-attestation - path: ${{ needs.prepare.outputs.release-binary-filename }}.jsonl - - - name: Install Python Requirements - run: | - pip install --require-hashes -r ./llvm/utils/git/requirements.txt - - - name: Upload Release - shell: bash - run: | - ./llvm/utils/release/github-upload-release.py \ - --token ${{ github.token }} \ - --release ${{ needs.prepare.outputs.release-version }} \ - upload \ - --files ${{ needs.prepare.outputs.release-binary-filename }}* diff --git a/.github/workflows/release-documentation.yml b/.github/workflows/release-documentation.yml deleted file mode 100644 index 043a3f1ed9e08..0000000000000 --- a/.github/workflows/release-documentation.yml +++ /dev/null @@ -1,95 +0,0 @@ -name: Release Documentation - -permissions: - contents: read - -on: - workflow_dispatch: - inputs: - release-version: - description: 'Release Version' - required: true - type: string - upload: - description: 'Upload documentation' - required: false - type: boolean - - workflow_call: - inputs: - release-version: - description: 'Release Version' - required: true - type: string - upload: - description: 'Upload documentation' - required: false - type: boolean - secrets: - WWW_RELEASES_TOKEN: - description: "Secret used to create a PR with the documentation changes." - required: false - -jobs: - release-documentation: - name: Build and Upload Release Documentation - runs-on: ubuntu-24.04 - env: - upload: ${{ inputs.upload && !contains(inputs.release-version, 'rc') }} - steps: - - name: Checkout LLVM - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - - - name: Setup Python env - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 - with: - cache: 'pip' - cache-dependency-path: './llvm/docs/requirements.txt' - - - name: Install Dependencies - run: | - sudo apt-get update - sudo apt-get install -y \ - graphviz \ - python3-github \ - ninja-build \ - texlive-font-utils - pip3 install --user -r ./llvm/docs/requirements.txt - - - name: Build Documentation - env: - GITHUB_TOKEN: ${{ github.token }} - run: | - ./llvm/utils/release/build-docs.sh -release "${{ inputs.release-version }}" -no-doxygen - - - name: Create Release Notes Artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # 5.0.0 - with: - name: release-notes - path: docs-build/html-export/ - - - name: Clone www-releases - if: env.upload - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - repository: ${{ github.repository_owner }}/www-releases - ref: main - fetch-depth: 0 - path: www-releases - persist-credentials: false - - - name: Upload Release Notes - if: env.upload - env: - GH_TOKEN: ${{ secrets.WWW_RELEASES_TOKEN }} - run: | - mkdir -p www-releases/${{ inputs.release-version }} - mv ./docs-build/html-export/* www-releases/${{ inputs.release-version }} - cd www-releases - git checkout -b ${{ inputs.release-version }} - git add ${{ inputs.release-version }} - git config user.email "llvmbot@llvm.org" - git config user.name "llvmbot" - git commit -a -m "Add ${{ inputs.release-version }} documentation" - git push --force "https://$GH_TOKEN@github.com/llvmbot/www-releases.git" HEAD:refs/heads/${{ inputs.release-version }} - gh pr create -f -B main -H ${{ inputs.release-version }} -R llvmbot/www-releases diff --git a/.github/workflows/release-doxygen.yml b/.github/workflows/release-doxygen.yml deleted file mode 100644 index 4cf1b9b14ccd6..0000000000000 --- a/.github/workflows/release-doxygen.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: Release Doxygen - -permissions: - contents: read - -on: - workflow_dispatch: - inputs: - release-version: - description: 'Release Version' - required: true - type: string - upload: - description: 'Upload documentation' - required: false - type: boolean - - workflow_call: - inputs: - release-version: - description: 'Release Version' - required: true - type: string - upload: - description: 'Upload documentation' - required: false - type: boolean - secrets: - RELEASE_TASKS_USER_TOKEN: - description: "Secret used to check user permissions." - required: false - -jobs: - release-doxygen: - name: Build and Upload Release Doxygen - runs-on: ubuntu-24.04 - permissions: - contents: write - env: - upload: ${{ inputs.upload && !contains(inputs.release-version, 'rc') }} - steps: - - name: Checkout LLVM - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - - - name: Setup Python env - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 - with: - cache: 'pip' - cache-dependency-path: './llvm/docs/requirements.txt' - - - name: Install Dependencies - run: | - sudo apt-get update - sudo apt-get install -y \ - doxygen \ - graphviz \ - python3-github \ - ninja-build \ - texlive-font-utils - pip3 install --user -r ./llvm/docs/requirements.txt - - - name: Build Doxygen - run: | - ./llvm/utils/release/build-docs.sh -release "${{ inputs.release-version }}" -no-sphinx - - - name: Upload Doxygen - if: env.upload - env: - GITHUB_TOKEN: ${{ github.token }} - USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }} - run: | - ./llvm/utils/release/github-upload-release.py --token "$GITHUB_TOKEN" --release "${{ inputs.release-version }}" --user "${{ github.actor }}" --user-token "$USER_TOKEN" upload --files ./*doxygen*.tar.xz diff --git a/.github/workflows/release-lit.yml b/.github/workflows/release-lit.yml deleted file mode 100644 index e7a94572429d0..0000000000000 --- a/.github/workflows/release-lit.yml +++ /dev/null @@ -1,79 +0,0 @@ -name: Release Lit - -permissions: - contents: read - -on: - workflow_dispatch: - inputs: - release-version: - description: 'Release Version' - required: true - type: string - - workflow_call: - inputs: - release-version: - description: 'Release Version' - required: true - type: string - secrets: - RELEASE_TASKS_USER_TOKEN: - description: "Secret used to check user permissions." - required: false - -jobs: - release-lit: - name: Release Lit - runs-on: ubuntu-24.04 - steps: - - name: Checkout LLVM - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - ref: "llvmorg-${{ inputs.release-version }}" - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y python3-setuptools python3-psutil python3-github - - - name: Check Permissions - env: - GITHUB_TOKEN: ${{ github.token }} - USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }} - run: | - ./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --user ${{ github.actor }} --user-token "$USER_TOKEN" check-permissions - - - name: Setup Cpp - uses: aminya/setup-cpp@9bc9b8cd8a8d678f920e4e1e73f29da8010ced51 # v1.7.2 - with: - compiler: llvm-16.0.6 - cmake: true - ninja: true - - - name: Test lit - run: | - mkdir build && cd build - export FILECHECK_OPTS='-dump-input-filter=all -vv -color' - cmake ../llvm -DCMAKE_BUILD_TYPE=Release -G Ninja - ninja -v -j $(nproc) check-lit - - - name: Package lit - run: | - cd llvm/utils/lit - # Remove 'dev' suffix from lit version. - sed -i 's/ + "dev"//g' lit/__init__.py - python3 setup.py sdist bdist_wheel - - - name: Upload lit to test.pypi.org - uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0 - with: - password: ${{ secrets.LLVM_LIT_TEST_PYPI_API_TOKEN }} - repository-url: https://test.pypi.org/legacy/ - packages-dir: llvm/utils/lit/dist/ - - - name: Upload lit to pypi.org - uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0 - with: - password: ${{ secrets.LLVM_LIT_PYPI_API_TOKEN }} - packages-dir: llvm/utils/lit/dist/ diff --git a/.github/workflows/release-sources.yml b/.github/workflows/release-sources.yml deleted file mode 100644 index 9b21d2adfd27a..0000000000000 --- a/.github/workflows/release-sources.yml +++ /dev/null @@ -1,108 +0,0 @@ -name: Release Sources - -permissions: - contents: read - -on: - workflow_dispatch: - inputs: - release-version: - description: Release Version - required: true - type: string - workflow_call: - inputs: - release-version: - description: Release Version - required: true - type: string - secrets: - RELEASE_TASKS_USER_TOKEN: - description: "Secret used to check user permissions." - required: false - # Run on pull_requests for testing purposes. - pull_request: - paths: - - '.github/workflows/release-sources.yml' - types: - - opened - - synchronize - - reopened - # When a PR is closed, we still start this workflow, but then skip - # all the jobs, which makes it effectively a no-op. The reason to - # do this is that it allows us to take advantage of concurrency groups - # to cancel in progress CI jobs whenever the PR is closed. - - closed - -concurrency: - group: ${{ github.workflow }}-${{ inputs.release-version || github.event.pull_request.number }} - cancel-in-progress: True - -jobs: - inputs: - name: Collect Job Inputs - if: >- - github.repository_owner == 'llvm' && - github.event.action != 'closed' - outputs: - ref: ${{ steps.inputs.outputs.ref }} - export-args: ${{ steps.inputs.outputs.export-args }} - runs-on: ubuntu-24.04 - steps: - - id: inputs - run: | - ref=${{ (inputs.release-version && format('llvmorg-{0}', inputs.release-version)) || github.sha }} - if [ -n "${{ inputs.release-version }}" ]; then - export_args="-release ${{ inputs.release-version }} -final" - else - export_args="-git-ref ${{ github.sha }}" - fi - echo "ref=$ref" >> $GITHUB_OUTPUT - echo "export-args=$export_args" >> $GITHUB_OUTPUT - - release-sources: - name: Package Release Sources - if: github.repository_owner == 'llvm' - runs-on: ubuntu-24.04 - needs: - - inputs - permissions: - id-token: write - attestations: write - steps: - - name: Checkout LLVM - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - ref: ${{ needs.inputs.outputs.ref }} - fetch-tags: true - - name: Install Dependencies - run: | - pip install --require-hashes -r ./llvm/utils/git/requirements.txt - - - name: Check Permissions - if: github.event_name != 'pull_request' - env: - GITHUB_TOKEN: ${{ github.token }} - USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }} - run: | - ./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --user ${{ github.actor }} --user-token "$USER_TOKEN" check-permissions - - name: Create Tarballs - run: | - ./llvm/utils/release/export.sh ${{ needs.inputs.outputs.export-args }} - - name: Attest Build Provenance - if: github.event_name != 'pull_request' - id: provenance - uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0 - with: - subject-path: "*.xz" - - if: github.event_name != 'pull_request' - run: | - mv ${{ steps.provenance.outputs.bundle-path }} . - - name: Create Tarball Artifacts - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 - with: - path: | - *.xz - attestation.jsonl - - diff --git a/.github/workflows/release-tasks.yml b/.github/workflows/release-tasks.yml deleted file mode 100644 index 199017a4a7b27..0000000000000 --- a/.github/workflows/release-tasks.yml +++ /dev/null @@ -1,144 +0,0 @@ -name: Release Task - -permissions: - contents: read - -on: - push: - tags: - # The regex support here is limited, so just match everything that starts with llvmorg- and filter later. - - 'llvmorg-*' - -jobs: - validate-tag: - name: Validate Tag - runs-on: ubuntu-24.04 - if: github.repository == 'llvm/llvm-project' - outputs: - release-version: ${{ steps.validate-tag.outputs.release-version }} - steps: - - name: Validate Tag - id: validate-tag - run: | - echo "${{ github.ref_name }}" | grep -e '^llvmorg-[0-9]\+\.[0-9]\+\.[0-9]\+\(-rc[0-9]\+\)\?$' - release_version=$(echo "${{ github.ref_name }}" | sed 's/llvmorg-//g') - echo "release-version=$release_version" >> "$GITHUB_OUTPUT" - - release-create: - name: Create a New Release - runs-on: ubuntu-24.04 - permissions: - contents: write # For creating the release. - needs: validate-tag - - steps: - - name: Install Dependencies - run: | - sudo apt-get update - sudo apt-get install python3-github - - - name: Checkout LLVM - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - - - name: Create Release - env: - GITHUB_TOKEN: ${{ github.token }} - USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }} - run: | - ./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --release ${{ needs.validate-tag.outputs.release-version }} --user ${{ github.actor }} --user-token "$USER_TOKEN" create - release-documentation: - name: Build and Upload Release Documentation - needs: - - validate-tag - uses: ./.github/workflows/release-documentation.yml - with: - release-version: ${{ needs.validate-tag.outputs.release-version }} - upload: true - # Called workflows don't have access to secrets by default, so we need to explicitly pass secrets that we use. - secrets: - WWW_RELEASES_TOKEN: ${{ secrets.WWW_RELEASES_TOKEN }} - - release-doxygen: - name: Build and Upload Release Doxygen - permissions: - contents: write - needs: - - validate-tag - - release-create - uses: ./.github/workflows/release-doxygen.yml - with: - release-version: ${{ needs.validate-tag.outputs.release-version }} - upload: true - # Called workflows don't have access to secrets by default, so we need to explicitly pass secrets that we use. - secrets: - RELEASE_TASKS_USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }} - - release-lit: - name: Release Lit - needs: validate-tag - uses: ./.github/workflows/release-lit.yml - with: - release-version: ${{ needs.validate-tag.outputs.release-version }} - # Called workflows don't have access to secrets by default, so we need to explicitly pass secrets that we use. - secrets: - RELEASE_TASKS_USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }} - - release-binaries: - name: Build Release Binaries - permissions: - contents: write - id-token: write - attestations: write - needs: - - validate-tag - - release-create - uses: ./.github/workflows/release-binaries-all.yml - with: - release-version: ${{ needs.validate-tag.outputs.release-version }} - upload: true - # Called workflows don't have access to secrets by default, so we need to explicitly pass secrets that we use. - secrets: - RELEASE_TASKS_USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }} - - release-sources: - name: Package Release Sources - permissions: - contents: read - id-token: write - attestations: write - needs: - - validate-tag - uses: ./.github/workflows/release-sources.yml - with: - release-version: ${{ needs.validate-tag.outputs.release-version }} - # Called workflows don't have access to secrets by default, so we need to explicitly pass secrets that we use. - secrets: - RELEASE_TASKS_USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }} - - uncomment-download-links: - name: Uncomment download links - runs-on: ubuntu-24.04 - permissions: - contents: write # For updating the release message. - needs: - - validate-tag - - release-create - - release-binaries - - steps: - - name: Install Dependencies - run: | - sudo apt-get update - sudo apt-get install python3-github - - - name: Checkout LLVM - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - sparse-checkout: llvm/utils/release/github-upload-release.py - sparse-checkout-cone-mode: false - - - name: Uncomment Download Links - env: - GITHUB_TOKEN: ${{ github.token }} - run: | - ./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --release ${{ needs.validate-tag.outputs.release-version }} uncomment_download_links diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 95aa8b59413cc..b33ff8bb7bb2b 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -2,7 +2,7 @@ # by a third-party and are governed by separate terms of service, privacy # policy, and support documentation. -# Check current LLVM-Project results here: https://securityscorecards.dev/viewer/?uri=github.com/llvm/llvm-project +# Check current LLVM-Project results here: https://securityscorecards.dev/viewer/?uri=github.com/intel/npu-plugin-llvm name: Scorecard supply-chain security on: @@ -13,21 +13,21 @@ on: # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained schedule: - cron: '38 20 * * *' + workflow_dispatch: + push: + branches: + - npu/main # Declare default permissions as read only. -permissions: - contents: read +permissions: read-all jobs: analysis: name: Scorecard analysis - runs-on: ubuntu-24.04 - if: github.repository == 'llvm/llvm-project' + runs-on: ubuntu-latest permissions: - # Needed to upload the results to code-scanning dashboard. security-events: write - # Needed to publish results and get a badge (see publish_results below). - id-token: write + id-token: write steps: - name: "Checkout code" @@ -40,14 +40,8 @@ jobs: with: results_file: results.sarif results_format: sarif - - # - Publish results to OpenSSF REST API for easy access by consumers - # - Allows the repository to include the Scorecard badge. - # - See https://github.com/ossf/scorecard-action#publishing-results. publish_results: true - # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF - # format to the repository Actions tab. - name: "Upload artifact" uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: @@ -55,7 +49,6 @@ jobs: path: results.sarif retention-days: 5 - # Upload the results to GitHub's code scanning dashboard. - name: "Upload to code-scanning" uses: github/codeql-action/upload-sarif@fdbfb4d2750291e159f0156def62b853c2798ca2 # v4.31.5 with: diff --git a/.github/workflows/set-release-binary-outputs.sh b/.github/workflows/set-release-binary-outputs.sh deleted file mode 100644 index 14d0798364e91..0000000000000 --- a/.github/workflows/set-release-binary-outputs.sh +++ /dev/null @@ -1,34 +0,0 @@ -# Usage: set-release-binary-outputs.sh - -set -e - -if [ -z "$GITHUB_OUTPUT" ]; then - export GITHUB_OUTPUT=`mktemp` - echo "Warning: Environment variable GITHUB_OUTPUT is not set." - echo "Writing output variables to $GITHUB_OUTPUT" -fi - -tag=$1 -upload=$2 - -if echo $tag | grep -e '^[0-9a-f]\+$'; then - # This is a plain commit. - # TODO: Don't hardcode this. - release_version="18" - upload='false' - ref="$tag" - -else - - pattern='^llvmorg-[0-9]\+\.[0-9]\+\.[0-9]\+\(-rc[0-9]\+\)\?$' - echo "$tag" | grep -e $pattern - if [ $? != 0 ]; then - echo "ERROR: Tag '$tag' doesn't match pattern: $pattern" - exit 1 - fi - release_version=`echo "$tag" | sed 's/llvmorg-//g'` - release=`echo "$release_version" | sed 's/-.*//g'` -fi -echo "release-version=$release_version" >> $GITHUB_OUTPUT -echo "upload=$upload" >> $GITHUB_OUTPUT -echo "ref=$tag" >> $GITHUB_OUTPUT diff --git a/.github/workflows/spirv-tests.yml b/.github/workflows/spirv-tests.yml deleted file mode 100644 index c33c6b3e5650c..0000000000000 --- a/.github/workflows/spirv-tests.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: SPIR-V Tests - -permissions: - contents: read - -on: - pull_request: - paths: - - 'llvm/lib/Target/SPIRV/**' - - 'llvm/test/CodeGen/SPIRV/**' - - '.github/workflows/spirv-tests.yml' - -concurrency: - # Skip intermediate builds: always. - # Cancel intermediate builds: only if it is a pull request build. - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} - -jobs: - check_spirv: - if: github.repository_owner == 'llvm' - name: Test SPIR-V - runs-on: ubuntu-24.04 - container: - image: ghcr.io/llvm/ci-ubuntu-24.04:latest - steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - - name: Setup ccache - uses: hendrikmuhs/ccache-action@5ebbd400eff9e74630f759d94ddd7b6c26299639 # v1.2.20 - with: - max-size: 2G - key: spirv-ubuntu-24.04 - variant: sccache - - name: Build and Test - run: | - mkdir build - cmake -GNinja \ - -S llvm \ - -B build \ - -DCMAKE_BUILD_TYPE=Release \ - -DLLVM_ENABLE_ASSERTIONS=ON \ - -DCMAKE_C_COMPILER_LAUNCHER=sccache \ - -DCMAKE_CXX_COMPILER_LAUNCHER=sccache \ - -DLLVM_TARGETS_TO_BUILD="SPIRV" \ - -DLLVM_INCLUDE_SPIRV_TOOLS_TESTS=ON - ninja -C build check-llvm-codegen-spirv diff --git a/.github/workflows/sync-fork.yml b/.github/workflows/sync-fork.yml new file mode 100644 index 0000000000000..083a53d09836a --- /dev/null +++ b/.github/workflows/sync-fork.yml @@ -0,0 +1,29 @@ +name: Sync fork + +on: + schedule: + - cron: "0 2 * * *" + workflow_dispatch: + +defaults: + run: + shell: bash + +permissions: + contents: write + +jobs: + sync-branches: + runs-on: ubuntu-latest + strategy: + matrix: + branch: + - main + - release/20.x + - release/21.x + steps: + - name: Sync ${{ matrix.branch }} from upstream via gh + env: + GITHUB_TOKEN: ${{ secrets.GH_REPO_SYNC_TOKEN }} + run: | + gh repo sync ${{ github.repository }} --branch "${{ matrix.branch }}" diff --git a/.github/workflows/test-unprivileged-download-artifact.yml b/.github/workflows/test-unprivileged-download-artifact.yml deleted file mode 100644 index 0831135297b63..0000000000000 --- a/.github/workflows/test-unprivileged-download-artifact.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Test Unprivileged Download Artifact Action - -permissions: - contents: read - -on: - push: - branches: - - main - paths: - - .github/workflows/test-unprivileged-download-artifact.yml - - '.github/workflows/unprivileged-download-artifact/**' - pull_request: - paths: - - .github/workflows/test-unprivileged-download-artifact.yml - - '.github/workflows/unprivileged-download-artifact/**' - -jobs: - upload-test-artifact: - name: Upload Test Artifact - if: github.repository_owner == 'llvm' - runs-on: ubuntu-24.04 - steps: - - name: Create Test File - run: | - echo "test" > comment - - name: Upload Test File - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 - with: - name: workflow-args - path: | - comment - - test-download: - name: Test Unprivileged Download Artifact - if: github.repository_owner == 'llvm' - runs-on: ubuntu-24.04 - needs: [ upload-test-artifact ] - steps: - - name: Checkout LLVM - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - sparse-checkout: | - .github/workflows/unprivileged-download-artifact/action.yml - - name: Download Artifact - uses: ./.github/workflows/unprivileged-download-artifact - id: download-artifact - with: - run-id: ${{ github.run_id }} - artifact-name: workflow-args - - name: Assert That Contents are the Same - run: | - cat comment - [[ "$(cat comment)" == "test" ]] diff --git a/.github/workflows/unprivileged-download-artifact/action.yml b/.github/workflows/unprivileged-download-artifact/action.yml deleted file mode 100644 index 72815b26bcf41..0000000000000 --- a/.github/workflows/unprivileged-download-artifact/action.yml +++ /dev/null @@ -1,81 +0,0 @@ -name: Unprivileged Download Artifact -description: >- - Download artifacts from another workflow run without using an access token. -inputs: - run-id: - description: >- - The run-id for the workflow run that you want to download the artifact - from. If ommitted it will download the most recently created artifact - from the repo with the artifact-name. - required: false - artifact-name: - desciption: The name of the artifact to download. - required: true - - -outputs: - filename: - description: >- - The filename of the downloaded artifact or the empty string if the - artifact was not found. - value: ${{ steps.download-artifact.outputs.filename }} - artifact-id: - description: "The id of the artifact being downloaded." - value: ${{ steps.artifact-url.outputs.id }} - - -runs: - using: "composite" - steps: - - uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 - id: artifact-url - with: - script: | - var response; - if (!"${{ inputs.run-id }}") { - response = await github.rest.actions.listArtifactsForRepo({ - owner: context.repo.owner, - repo: context.repo.repo, - name: "${{ inputs.artifact-name }}" - }) - } else { - response = await github.rest.actions.listWorkflowRunArtifacts({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: "${{ inputs.run-id }}", - name: "${{ inputs.artifact-name }}" - }) - } - - console.log(response) - - for (artifact of response.data.artifacts) { - console.log(artifact); - } - - if (response.data.artifacts.length == 0) { - console.log("Could not find artifact ${{ inputs.artifact-name }} for workflow run ${{ inputs.run-id }}") - return; - } - - const url_response = await github.rest.actions.downloadArtifact({ - owner: context.repo.owner, - repo: context.repo.repo, - artifact_id: response.data.artifacts[0].id, - archive_format: "zip" - }) - - core.setOutput("url", url_response.url); - core.setOutput("id", response.data.artifacts[0].id); - - - shell: bash - if: steps.artifact-url.outputs.url != '' - id: download-artifact - run: | - curl -L -o ${{ inputs.artifact-name }}.zip "${{ steps.artifact-url.outputs.url }}" - echo "filename=${{ inputs.artifact-name }}.zip" >> $GITHUB_OUTPUT - - - shell: bash - if: steps.download-artifact.outputs.filename != '' - run: | - unzip ${{ steps.download-artifact.outputs.filename }} diff --git a/.github/workflows/version-check.py b/.github/workflows/version-check.py deleted file mode 100755 index f75fd50300881..0000000000000 --- a/.github/workflows/version-check.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/python3 - -from git import Repo -import re -import sys - - -def get_version_from_tag(tag): - m = re.match("llvmorg-([0-9]+)\.([0-9]+)\.([0-9]+)(-rc[0-9]+)?$", tag) - if m: - if m.lastindex == 4: - # We have an rc tag. - return m.group(1, 2, 3) - # We have a final release tag. - return (m.group(1), m.group(2), str(int(m.group(3)) + 1)) - - m = re.match("llvmorg-([0-9]+)-init", tag) - if m: - return (m.group(1), "1", "0") - - raise Exception(f"error: Tag is not valid: {tag}") - - -version = sys.argv[1] - -repo = Repo() - -tag = repo.git.describe(tags=True, abbrev=0) -expected_version = ".".join(get_version_from_tag(tag)) - -if version != expected_version: - print("error: Expected version", expected_version, "but found version", version) - sys.exit(1) - -print("Versions match:", version, expected_version) -sys.exit(0) diff --git a/.github/workflows/version-check.yml b/.github/workflows/version-check.yml deleted file mode 100644 index b3fc1f49db56a..0000000000000 --- a/.github/workflows/version-check.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: LLVM Project Version Check - -on: - push: - branches: - - 'release/**' - pull_request: - branches: - - 'release/**' - -permissions: - contents: read - -jobs: - version_check: - if: github.repository_owner == 'llvm' - runs-on: ubuntu-24.04 - steps: - - name: Fetch LLVM sources - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - fetch-depth: 0 - - - name: Install dependencies - run: | - pip install --require-hashes -r ./llvm/utils/git/requirements.txt - - - name: Version Check - run: | - version=$(grep -o 'LLVM_VERSION_\(MAJOR\|MINOR\|PATCH\) [0-9]\+' cmake/Modules/LLVMVersion.cmake | cut -d ' ' -f 2 | tr "\n" "." | sed 's/.$//g') - .github/workflows/version-check.py "$version" diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 0c653c0601520..58dba18db6db8 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,3 +1,131 @@ -# Code of Conduct +# Contributor Covenant Code of Conduct -The LLVM Community Code of Conduct can be found at https://llvm.org/docs/CodeOfConduct.html. +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual +identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the overall + community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or advances of + any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email address, + without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +CommunityCodeOfConduct AT intel DOT com. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or permanent +ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the +community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.1, available at +[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. + +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at +[https://www.contributor-covenant.org/translations][translations]. + +[homepage]: https://www.contributor-covenant.org +[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html +[Mozilla CoC]: https://github.com/mozilla/diversity +[FAQ]: https://www.contributor-covenant.org/faq diff --git a/README.md b/README.md index a9b29ecbc1a3a..b9778cf3d28b7 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,31 @@ +# OpenVINO™ Intel® NPU Compiler – LLVM Fork Notice + +[![npu/release/20.x](https://img.shields.io/badge/Active_release_branch-npu/release/20.x-blue)](https://github.com/intel-staging/npu-compiler-llvm/tree/npu/release/20.x) +[![pr/npu/release/20.x](https://img.shields.io/badge/Open_a_PR_to-npu/release/20.x-blue)](https://github.com/intel-staging/npu-compiler-llvm/compare/npu/release/20.x..?) + + +[![npu/release/21.x](https://img.shields.io/badge/Future_release_branch-npu/release/21.x-yellow)](https://github.com/intel-staging/npu-compiler-llvm/tree/npu/release/21.x) +[![pr/npu/release/21.x](https://img.shields.io/badge/Open_a_PR_to-npu/release/21.x-yellow)](https://github.com/intel-staging/npu-compiler-llvm/compare/npu/release/21.x..?) + + +This repository is a fork of [llvm/llvm-project](https://github.com/llvm/llvm-project ). +It is designed to provide the core functionality of LLVM and MLIR projects, along with a set of NPU Compiler-specific patches. These modifications serve as the baseline for the [OpenVINO™ Intel® NPU Compiler](https://github.com/openvinotoolkit/npu_compiler). + +## Branching strategy + +The default branch of this repository is [npu/main](https://github.com/intel-staging/npu-compiler-llvm/tree/npu/main), which is used for infrastructure purposes only. +The NPU Compiler project is based on official LLVM releases. To contribute to the NPU-specific version of LLVM, please open a Pull Request to one of the following branches: + +* [npu/release/20.x](https://github.com/intel-staging/npu-compiler-llvm/tree/npu/release/20.x) - Contribute to the current active baseline for the NPU Compiler LLVM dependency. +* [npu/release/21.x](https://github.com/intel-staging/npu-compiler-llvm/tree/npu/release/21.x) - Contribute to the future LLVM baseline, which will be integrated into the NPU Compiler in the coming weeks or months. + +## Security Policy + +Intel® Corporation is committed to addressing security vulnerabilities quickly and transparently. To report a potential security issue in this project, please refer to our +[Security Policy](./SECURITY.md). + +--- + # The LLVM Compiler Infrastructure [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/llvm/llvm-project/badge)](https://securityscorecards.dev/viewer/?uri=github.com/llvm/llvm-project) diff --git a/SECURITY.md b/SECURITY.md index f6a5e6c016291..d85d4358b17d7 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,5 +1,5 @@ -# Reporting LLVM Security Issues +# Security Policy +Intel is committed to rapidly addressing security vulnerabilities affecting our customers and providing clear guidance on the solution, impact, severity and mitigation. -To report security issues in LLVM, please follow the steps outlined on the -[LLVM Security Group](https://llvm.org/docs/Security.html#how-to-report-a-security-issue) -page. +## Reporting a Vulnerability +Please report any security vulnerabilities in this project [utilizing the guidelines here](https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html). diff --git a/llvm/utils/vscode/llvm/package-lock.json b/llvm/utils/vscode/llvm/package-lock.json index 9559768c1919c..0db871410b910 100644 --- a/llvm/utils/vscode/llvm/package-lock.json +++ b/llvm/utils/vscode/llvm/package-lock.json @@ -10,7 +10,7 @@ "devDependencies": { "@types/node": "^8.10.59", "@types/vscode": "^1.39.0", - "js-yaml": "^3.13.1", + "js-yaml": "^3.14.2", "tslint": "^5.16.0", "typescript": "^3.8.3" }, @@ -271,10 +271,11 @@ "dev": true }, "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", + "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", "dev": true, + "license": "MIT", "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -449,6 +450,7 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", "dev": true, + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/llvm/utils/vscode/llvm/package.json b/llvm/utils/vscode/llvm/package.json index fbee74954cbb3..48b84e9ba14b2 100644 --- a/llvm/utils/vscode/llvm/package.json +++ b/llvm/utils/vscode/llvm/package.json @@ -110,7 +110,7 @@ "devDependencies": { "@types/node": "^8.10.59", "@types/vscode": "^1.39.0", - "js-yaml": "^3.13.1", + "js-yaml": "^3.14.2", "tslint": "^5.16.0", "typescript": "^3.8.3" },