From 99e244541d0b225b5437cfd2c2907cc72fd0d095 Mon Sep 17 00:00:00 2001 From: Kendell R Date: Wed, 20 Aug 2025 14:57:47 -0700 Subject: [PATCH 01/12] arm --- .github/workflows/autobuild.yaml | 73 +++++++++++++++++++++++++++++--- 1 file changed, 67 insertions(+), 6 deletions(-) diff --git a/.github/workflows/autobuild.yaml b/.github/workflows/autobuild.yaml index 02a7e85..394104e 100644 --- a/.github/workflows/autobuild.yaml +++ b/.github/workflows/autobuild.yaml @@ -146,8 +146,10 @@ jobs: fail-fast: false matrix: config: - - name: windows + - name: windows-x64 os: windows-2022 + runner: windows-2022 + arch: x86_64 preinstall: choco install ninja nasm vcvars: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat cflags: /O2 /DNDEBUG @@ -161,21 +163,80 @@ jobs: grpc_cmake: >- "-DgRPC_MSVC_STATIC_RUNTIME=ON" binary_extension: ".exe" - - name: mac + - name: windows-arm64 + os: windows-2022 + runner: windows-2022 + arch: aarch64 + preinstall: choco install ninja nasm + vcvars: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsarm64.bat + cflags: /O2 /DNDEBUG + cmake: >- + "-DCMAKE_C_COMPILER=cl" + "-DCMAKE_CXX_COMPILER=cl" + "-DLLVM_ENABLE_ZLIB=OFF" + "-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded" + "-DLLVM_ENABLE_PDB=ON" + "-DLLVM_PARALLEL_LINK_JOBS=1" + "-DCMAKE_GENERATOR_PLATFORM=ARM64" + grpc_cmake: >- + "-DgRPC_MSVC_STATIC_RUNTIME=ON" + binary_extension: ".exe" + - name: mac-x64 os: macos-13 + runner: macos-13 + arch: x86_64 preinstall: brew install ninja zlib p7zip cflags: -O3 -gline-tables-only -DNDEBUG cmake: >- "-DCMAKE_C_COMPILER=clang" "-DCMAKE_CXX_COMPILER=clang++" "-DLLVM_ENABLE_ZLIB=FORCE_ON" - "-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64" + "-DCMAKE_OSX_ARCHITECTURES=x86_64" "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13" - # BoringSSL doesn't support universal binaries when building with ASM. grpc_cmake: >- "-DOPENSSL_NO_ASM=ON" - - name: linux + - name: mac-arm64 + os: macos-13 + runner: macos-13 + arch: aarch64 + preinstall: brew install ninja zlib p7zip + cflags: -O3 -gline-tables-only -DNDEBUG + cmake: >- + "-DCMAKE_C_COMPILER=clang" + "-DCMAKE_CXX_COMPILER=clang++" + "-DLLVM_ENABLE_ZLIB=FORCE_ON" + "-DCMAKE_OSX_ARCHITECTURES=arm64" + "-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0" + grpc_cmake: >- + "-DOPENSSL_NO_ASM=ON" + - name: linux-x64 os: ubuntu-latest + runner: ubuntu-latest + arch: x86_64 + container: ubuntu:20.04 + preinstall: >- + apt-get update && + apt-get install -y ninja-build libz-dev libc-ares-dev wget clang-10 + software-properties-common p7zip-full curl && + add-apt-repository ppa:git-core/ppa && + wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | apt-key add - && + apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main' && + apt-get update && + apt-get install -y git cmake python3.8 python3.8-dev + cflags: -O3 -gline-tables-only -DNDEBUG -include $GITHUB_WORKSPACE/.github/workflows/lib_compat.h + cmake: >- + "-DCMAKE_C_COMPILER=clang-10" + "-DCMAKE_CXX_COMPILER=clang++-10" + "-DCMAKE_EXE_LINKER_FLAGS_RELEASE=-static-libgcc -Wl,--compress-debug-sections=zlib" + "-DLLVM_STATIC_LINK_CXX_STDLIB=ON" + "-DLLVM_ENABLE_ZLIB=FORCE_ON" + "-DCMAKE_PROJECT_INCLUDE=$GITHUB_WORKSPACE/.github/workflows/linux-static-deps.cmake" + grpc_cmake: >- + "-DgRPC_CARES_PROVIDER=package" + - name: linux-arm64 + os: ubuntu-latest + runner: ubuntu-24.04-arm64 + arch: aarch64 container: ubuntu:20.04 preinstall: >- apt-get update && @@ -198,7 +259,7 @@ jobs: # libraries. All other gRPC dependencies can be built from sources. grpc_cmake: >- "-DgRPC_CARES_PROVIDER=package" - runs-on: ${{ matrix.config.os }} + runs-on: ${{ matrix.config.runner }} container: ${{ matrix.config.container }} steps: - name: Clone scripts From 793646590767dd7c52095c4023675c9555bbe969 Mon Sep 17 00:00:00 2001 From: Kendell R Date: Wed, 20 Aug 2025 15:03:10 -0700 Subject: [PATCH 02/12] use startsWith --- .github/workflows/autobuild.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/autobuild.yaml b/.github/workflows/autobuild.yaml index 394104e..bc38157 100644 --- a/.github/workflows/autobuild.yaml +++ b/.github/workflows/autobuild.yaml @@ -271,7 +271,7 @@ jobs: # Run vcvars64.bat and re-export the current environment to the workflow. # (It'd be nice to only export the variables that *changed*, oh well). - name: Visual Studio environment - if: matrix.config.name == 'windows' + if: mstartsWith(matrix.config.name, 'windows') shell: powershell run: | cmd /c "`"${{ matrix.config.vcvars }}`">NUL && set" | Foreach-Object { @@ -373,7 +373,7 @@ jobs: ${{ env.CLANGD_DIR }}/bin/clangd${{ matrix.config.binary_extension }} ${{ env.CLANGD_DIR }}/lib/clang - name: Archive clangd PDB symbols - if: matrix.config.name == 'windows' + if: startsWith(matrix.config.name, 'windows') run: > 7z a clangd-pdb.7z -t7z -m0=LZMA2 ${{ env.CLANGD_DIR }}/LICENSE.TXT @@ -396,7 +396,7 @@ jobs: asset_path: clangd.zip asset_content_type: application/zip - name: Upload clangd PDB asset - if: matrix.config.name == 'windows' + if: startsWith(matrix.config.name, 'windows') uses: actions/upload-release-asset@v1.0.1 env: GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} @@ -415,7 +415,7 @@ jobs: asset_path: indexing-tools.zip asset_content_type: application/zip - name: Check binary compatibility - if: matrix.config.name == 'linux' + if: startsWith(matrix.config.name, 'linux') run: .github/workflows/lib_compat_test.py --lib=GLIBC_2.18 "$CLANGD_DIR/bin/clangd" # Create the release, and upload the artifacts to it. finalize: From a5f42f93cbe63daf2b93ea172f4310cb12f715b2 Mon Sep 17 00:00:00 2001 From: Kendell R Date: Wed, 20 Aug 2025 15:06:01 -0700 Subject: [PATCH 03/12] vcvarsarm64.bat handles that --- .github/workflows/autobuild.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/autobuild.yaml b/.github/workflows/autobuild.yaml index bc38157..7014e5c 100644 --- a/.github/workflows/autobuild.yaml +++ b/.github/workflows/autobuild.yaml @@ -177,7 +177,6 @@ jobs: "-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded" "-DLLVM_ENABLE_PDB=ON" "-DLLVM_PARALLEL_LINK_JOBS=1" - "-DCMAKE_GENERATOR_PLATFORM=ARM64" grpc_cmake: >- "-DgRPC_MSVC_STATIC_RUNTIME=ON" binary_extension: ".exe" From e62ec6fe90ee590b8677fbe754d7396ef2b72f66 Mon Sep 17 00:00:00 2001 From: Kendell R Date: Wed, 20 Aug 2025 15:06:31 -0700 Subject: [PATCH 04/12] fix typo --- .github/workflows/autobuild.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/autobuild.yaml b/.github/workflows/autobuild.yaml index 7014e5c..8168ffd 100644 --- a/.github/workflows/autobuild.yaml +++ b/.github/workflows/autobuild.yaml @@ -270,7 +270,7 @@ jobs: # Run vcvars64.bat and re-export the current environment to the workflow. # (It'd be nice to only export the variables that *changed*, oh well). - name: Visual Studio environment - if: mstartsWith(matrix.config.name, 'windows') + if: startsWith(matrix.config.name, 'windows') shell: powershell run: | cmd /c "`"${{ matrix.config.vcvars }}`">NUL && set" | Foreach-Object { From 3517b05ca81c84067b48323ac7eead053ce61755 Mon Sep 17 00:00:00 2001 From: Kendell R Date: Wed, 20 Aug 2025 15:27:12 -0700 Subject: [PATCH 05/12] native arm win runner --- .github/workflows/autobuild.yaml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/autobuild.yaml b/.github/workflows/autobuild.yaml index 8168ffd..9ca98d3 100644 --- a/.github/workflows/autobuild.yaml +++ b/.github/workflows/autobuild.yaml @@ -147,7 +147,6 @@ jobs: matrix: config: - name: windows-x64 - os: windows-2022 runner: windows-2022 arch: x86_64 preinstall: choco install ninja nasm @@ -164,11 +163,10 @@ jobs: "-DgRPC_MSVC_STATIC_RUNTIME=ON" binary_extension: ".exe" - name: windows-arm64 - os: windows-2022 - runner: windows-2022 + runner: windows-11-arm arch: aarch64 preinstall: choco install ninja nasm - vcvars: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsarm64.bat + vcvars: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat cflags: /O2 /DNDEBUG cmake: >- "-DCMAKE_C_COMPILER=cl" @@ -181,7 +179,6 @@ jobs: "-DgRPC_MSVC_STATIC_RUNTIME=ON" binary_extension: ".exe" - name: mac-x64 - os: macos-13 runner: macos-13 arch: x86_64 preinstall: brew install ninja zlib p7zip @@ -195,7 +192,6 @@ jobs: grpc_cmake: >- "-DOPENSSL_NO_ASM=ON" - name: mac-arm64 - os: macos-13 runner: macos-13 arch: aarch64 preinstall: brew install ninja zlib p7zip @@ -209,7 +205,6 @@ jobs: grpc_cmake: >- "-DOPENSSL_NO_ASM=ON" - name: linux-x64 - os: ubuntu-latest runner: ubuntu-latest arch: x86_64 container: ubuntu:20.04 @@ -233,7 +228,6 @@ jobs: grpc_cmake: >- "-DgRPC_CARES_PROVIDER=package" - name: linux-arm64 - os: ubuntu-latest runner: ubuntu-24.04-arm64 arch: aarch64 container: ubuntu:20.04 From 5e192f5cb848a1d0da6d0d350d9c1504d911f5ad Mon Sep 17 00:00:00 2001 From: Kendell R Date: Wed, 20 Aug 2025 15:32:27 -0700 Subject: [PATCH 06/12] actual arm mac --- .github/workflows/autobuild.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/autobuild.yaml b/.github/workflows/autobuild.yaml index 9ca98d3..67fa93c 100644 --- a/.github/workflows/autobuild.yaml +++ b/.github/workflows/autobuild.yaml @@ -192,7 +192,7 @@ jobs: grpc_cmake: >- "-DOPENSSL_NO_ASM=ON" - name: mac-arm64 - runner: macos-13 + runner: macos-latest arch: aarch64 preinstall: brew install ninja zlib p7zip cflags: -O3 -gline-tables-only -DNDEBUG From 0ba9ff287dbb89281c59e2e5260133f75fe9f36c Mon Sep 17 00:00:00 2001 From: Kendell R Date: Wed, 20 Aug 2025 16:22:04 -0700 Subject: [PATCH 07/12] simplifications --- .github/workflows/autobuild.yaml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/autobuild.yaml b/.github/workflows/autobuild.yaml index 67fa93c..f17365a 100644 --- a/.github/workflows/autobuild.yaml +++ b/.github/workflows/autobuild.yaml @@ -148,7 +148,6 @@ jobs: config: - name: windows-x64 runner: windows-2022 - arch: x86_64 preinstall: choco install ninja nasm vcvars: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat cflags: /O2 /DNDEBUG @@ -164,7 +163,6 @@ jobs: binary_extension: ".exe" - name: windows-arm64 runner: windows-11-arm - arch: aarch64 preinstall: choco install ninja nasm vcvars: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat cflags: /O2 /DNDEBUG @@ -180,7 +178,6 @@ jobs: binary_extension: ".exe" - name: mac-x64 runner: macos-13 - arch: x86_64 preinstall: brew install ninja zlib p7zip cflags: -O3 -gline-tables-only -DNDEBUG cmake: >- @@ -189,11 +186,8 @@ jobs: "-DLLVM_ENABLE_ZLIB=FORCE_ON" "-DCMAKE_OSX_ARCHITECTURES=x86_64" "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13" - grpc_cmake: >- - "-DOPENSSL_NO_ASM=ON" - name: mac-arm64 runner: macos-latest - arch: aarch64 preinstall: brew install ninja zlib p7zip cflags: -O3 -gline-tables-only -DNDEBUG cmake: >- @@ -202,11 +196,8 @@ jobs: "-DLLVM_ENABLE_ZLIB=FORCE_ON" "-DCMAKE_OSX_ARCHITECTURES=arm64" "-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0" - grpc_cmake: >- - "-DOPENSSL_NO_ASM=ON" - name: linux-x64 runner: ubuntu-latest - arch: x86_64 container: ubuntu:20.04 preinstall: >- apt-get update && @@ -229,7 +220,6 @@ jobs: "-DgRPC_CARES_PROVIDER=package" - name: linux-arm64 runner: ubuntu-24.04-arm64 - arch: aarch64 container: ubuntu:20.04 preinstall: >- apt-get update && From 4fe5d8f1974c3ab1460dc422eafd3158eaecffaa Mon Sep 17 00:00:00 2001 From: Kendell R Date: Wed, 20 Aug 2025 16:23:20 -0700 Subject: [PATCH 08/12] relocate comment --- .github/workflows/autobuild.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/autobuild.yaml b/.github/workflows/autobuild.yaml index f17365a..616d097 100644 --- a/.github/workflows/autobuild.yaml +++ b/.github/workflows/autobuild.yaml @@ -216,6 +216,8 @@ jobs: "-DLLVM_STATIC_LINK_CXX_STDLIB=ON" "-DLLVM_ENABLE_ZLIB=FORCE_ON" "-DCMAKE_PROJECT_INCLUDE=$GITHUB_WORKSPACE/.github/workflows/linux-static-deps.cmake" + # Using c-ares as a module prevents dynamic linking of unneeded + # libraries. All other gRPC dependencies can be built from sources. grpc_cmake: >- "-DgRPC_CARES_PROVIDER=package" - name: linux-arm64 @@ -238,8 +240,6 @@ jobs: "-DLLVM_STATIC_LINK_CXX_STDLIB=ON" "-DLLVM_ENABLE_ZLIB=FORCE_ON" "-DCMAKE_PROJECT_INCLUDE=$GITHUB_WORKSPACE/.github/workflows/linux-static-deps.cmake" - # Using c-ares as a module prevents dynamic linking of unneeded - # libraries. All other gRPC dependencies can be built from sources. grpc_cmake: >- "-DgRPC_CARES_PROVIDER=package" runs-on: ${{ matrix.config.runner }} From 99a411b26af4ba2904e52acb4da72437c5009fe6 Mon Sep 17 00:00:00 2001 From: Kendell R Date: Wed, 20 Aug 2025 21:37:17 -0700 Subject: [PATCH 09/12] comment out windows arm64 --- .github/workflows/autobuild.yaml | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/autobuild.yaml b/.github/workflows/autobuild.yaml index 616d097..a90b397 100644 --- a/.github/workflows/autobuild.yaml +++ b/.github/workflows/autobuild.yaml @@ -161,21 +161,22 @@ jobs: grpc_cmake: >- "-DgRPC_MSVC_STATIC_RUNTIME=ON" binary_extension: ".exe" - - name: windows-arm64 - runner: windows-11-arm - preinstall: choco install ninja nasm - vcvars: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat - cflags: /O2 /DNDEBUG - cmake: >- - "-DCMAKE_C_COMPILER=cl" - "-DCMAKE_CXX_COMPILER=cl" - "-DLLVM_ENABLE_ZLIB=OFF" - "-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded" - "-DLLVM_ENABLE_PDB=ON" - "-DLLVM_PARALLEL_LINK_JOBS=1" - grpc_cmake: >- - "-DgRPC_MSVC_STATIC_RUNTIME=ON" - binary_extension: ".exe" + # Can be uncommented once gRPC is upgraded past v1.54. + # - name: windows-arm64 + # runner: windows-11-arm + # preinstall: choco install ninja nasm + # vcvars: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat + # cflags: /O2 /DNDEBUG + # cmake: >- + # "-DCMAKE_C_COMPILER=cl" + # "-DCMAKE_CXX_COMPILER=cl" + # "-DLLVM_ENABLE_ZLIB=OFF" + # "-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded" + # "-DLLVM_ENABLE_PDB=ON" + # "-DLLVM_PARALLEL_LINK_JOBS=1" + # grpc_cmake: >- + # "-DgRPC_MSVC_STATIC_RUNTIME=ON" + # binary_extension: ".exe" - name: mac-x64 runner: macos-13 preinstall: brew install ninja zlib p7zip From b260fe594e5326f0c53fd2a1179523578e7f09f8 Mon Sep 17 00:00:00 2001 From: Kendell R Date: Thu, 21 Aug 2025 15:48:42 -0700 Subject: [PATCH 10/12] maybe this will fix the ubuntu runner? --- .github/workflows/autobuild.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/autobuild.yaml b/.github/workflows/autobuild.yaml index a90b397..f2cf650 100644 --- a/.github/workflows/autobuild.yaml +++ b/.github/workflows/autobuild.yaml @@ -222,7 +222,7 @@ jobs: grpc_cmake: >- "-DgRPC_CARES_PROVIDER=package" - name: linux-arm64 - runner: ubuntu-24.04-arm64 + runner: ubuntu-24.04-arm container: ubuntu:20.04 preinstall: >- apt-get update && From 42dd963d90e742201313364c0ab94b5607a3f4ee Mon Sep 17 00:00:00 2001 From: Kendell R Date: Thu, 21 Aug 2025 16:04:05 -0700 Subject: [PATCH 11/12] disable c# in grpc to work around --- .github/workflows/autobuild.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/autobuild.yaml b/.github/workflows/autobuild.yaml index f2cf650..78bed8d 100644 --- a/.github/workflows/autobuild.yaml +++ b/.github/workflows/autobuild.yaml @@ -282,6 +282,7 @@ jobs: cmake -G Ninja -S grpc -B grpc-build "-DgRPC_INSTALL=ON" + "-DgRPC_BUILD_CSHARP_EXT=OFF" "-DCMAKE_INSTALL_PREFIX=$HOME/grpc-installation" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_C_FLAGS_RELEASE=${{ matrix.config.cflags }}" From 02bdc51da59b272224276a33b4a7bfe13562e186 Mon Sep 17 00:00:00 2001 From: Kendell R Date: Thu, 21 Aug 2025 21:40:01 -0700 Subject: [PATCH 12/12] fix linking mismatch --- .github/workflows/autobuild.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/autobuild.yaml b/.github/workflows/autobuild.yaml index 78bed8d..e175c1e 100644 --- a/.github/workflows/autobuild.yaml +++ b/.github/workflows/autobuild.yaml @@ -223,7 +223,7 @@ jobs: "-DgRPC_CARES_PROVIDER=package" - name: linux-arm64 runner: ubuntu-24.04-arm - container: ubuntu:20.04 + container: ubuntu:24.04 preinstall: >- apt-get update && apt-get install -y ninja-build libz-dev libc-ares-dev wget clang-10