Compare commits

..

14 Commits

Author SHA1 Message Date
Younan Zhang
30a8f963f7
[CI] Rename debug symbol names to avoid tripping up the auto-installer (#2441)
The auto-install logic (in the https://github.com/clangd/node-clangd repo)
downloads the first package that starts with `clangd-<platform>-`.

The previous naming of the debug symbols package would mean it matched
this pattern, and it could be downloaded by the auto-install process instead
of the actual binary package.
2025-07-10 21:27:40 -04:00
Kevin
8f26871294
Update autobuild.yaml (#2440)
Fix Windows CI builds.
2025-07-07 18:45:19 +02:00
InfinityWei
1e95a5944b
Upgrade clang version from clang-9 to clang-10 in Linux workflow (#2416)
Fixes https://github.com/clangd/clangd/issues/2415
2025-06-22 03:01:57 -04:00
InfinityWei
439b0626d1
Fix MacOS CI builds (#2354) 2025-04-02 02:18:35 -04:00
Kevin
cb1cfd5a92
Fix Linux CI builds (#2319)
- Use container: ubuntu:20.04 instead of container: ubuntu:18.04.
- Add `exp` to `lib_compat.h` to solve the GLIBC 2.29 dependency issue.

Fixes https://github.com/clangd/clangd/issues/2244
2025-02-09 02:05:11 -05:00
Nathan Ridge
8ea4a27f46
Use upload-artifact@v4 and download-artifact@v4 (#2306)
Fixes https://github.com/clangd/clangd/issues/2305
2025-01-31 02:24:44 -05:00
Nathan Ridge
0a7499759d
Use macos-13 image for Mac builds (#2304) 2025-01-30 10:05:47 -05:00
Younan Zhang
909659b1ba
Build PDB file for Windows (#1678)
This allows dumping human-readable backtrace symbols with line numbers.

Also limit the maximum link jobs to 1 to avoid OOM in CI.
2024-12-01 20:24:14 -05:00
InfinityWei
cb870db274
Bump upload-artifact and download-artifact version to v3 (#2141)
v1 and v2 have been deprecated and workflows that try to use them now fail
2024-09-13 00:53:36 -04:00
InfinityWei
ff6fd49148
Fix weekly snapshot releases (#2084)
The release was broken because the macos-latest image was upgraded from macos-12 to macos-14, resulting in AppleClang being updated from version 14 to 15. To resolve the problem, modify macos-latest back to macos-12.

Additionally, the Linux build now needs Python 3.8, and the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION environment variable enabled to keep using node 16.

Fixes #2028
2024-07-08 03:42:32 -04:00
ceron257
d5998e7fce Fixes #1793 - Fix runtime linkage 2023-11-17 13:29:30 +01:00
Kadir Cetinkaya
6e7f5968ba Use ubuntu-18.04 container to build linux binaries
Github action runners no longer support ubuntu-18.04 hosts and starting
with ubuntu-20.04 our binaries depend on glibc2.30, which is quite
recent. We're switching to building on ubuntu-18.04 containers instead
to not increase requirements.
2023-04-14 18:34:25 +02:00
Sam McCall
a729875fb1
Disable zstd (we don't use it)
This was leading to "library not loaded" errors on macs with no zstd
2022-09-15 20:06:18 +02:00
Kadir Cetinkaya
1a90fba271 Use windows-2019 explicitly in CI 2022-02-21 16:03:58 +01:00
3 changed files with 60 additions and 17 deletions

View File

@ -17,6 +17,9 @@ If you can, provide a minimal chunk of code that shows the problem (either inlin
Please attach the clangd stderr log if you can. (Usually available from the editor)
If possible, run with `--log=verbose` - note that the logs will include the contents of open files!
If this is a crash, try to put `llvm-symbolizer` on your PATH per the troubleshooting instructions.
(If you're using Windows, place the associated PDB file (debug symbols) in the same directory as
clangd.exe and rerun again. For official releases, download symbols from the
[release page](https://github.com/clangd/clangd/releases).)
**System information**

View File

@ -5,6 +5,8 @@
# Because the build takes more than an hour, our GITHUB_TOKEN credentials may
# expire. A token `secrets.RELEASE_TOKEN` must exist with public_repo scope.
name: Build release binaries
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
on:
# Run weekly on sunday at 21:37 UTC (arbitrary)
schedule:
@ -68,7 +70,7 @@ jobs:
run: >
echo "RELEASE_DESCRIPTION=Unstable snapshot of clangd on ${{ env.RELEASE_DATE }}." >> commit.env
- name: Upload result
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: env
path: commit.env
@ -85,7 +87,7 @@ jobs:
echo "RELEASE_NAME=${{ github.event.inputs.release_name }}" >> commit.env
echo "RELEASE_DESCRIPTION=${{ github.event.inputs.description }}" >> commit.env
- name: Upload result
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: env
path: commit.env
@ -99,10 +101,12 @@ jobs:
if: always() && (needs.schedule_environment.result == 'success' || needs.workflow_dispatch_environment.result == 'success')
steps:
- name: Fetch environment variables
uses: actions/download-artifact@v1
uses: actions/download-artifact@v4
with:
name:
env
path:
env
- name: Set environment variables
run: |
cat env/commit.env >> $GITHUB_ENV
@ -126,7 +130,7 @@ jobs:
echo "TAG_NAME=${{ env.TAG_NAME }}" >> release.env
echo "RELEASE_ID=${{ steps.create_release.outputs.id }}" >> release.env
- name: Upload result
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: release
path: release.env
@ -138,26 +142,27 @@ jobs:
name: Build ${{ matrix.config.name }}
needs: create_release
if: always() && needs.create_release.result == 'success'
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- name: windows
os: windows-latest
os: windows-2022
preinstall: choco install ninja nasm
vcvars: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
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"
"-DLLVM_USE_CRT_RELEASE=MT"
"-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
os: macos-latest
os: macos-13
preinstall: brew install ninja zlib p7zip
cflags: -O3 -gline-tables-only -DNDEBUG
cmake: >-
@ -165,17 +170,26 @@ jobs:
"-DCMAKE_CXX_COMPILER=clang++"
"-DLLVM_ENABLE_ZLIB=FORCE_ON"
"-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64"
"-DCMAKE_OSX_DEPLOYMENT_TARGET=10.9"
"-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13"
# BoringSSL doesn't support universal binaries when building with ASM.
grpc_cmake: >-
"-DOPENSSL_NO_ASM=ON"
- name: linux
os: ubuntu-18.04
preinstall: sudo apt-get install ninja-build libz-dev libc-ares-dev
os: ubuntu-latest
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"
"-DCMAKE_CXX_COMPILER=clang++"
"-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"
@ -184,6 +198,8 @@ jobs:
# libraries. All other gRPC dependencies can be built from sources.
grpc_cmake: >-
"-DgRPC_CARES_PROVIDER=package"
runs-on: ${{ matrix.config.os }}
container: ${{ matrix.config.container }}
steps:
- name: Clone scripts
uses: actions/checkout@v2
@ -229,15 +245,19 @@ jobs:
ninja -C grpc-build install
- name: Fetch target commit
uses: actions/download-artifact@v1
uses: actions/download-artifact@v4
with:
name:
env
path:
env
- name: Fetch release info
uses: actions/download-artifact@v1
uses: actions/download-artifact@v4
with:
name:
release
path:
release
- name: Put release info into env
run: |
cat env/commit.env >> $GITHUB_ENV
@ -273,6 +293,7 @@ jobs:
"-DCMAKE_C_FLAGS_RELEASE=${{ matrix.config.cflags }}"
"-DCMAKE_CXX_FLAGS_RELEASE=${{ matrix.config.cflags }}"
"-DCLANGD_ENABLE_REMOTE=ON"
"-DLLVM_ENABLE_ZSTD=OFF"
"-DGRPC_INSTALL_PATH=$HOME/grpc-installation"
${{ matrix.config.cmake }}
- name: Ninja
@ -290,6 +311,12 @@ jobs:
${{ env.CLANGD_DIR }}/LICENSE.TXT
${{ env.CLANGD_DIR }}/bin/clangd${{ matrix.config.binary_extension }}
${{ env.CLANGD_DIR }}/lib/clang
- name: Archive clangd PDB symbols
if: matrix.config.name == 'windows'
run: >
7z a clangd-pdb.7z -t7z -m0=LZMA2
${{ env.CLANGD_DIR }}/LICENSE.TXT
${{ env.CLANGD_DIR }}/bin/clangd.pdb
- name: Archive indexing-tools
run: >
7z a indexing-tools.zip
@ -307,6 +334,16 @@ jobs:
asset_name: clangd-${{ matrix.config.name }}-${{ env.TAG_NAME }}.zip
asset_path: clangd.zip
asset_content_type: application/zip
- name: Upload clangd PDB asset
if: matrix.config.name == 'windows'
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_name: clangd-debug-symbols-${{ matrix.config.name }}-${{ env.TAG_NAME }}.7z
asset_path: clangd-pdb.7z
asset_content_type: application/zip
- name: Upload indexing-tools asset
uses: actions/upload-release-asset@v1.0.1
env:
@ -326,10 +363,12 @@ jobs:
if: always() && needs.build.result == 'success'
steps:
- name: Fetch release info
uses: actions/download-artifact@v1
uses: actions/download-artifact@v4
with:
name:
release
path:
release
- name: Update the env variables
run: >
cat release/release.env >> $GITHUB_ENV

View File

@ -16,5 +16,6 @@ FORCE_SYMBOL_VERSION(expf, GLIBC_2.2.5);
FORCE_SYMBOL_VERSION(log, GLIBC_2.2.5);
FORCE_SYMBOL_VERSION(log2, GLIBC_2.2.5);
FORCE_SYMBOL_VERSION(pow, GLIBC_2.2.5);
FORCE_SYMBOL_VERSION(exp, GLIBC_2.2.5);
#undef FORCE_SYMBOL_VERSION