Skip to content

Commit

Permalink
Merge commit '90094f5657dcda46cffe1804449969e289aa9ff2' into llvmspir…
Browse files Browse the repository at this point in the history
…v_pulldown
  • Loading branch information
jsji committed Feb 25, 2025
2 parents 6dc419f + 90094f5 commit 48140bb
Show file tree
Hide file tree
Showing 4,175 changed files with 189,439 additions and 101,628 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
5 changes: 2 additions & 3 deletions .ci/generate-buildkite-pipeline-premerge
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,8 @@ if [[ "${windows_projects}" != "" ]]; then
limit: 2
timeout_in_minutes: 150
env:
CC: 'cl'
CXX: 'cl'
LD: 'link'
MAX_PARALLEL_COMPILE_JOBS: '16'
MAX_PARALLEL_LINK_JOBS: '4'
commands:
- 'C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat -arch=amd64 -host_arch=amd64'
- 'bash .ci/monolithic-windows.sh "$(echo ${windows_projects} | tr ' ' ';')" "$(echo ${windows_check_targets})"'
Expand Down
79 changes: 38 additions & 41 deletions .ci/metrics/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,34 +130,6 @@ def get_per_workflow_metrics(
workflow_jobs = workflow_run.jobs()
if workflow_jobs.totalCount == 0:
continue
if workflow_jobs.totalCount > 1:
raise ValueError(
f"Encountered an unexpected number of jobs: {workflow_jobs.totalCount}"
)

created_at = workflow_jobs[0].created_at
started_at = workflow_jobs[0].started_at
completed_at = workflow_jobs[0].completed_at

job_result = int(workflow_jobs[0].conclusion == "success")
if job_result:
# We still might want to mark the job as a failure if one of the steps
# failed. This is required due to use setting continue-on-error in
# the premerge pipeline to prevent sending emails while we are
# testing the infrastructure.
# TODO(boomanaiden154): Remove this once the premerge pipeline is no
# longer in a testing state and we can directly assert the workflow
# result.
for step in workflow_jobs[0].steps:
if step.conclusion != "success":
job_result = 0
break

queue_time = started_at - created_at
run_time = completed_at - started_at

if run_time.seconds == 0:
continue

if (
workflows_to_track[workflow_run.name] is None
Expand All @@ -170,20 +142,45 @@ def get_per_workflow_metrics(
):
break

# The timestamp associated with the event is expected by Grafana to be
# in nanoseconds.
created_at_ns = int(created_at.timestamp()) * 10**9

workflow_metrics.append(
JobMetrics(
workflow_run.name,
queue_time.seconds,
run_time.seconds,
job_result,
created_at_ns,
workflow_run.id,
for workflow_job in workflow_jobs:
created_at = workflow_job.created_at
started_at = workflow_job.started_at
completed_at = workflow_job.completed_at

job_result = int(workflow_job.conclusion == "success")
if job_result:
# We still might want to mark the job as a failure if one of the steps
# failed. This is required due to use setting continue-on-error in
# the premerge pipeline to prevent sending emails while we are
# testing the infrastructure.
# TODO(boomanaiden154): Remove this once the premerge pipeline is no
# longer in a testing state and we can directly assert the workflow
# result.
for step in workflow_job.steps:
if step.conclusion != "success":
job_result = 0
break

queue_time = started_at - created_at
run_time = completed_at - started_at

if run_time.seconds == 0:
continue

# The timestamp associated with the event is expected by Grafana to be
# in nanoseconds.
created_at_ns = int(created_at.timestamp()) * 10**9

workflow_metrics.append(
JobMetrics(
workflow_run.name + "-" + workflow_job.name,
queue_time.seconds,
run_time.seconds,
job_result,
created_at_ns,
workflow_run.id,
)
)
)

return workflow_metrics

Expand Down
8 changes: 6 additions & 2 deletions .ci/monolithic-windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ echo "--- cmake"
pip install -q -r "${MONOREPO_ROOT}"/mlir/python/requirements.txt
pip install -q -r "${MONOREPO_ROOT}"/.ci/requirements.txt

export CC=cl
export CXX=cl
export LD=link

# The CMAKE_*_LINKER_FLAGS to disable the manifest come from research
# on fixing a build reliability issue on the build server, please
# see https://github.com/llvm/llvm-project/pull/82393 and
Expand All @@ -72,8 +76,8 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
-D CMAKE_EXE_LINKER_FLAGS="/MANIFEST:NO" \
-D CMAKE_MODULE_LINKER_FLAGS="/MANIFEST:NO" \
-D CMAKE_SHARED_LINKER_FLAGS="/MANIFEST:NO" \
-D LLVM_PARALLEL_COMPILE_JOBS=16 \
-D LLVM_PARALLEL_LINK_JOBS=4
-D LLVM_PARALLEL_COMPILE_JOBS=${MAX_PARALLEL_COMPILE_JOBS} \
-D LLVM_PARALLEL_LINK_JOBS=${MAX_PARALLEL_LINK_JOBS}

echo "--- ninja"
# Targets are not escaped as they are passed as separate arguments.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ RUN choco install -y handle
RUN pip3 install pywin32 buildbot-worker==2.8.4
ARG RUNNER_VERSION=2.321.0
ARG RUNNER_VERSION=2.322.0
ENV RUNNER_VERSION=$RUNNER_VERSION
RUN powershell -Command \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/containers/github-action-ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ WORKDIR /home/gha

FROM ci-container as ci-container-agent

ENV GITHUB_RUNNER_VERSION=2.321.0
ENV GITHUB_RUNNER_VERSION=2.322.0

RUN mkdir actions-runner && \
cd actions-runner && \
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/libc-fullbuild-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,19 @@ on:

jobs:
build:
runs-on: ubuntu-24.04
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- c_compiler: clang
- os: ubuntu-24.04
ccache-variant: sccache
c_compiler: clang
cpp_compiler: clang++
# TODO: remove ccache logic when https://github.com/hendrikmuhs/ccache-action/issues/279 is resolved.
- os: ubuntu-24.04-arm
ccache-variant: ccache
c_compiler: clang
cpp_compiler: clang++
# TODO: add back gcc build when it is fixed
# - c_compiler: gcc
Expand All @@ -35,7 +42,7 @@ jobs:
with:
max-size: 1G
key: libc_fullbuild_${{ matrix.c_compiler }}
variant: sccache
variant: ${{ matrix.ccache-variant }}

# Notice:
# - MPFR is required by some of the mathlib tests.
Expand All @@ -62,8 +69,8 @@ jobs:
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=MinSizeRel
-DCMAKE_C_COMPILER_LAUNCHER=sccache
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
-DCMAKE_C_COMPILER_LAUNCHER=${{ matrix.ccache-variant }}
-DCMAKE_CXX_COMPILER_LAUNCHER=${{ matrix.ccache-variant }}
-DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.build-install-dir }}
-DLLVM_ENABLE_RUNTIMES="libc;compiler-rt"
-DLLVM_LIBC_FULL_BUILD=ON
Expand Down
20 changes: 17 additions & 3 deletions .github/workflows/libc-overlay-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,28 @@ jobs:
include:
# TODO: add linux gcc when it is fixed
- os: ubuntu-24.04
ccache-variant: sccache
compiler:
c_compiler: clang
cpp_compiler: clang++
# TODO: remove ccache logic when https://github.com/hendrikmuhs/ccache-action/issues/279 is resolved.
- os: ubuntu-24.04-arm
ccache-variant: ccache
compiler:
c_compiler: clang
cpp_compiler: clang++
- os: windows-2022
ccache-variant: sccache
compiler:
c_compiler: clang-cl
cpp_compiler: clang-cl
- os: windows-2025
ccache-variant: sccache
compiler:
c_compiler: clang-cl
cpp_compiler: clang-cl
- os: macos-14
ccache-variant: sccache
compiler:
c_compiler: clang
cpp_compiler: clang++
Expand All @@ -46,7 +60,7 @@ jobs:
with:
max-size: 1G
key: libc_overlay_build_${{ matrix.os }}_${{ matrix.compiler.c_compiler }}
variant: sccache
variant: ${{ matrix.ccache-variant }}

# MPFR is required by some of the mathlib tests.
- name: Prepare dependencies (Ubuntu)
Expand Down Expand Up @@ -82,8 +96,8 @@ jobs:
-DCMAKE_CXX_COMPILER=${{ matrix.compiler.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.compiler.c_compiler }}
-DCMAKE_BUILD_TYPE=MinSizeRel
-DCMAKE_C_COMPILER_LAUNCHER=sccache
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
-DCMAKE_C_COMPILER_LAUNCHER=${{ matrix.ccache-variant }}
-DCMAKE_CXX_COMPILER_LAUNCHER=${{ matrix.ccache-variant }}
-DCMAKE_POLICY_DEFAULT_CMP0141=NEW
-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded
-DLLVM_ENABLE_RUNTIMES=libc
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/libcxx-build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ jobs:
'generic-cxx26',
'generic-modules'
]
cc: [ 'clang-19' ]
cxx: [ 'clang++-19' ]
cc: [ 'clang-20' ]
cxx: [ 'clang++-20' ]
include:
- config: 'generic-gcc'
cc: 'gcc-14'
Expand Down Expand Up @@ -88,18 +88,18 @@ jobs:
'generic-cxx20',
'generic-cxx23'
]
cc: [ 'clang-19' ]
cxx: [ 'clang++-19' ]
cc: [ 'clang-20' ]
cxx: [ 'clang++-20' ]
include:
- config: 'generic-gcc-cxx11'
cc: 'gcc-14'
cxx: 'g++-14'
- config: 'generic-cxx23'
cc: 'clang-17'
cxx: 'clang++-17'
- config: 'generic-cxx26'
cc: 'clang-18'
cxx: 'clang++-18'
- config: 'generic-cxx26'
cc: 'clang-19'
cxx: 'clang++-19'
steps:
- uses: actions/checkout@v4
- name: ${{ matrix.config }}
Expand Down Expand Up @@ -169,8 +169,8 @@ jobs:
- name: ${{ matrix.config }}
run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
env:
CC: clang-19
CXX: clang++-19
CC: clang-20
CXX: clang++-20
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
if: always()
with:
Expand Down
64 changes: 63 additions & 1 deletion .github/workflows/premerge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
if: github.repository_owner == 'llvm'
runs-on: llvm-premerge-linux-runners
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
group: ${{ github.workflow }}-linux-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
steps:
- name: Checkout LLVM
Expand Down Expand Up @@ -70,3 +70,65 @@ jobs:
export CXX=/opt/llvm/bin/clang++
./.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})" "$(echo ${linux_runtimes} | tr ' ' ';')" "$(echo ${linux_runtime_check_targets})"
premerge-checks-windows:
if: github.repository_owner == 'llvm'
runs-on: llvm-premerge-windows-runners
concurrency:
group: ${{ github.workflow }}-windows-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
defaults:
run:
shell: bash
steps:
- name: Checkout LLVM
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup ccache
uses: hendrikmuhs/[email protected]
with:
variant: "sccache"
max-size: "2000M"
- name: Compute Projects
id: vars
run: |
modified_files=$(git diff --name-only HEAD~1...HEAD)
modified_dirs=$(echo "$modified_files" | cut -d'/' -f1 | sort | uniq)
echo $modified_files
echo $modified_dirs
. ./.ci/compute-projects.sh
all_projects="bolt clang clang-tools-extra compiler-rt cross-project-tests flang libc libclc lld lldb llvm mlir openmp polly pstl"
modified_projects="$(keep-modified-projects ${all_projects})"
windows_projects_to_test=$(exclude-windows $(compute-projects-to-test 1 ${modified_projects}))
windows_check_targets=$(check-targets ${windows_projects_to_test} | sort | uniq | tr -d '\r' | tr '\n' ' ')
windows_projects=$(add-dependencies ${windows_projects_to_test} | sort | uniq | tr -d '\r' | tr '\n' ';')
if [[ "${windows_projects}" == "" ]]; then
echo "No projects to build"
fi
echo "Building projects: ${windows_projects}"
echo "Running project checks targets: ${windows_check_targets}"
echo "windows-projects=${windows_projects}" >> $GITHUB_OUTPUT
echo "windows-check-targets=${windows_check_targets}" >> $GITHUB_OUTPUT
- name: Build and Test
# Mark the job as a success even if the step fails so that people do
# not get notified while the new premerge pipeline is in an
# experimental state.
# TODO(boomanaiden154): Remove this once the pipeline is stable and we
# are ready for people to start recieving notifications.
continue-on-error: true
if: ${{ steps.vars.outputs.windows-projects != '' }}
shell: cmd
run: |
set MAX_PARALLEL_COMPILE_JOBS=64
set MAX_PARALLEL_LINK_JOBS=64
call C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat -arch=amd64 -host_arch=amd64
bash .ci/monolithic-windows.sh "${{ steps.vars.outputs.windows-projects }}" "${{ steps.vars.outputs.windows-check-targets }}"
1 change: 1 addition & 0 deletions .github/workflows/release-binaries-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ jobs:
matrix:
runs-on:
- ubuntu-22.04
- ubuntu-22.04-arm
- macos-13
- macos-14

Expand Down
Loading

0 comments on commit 48140bb

Please sign in to comment.