Compare commits

..

5 Commits

Author SHA1 Message Date
Kendell R
9bee45c847
Merge be90c4a3c7 into 94ea32abe4 2026-01-13 00:18:30 +00:00
KTibow
be90c4a3c7 Merge upstream/master into patch-1
Resolved conflict in .github/workflows/autobuild.yaml:
- Kept unified macOS build with macos-14 and universal binaries from upstream
- Preserved linux-arm64 support from patch-1
- Preserved commented windows-arm64 configuration from patch-1
- Applied variable-based gRPC versioning from upstream
- Maintained windows-x64 and linux-x64 naming from patch-1
- Added winget.yml workflow from upstream
2026-01-12 16:15:51 -08:00
InfinityWei
94ea32abe4
Update macos container's version and upgrade macos's grpc (#2568)
The macos-13 image was dropped in actions/runner-images#13046, so we have to upgrade to macos-14.

Older gRPC versions don't support macos-14 well so we have to use a newer version (on mac only for now).

Fixes https://github.com/clangd/clangd/issues/2562
2025-12-21 03:11:56 -05:00
Ruben Buniatyan
06c1d49984
Automatically publish release packages to winget (#2445) 2025-11-25 02:28:56 -05:00
InfinityWei
0ed1e6bc60
Fix MacOS CI build (#2522)
As of https://github.com/actions/runner-images/issues/12934, the Mac runners use CMake 4.0, which drops compatibility with CMake < 3.5, but the gRPC library version we use is marked as having CMake 3.1 as its minimum version.

Work around this by using `-DCMAKE_POLICY_VERSION_MINIMUM=3.5`.
2025-10-09 01:09:07 -04:00
2 changed files with 67 additions and 14 deletions

View File

@ -158,6 +158,7 @@ jobs:
"-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded" "-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded"
"-DLLVM_ENABLE_PDB=ON" "-DLLVM_ENABLE_PDB=ON"
"-DLLVM_PARALLEL_LINK_JOBS=1" "-DLLVM_PARALLEL_LINK_JOBS=1"
grpc_version: v1.36.3
grpc_cmake: >- grpc_cmake: >-
"-DgRPC_MSVC_STATIC_RUNTIME=ON" "-DgRPC_MSVC_STATIC_RUNTIME=ON"
binary_extension: ".exe" binary_extension: ".exe"
@ -177,26 +178,22 @@ jobs:
# grpc_cmake: >- # grpc_cmake: >-
# "-DgRPC_MSVC_STATIC_RUNTIME=ON" # "-DgRPC_MSVC_STATIC_RUNTIME=ON"
# binary_extension: ".exe" # binary_extension: ".exe"
- name: mac-x64 - name: mac
runner: macos-13 runner: macos-14
preinstall: brew install ninja zlib p7zip preinstall: brew install ninja zlib p7zip
cflags: -O3 -gline-tables-only -DNDEBUG cflags: -O3 -gline-tables-only -DNDEBUG
cmake: >- cmake: >-
"-DCMAKE_C_COMPILER=clang" "-DCMAKE_C_COMPILER=clang"
"-DCMAKE_CXX_COMPILER=clang++" "-DCMAKE_CXX_COMPILER=clang++"
"-DLLVM_ENABLE_ZLIB=FORCE_ON" "-DLLVM_ENABLE_ZLIB=FORCE_ON"
"-DCMAKE_OSX_ARCHITECTURES=x86_64" "-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64"
"-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13" "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13"
- name: mac-arm64 "-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
runner: macos-latest "-Dabsl_DIR=$HOME/grpc-installation/lib/cmake/absl"
preinstall: brew install ninja zlib p7zip grpc_version: v1.51.3
cflags: -O3 -gline-tables-only -DNDEBUG # BoringSSL doesn't support universal binaries when building with ASM.
cmake: >- grpc_cmake: >-
"-DCMAKE_C_COMPILER=clang" "-DOPENSSL_NO_ASM=ON"
"-DCMAKE_CXX_COMPILER=clang++"
"-DLLVM_ENABLE_ZLIB=FORCE_ON"
"-DCMAKE_OSX_ARCHITECTURES=arm64"
"-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0"
- name: linux-x64 - name: linux-x64
runner: ubuntu-latest runner: ubuntu-latest
container: ubuntu:20.04 container: ubuntu:20.04
@ -217,6 +214,7 @@ jobs:
"-DLLVM_STATIC_LINK_CXX_STDLIB=ON" "-DLLVM_STATIC_LINK_CXX_STDLIB=ON"
"-DLLVM_ENABLE_ZLIB=FORCE_ON" "-DLLVM_ENABLE_ZLIB=FORCE_ON"
"-DCMAKE_PROJECT_INCLUDE=$GITHUB_WORKSPACE/.github/workflows/linux-static-deps.cmake" "-DCMAKE_PROJECT_INCLUDE=$GITHUB_WORKSPACE/.github/workflows/linux-static-deps.cmake"
grpc_version: v1.36.3
# Using c-ares as a module prevents dynamic linking of unneeded # Using c-ares as a module prevents dynamic linking of unneeded
# libraries. All other gRPC dependencies can be built from sources. # libraries. All other gRPC dependencies can be built from sources.
grpc_cmake: >- grpc_cmake: >-
@ -241,6 +239,7 @@ jobs:
"-DLLVM_STATIC_LINK_CXX_STDLIB=ON" "-DLLVM_STATIC_LINK_CXX_STDLIB=ON"
"-DLLVM_ENABLE_ZLIB=FORCE_ON" "-DLLVM_ENABLE_ZLIB=FORCE_ON"
"-DCMAKE_PROJECT_INCLUDE=$GITHUB_WORKSPACE/.github/workflows/linux-static-deps.cmake" "-DCMAKE_PROJECT_INCLUDE=$GITHUB_WORKSPACE/.github/workflows/linux-static-deps.cmake"
grpc_version: v1.36.3
grpc_cmake: >- grpc_cmake: >-
"-DgRPC_CARES_PROVIDER=package" "-DgRPC_CARES_PROVIDER=package"
runs-on: ${{ matrix.config.runner }} runs-on: ${{ matrix.config.runner }}
@ -272,7 +271,7 @@ jobs:
# We use the same version of gRPC for LLVM's clangd-ubuntu-tsan # We use the same version of gRPC for LLVM's clangd-ubuntu-tsan
# buildbot. # buildbot.
# https://github.com/llvm/llvm-zorg/blob/main/buildbot/google/docker/buildbot-clangd-ubuntu-clang/Dockerfile # https://github.com/llvm/llvm-zorg/blob/main/buildbot/google/docker/buildbot-clangd-ubuntu-clang/Dockerfile
ref: v1.36.3 ref: ${{ matrix.config.grpc_version }}
submodules: recursive submodules: recursive
- name: Build gRPC - name: Build gRPC
run: > run: >

54
.github/workflows/winget.yml vendored Normal file
View File

@ -0,0 +1,54 @@
name: Publish on Windows Package Manager
on:
release:
types: [released]
workflow_dispatch:
inputs:
tag_name:
description: Release tag (version)
required: true
jobs:
publish-winget:
name: Publish
runs-on: windows-latest
steps:
- name: Configure parameters
id: params
run: |
if ("${{ github.event_name }}" -eq "release") {
# Sometimes assets aren't immediately available, so we wait a bit for the first run
${{ github.run_attempt == 1 && 'Start-Sleep -Seconds 300' || '' }}
echo "assets_url=${{ github.event.release.assets_url }}" >> $env:GITHUB_OUTPUT
echo "version=${{ github.event.release.tag_name }}" >> $env:GITHUB_OUTPUT
} else {
$releaseUrl = "$env:GITHUB_API_URL/repos/clangd/clangd/releases/tags/${{ github.event.inputs.tag_name }}"
$assetsUrl = curl -sL $releaseUrl | ConvertFrom-Json | Select-Object -ExpandProperty assets_url
echo "assets_url=$assetsUrl" >> $env:GITHUB_OUTPUT
echo "version=${{ github.event.inputs.tag_name }}" >> $env:GITHUB_OUTPUT
}
- name: Set up Komac
run: |
$releaseUrl = "$env:GITHUB_API_URL/repos/russellbanks/Komac/releases/latest"
$downloadUrl = curl -sL $releaseUrl | ConvertFrom-Json
| Select-Object -ExpandProperty assets
| Where-Object -Property name -like "komac-*-x86_64-pc-windows-msvc.exe"
| Select-Object -ExpandProperty browser_download_url
| Select-Object -First 1
curl -sL $downloadUrl -o komac.exe
./komac --version
- name: Submit package
env:
GITHUB_TOKEN: ${{ secrets.WINGET_TOKEN }}
run: |
$releaseUrl = curl -sL ${{ steps.params.outputs.assets_url }} | ConvertFrom-Json
| Where-Object -Property name -like "clangd-windows-*.zip"
| Select-Object -ExpandProperty browser_download_url
./komac sync-fork
./komac update LLVM.clangd -v ${{ steps.params.outputs.version }} -u $releaseUrl -s