Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .claude/skills/upgrade-llvm/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ Download the artifact matching the development machine:

```bash
gh run view <RUN_ID>
gh run download <RUN_ID> -n x64-linux-gnu-releasedbg.tar.xz -D .llvm-download
gh run download <RUN_ID> -n x86_64-unknown-linux-gnu.releasedbg.tar.xz -D .llvm-download
mkdir -p .llvm
tar -xf .llvm-download/x64-linux-gnu-releasedbg.tar.xz -C .llvm
tar -xf .llvm-download/x86_64-unknown-linux-gnu.releasedbg.tar.xz -C .llvm
```

Configure clice to build against it:
Expand Down
31 changes: 10 additions & 21 deletions .github/workflows/build-llvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
required: true
type: string
patch_ref:
description: "clice-llvm ref for patches (default: main). Set to a release tag (e.g., 21.1.8+r2) to reproduce a previous build."
description: "clice-llvm ref for patches (default: main). Set to a release tag (e.g., 21.1.8+r3) to reproduce a previous build."
required: false
default: "main"
type: string
Expand Down Expand Up @@ -64,12 +64,12 @@ jobs:
- os: ubuntu-24.04
llvm_mode: RelWithDebInfo
lto: OFF
target_triple: aarch64-linux-gnu
target_triple: aarch64-unknown-linux-gnu
pixi_env: cross-linux-arm64
- os: ubuntu-24.04
llvm_mode: RelWithDebInfo
lto: ON
target_triple: aarch64-linux-gnu
target_triple: aarch64-unknown-linux-gnu
Comment thread
16bit-ykiko marked this conversation as resolved.
Resolved
pixi_env: cross-linux-arm64

# Windows arm64 (from x64 windows-2022)
Expand Down Expand Up @@ -201,32 +201,21 @@ jobs:
- name: Package LLVM install directory
shell: bash
run: |
# Determine platform/arch from target triple or runner OS
if [[ -n "${{ matrix.target_triple }}" ]]; then
case "${{ matrix.target_triple }}" in
x86_64-apple-darwin) PLATFORM="macos"; ARCH="x64" ;;
aarch64-linux-gnu) PLATFORM="linux"; ARCH="arm64" ;;
aarch64-pc-windows-msvc) PLATFORM="windows"; ARCH="arm64" ;;
esac
TRIPLE="${{ matrix.target_triple }}"
else
PLATFORM="linux"; ARCH="x64"
if [[ "${{ matrix.os }}" == windows-* ]]; then
PLATFORM="windows"
elif [[ "${{ matrix.os }}" == macos-* ]]; then
PLATFORM="macos"; ARCH="arm64"
fi
case "${{ matrix.os }}" in
ubuntu-*) TRIPLE="x86_64-unknown-linux-gnu" ;;
macos-*) TRIPLE="aarch64-apple-darwin" ;;
windows-*) TRIPLE="x86_64-pc-windows-msvc" ;;
esac
fi

case "$PLATFORM" in
linux) TOOLCHAIN="gnu" ;;
macos) TOOLCHAIN="clang" ;;
windows) TOOLCHAIN="msvc" ;;
esac
if [[ "${{ matrix.llvm_mode }}" == "Debug" ]]; then MODE_TAG="debug"; else MODE_TAG="releasedbg"; fi
SUFFIX=""
if [[ "${{ matrix.lto }}" == "ON" ]]; then SUFFIX+="-lto"; fi
if [[ "${{ matrix.llvm_mode }}" == "Debug" && "${{ matrix.os }}" != windows-* ]]; then SUFFIX+="-asan"; fi
ARCHIVE="${ARCH}-${PLATFORM}-${TOOLCHAIN}-${MODE_TAG}${SUFFIX}.tar.xz"
ARCHIVE="${TRIPLE}.${MODE_TAG}${SUFFIX}.tar.xz"
Comment thread
16bit-ykiko marked this conversation as resolved.
Resolved

set -eo pipefail
tar -C .llvm/build-install -cf - . | xz -T0 -9 -c > "${ARCHIVE}"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cross-pair.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ on:
target_triple:
required: true
type: string
# Unified arch-os-abi name (e.g. arm64-linux-gnu) used for artifact
# naming; the triple above keeps the compiler's spelling.
# Standard triple (e.g. aarch64-unknown-linux-gnu) used for artifact
# naming; matches the compiler triple.
target_name:
required: true
type: string
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/cross-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@ jobs:
build_os: macos-15
test_os: macos-15-intel
target_triple: x86_64-apple-darwin
target_name: x64-macos-darwin
asset_name: clice-x64-macos-darwin.tar.gz
target_name: x86_64-apple-darwin
asset_name: clice.x86_64-apple-darwin.tar.gz

linux-arm64:
uses: ./.github/workflows/cross-pair.yml
with:
build_os: ubuntu-24.04
test_os: ubuntu-24.04-arm
target_triple: aarch64-linux-gnu
target_name: arm64-linux-gnu
target_triple: aarch64-unknown-linux-gnu
target_name: aarch64-unknown-linux-gnu
pixi_env: cross-linux-arm64
asset_name: clice-arm64-linux-gnu.tar.gz
asset_name: clice.aarch64-unknown-linux-gnu.tar.gz
Comment thread
16bit-ykiko marked this conversation as resolved.
Resolved

windows-arm64:
uses: ./.github/workflows/cross-pair.yml
with:
build_os: windows-2025
test_os: windows-11-arm
target_triple: aarch64-pc-windows-msvc
target_name: arm64-windows-msvc
asset_name: clice-arm64-windows-msvc.zip
target_name: aarch64-pc-windows-msvc
asset_name: clice.aarch64-pc-windows-msvc.zip
pixi_env: cross-windows-arm64
12 changes: 6 additions & 6 deletions .github/workflows/native-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ jobs:
# release artifacts once their test suites pass.
- os: windows-2025
build_type: RelWithDebInfo
asset_name: clice-x64-windows-msvc.zip
target_name: x64-windows-msvc
asset_name: clice.x86_64-pc-windows-msvc.zip
target_name: x86_64-pc-windows-msvc
- os: ubuntu-24.04
build_type: Debug
- os: ubuntu-24.04
build_type: RelWithDebInfo
asset_name: clice-x64-linux-gnu.tar.gz
target_name: x64-linux-gnu
asset_name: clice.x86_64-unknown-linux-gnu.tar.gz
target_name: x86_64-unknown-linux-gnu
- os: macos-15
build_type: Debug
- os: macos-15
build_type: RelWithDebInfo
asset_name: clice-arm64-macos-darwin.tar.gz
target_name: arm64-macos-darwin
asset_name: clice.aarch64-apple-darwin.tar.gz
target_name: aarch64-apple-darwin
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
for RUN in $(gh run list --repo "$GITHUB_REPOSITORY" --workflow main \
--branch main --event push --status success --limit 100 \
--json databaseId -q '.[].databaseId'); do
LIVE=$(gh api "repos/$GITHUB_REPOSITORY/actions/runs/$RUN/artifacts?name=package-clice-x64-linux-gnu.tar.gz" \
LIVE=$(gh api "repos/$GITHUB_REPOSITORY/actions/runs/$RUN/artifacts?name=package-clice.x86_64-unknown-linux-gnu.tar.gz" \
--jq '[.artifacts[] | select(.expired | not)] | length')
if [ "$LIVE" -gt 0 ]; then
COMMIT=$(gh run view "$RUN" --repo "$GITHUB_REPOSITORY" \
Expand Down Expand Up @@ -130,17 +130,17 @@ jobs:
echo "| Platform | Server | VS Code extension | Symbols |"
echo "| --- | --- | --- | --- |"
row() {
PKG="clice-$2.$3"
SYM="clice-$2.symbols.$4"
VSIX="clice-$5-$V.vsix"
PKG="clice-$V.$2.$3"
SYM="clice-$V.$2.symbols.$4"
VSIX="clice-$V.$2.vsix"
echo "| $1 | [$PKG]($URL/$PKG) | [$VSIX]($URL/$VSIX) | [$SYM]($URL/$SYM) |"
}
row "Linux x64" x64-linux-gnu tar.gz tar.xz linux-x64
row "Linux arm64" arm64-linux-gnu tar.gz tar.xz linux-arm64
row "macOS arm64" arm64-macos-darwin tar.gz tar.xz darwin-arm64
row "macOS x64" x64-macos-darwin tar.gz tar.xz darwin-x64
row "Windows x64" x64-windows-msvc zip zip win32-x64
row "Windows arm64" arm64-windows-msvc zip zip win32-arm64
row "Linux x64" x86_64-unknown-linux-gnu tar.gz tar.xz
row "Linux arm64" aarch64-unknown-linux-gnu tar.gz tar.xz
row "macOS arm64" aarch64-apple-darwin tar.gz tar.xz
row "macOS x64" x86_64-apple-darwin tar.gz tar.xz
row "Windows x64" x86_64-pc-windows-msvc zip zip
row "Windows arm64" aarch64-pc-windows-msvc zip zip
echo
echo "Symbol packages hold GSYM data for crash log symbolization"
echo "via \`scripts/symbolize.py\`. VS Code users on the Marketplace"
Expand Down
59 changes: 35 additions & 24 deletions .github/workflows/publish-clice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
# runs (e.g. docs-only commits) skip the build jobs, and package
# artifacts expire after 30 days. Fail here with one clear message
# instead of in six download jobs.
LIVE=$(gh api "repos/$GITHUB_REPOSITORY/actions/runs/$RUN_ID/artifacts?name=package-clice-x64-linux-gnu.tar.gz" \
LIVE=$(gh api "repos/$GITHUB_REPOSITORY/actions/runs/$RUN_ID/artifacts?name=package-clice.x86_64-unknown-linux-gnu.tar.gz" \
--jq '[.artifacts[] | select(.expired | not)] | length')
Comment thread
16bit-ykiko marked this conversation as resolved.
Resolved
if [ "$LIVE" -eq 0 ]; then
echo "::error::run $RUN_ID for $TAG has no live package artifacts (path-filtered build, or expired after 30 days) — rerun that commit's main workflow first"
Expand All @@ -70,18 +70,24 @@ jobs:
fail-fast: false
matrix:
include:
- asset_name: clice-x64-linux-gnu.tar.gz
symbol_asset_name: clice-x64-linux-gnu.symbols.tar.xz
- asset_name: clice-arm64-linux-gnu.tar.gz
symbol_asset_name: clice-arm64-linux-gnu.symbols.tar.xz
- asset_name: clice-arm64-macos-darwin.tar.gz
symbol_asset_name: clice-arm64-macos-darwin.symbols.tar.xz
- asset_name: clice-x64-macos-darwin.tar.gz
symbol_asset_name: clice-x64-macos-darwin.symbols.tar.xz
- asset_name: clice-x64-windows-msvc.zip
symbol_asset_name: clice-x64-windows-msvc.symbols.zip
- asset_name: clice-arm64-windows-msvc.zip
symbol_asset_name: clice-arm64-windows-msvc.symbols.zip
- triple: x86_64-unknown-linux-gnu
ext: tar.gz
symbol_ext: tar.xz
- triple: aarch64-unknown-linux-gnu
ext: tar.gz
symbol_ext: tar.xz
- triple: aarch64-apple-darwin
ext: tar.gz
symbol_ext: tar.xz
- triple: x86_64-apple-darwin
ext: tar.gz
symbol_ext: tar.xz
- triple: x86_64-pc-windows-msvc
ext: zip
symbol_ext: zip
- triple: aarch64-pc-windows-msvc
ext: zip
symbol_ext: zip
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -92,35 +98,40 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh run download "${{ needs.locate.outputs.run_id }}" \
--repo "$GITHUB_REPOSITORY" -n "package-${{ matrix.asset_name }}" -D pkg
--repo "$GITHUB_REPOSITORY" -n "package-clice.${{ matrix.triple }}.${{ matrix.ext }}" -D pkg

- name: Upload assets to the release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_TAG: ${{ inputs.release_tag }}
run: |
VERSION="${RELEASE_TAG#v}"
ASSET="clice-${VERSION}.${{ matrix.triple }}.${{ matrix.ext }}"
SYMBOL_ASSET="clice-${VERSION}.${{ matrix.triple }}.symbols.${{ matrix.symbol_ext }}"
cd pkg
mv clice.tar.gz "${{ matrix.asset_name }}" 2>/dev/null || mv clice.zip "${{ matrix.asset_name }}"
mv clice-symbol.tar.xz "${{ matrix.symbol_asset_name }}" 2>/dev/null \
|| mv clice-symbol.zip "${{ matrix.symbol_asset_name }}"
mv clice.tar.gz "$ASSET" 2>/dev/null || mv clice.zip "$ASSET"
mv clice-symbol.tar.xz "$SYMBOL_ASSET" 2>/dev/null \
|| mv clice-symbol.zip "$SYMBOL_ASSET"
gh release upload "$RELEASE_TAG" --repo "$GITHUB_REPOSITORY" \
--clobber "${{ matrix.asset_name }}" "${{ matrix.symbol_asset_name }}"
--clobber "$ASSET" "$SYMBOL_ASSET"

# Bridge for publish-vscode.yml: make the package available as an
# artifact of the current run, with the original inner file names the
# Bridge for publish-vscode.yml: restore the inner file names the
# staging step expects.
- name: Restore inner file names
env:
RELEASE_TAG: ${{ inputs.release_tag }}
run: |
VERSION="${RELEASE_TAG#v}"
cd pkg
case "${{ matrix.asset_name }}" in
*.zip) mv "${{ matrix.asset_name }}" clice.zip ;;
*) mv "${{ matrix.asset_name }}" clice.tar.gz ;;
case "${{ matrix.ext }}" in
zip) mv "clice-${VERSION}.${{ matrix.triple }}.zip" clice.zip ;;
*) mv "clice-${VERSION}.${{ matrix.triple }}.tar.gz" clice.tar.gz ;;
esac

- name: Re-upload package artifact
uses: actions/upload-artifact@v7
with:
name: package-${{ matrix.asset_name }}
name: package-clice.${{ matrix.triple }}.${{ matrix.ext }}
path: |
pkg/clice.tar.gz
pkg/clice.zip
Expand Down
40 changes: 29 additions & 11 deletions .github/workflows/publish-vscode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,29 @@ jobs:
matrix:
include:
- vsce_target: linux-x64
package_artifact: package-clice-x64-linux-gnu.tar.gz
triple: x86_64-unknown-linux-gnu
ext: tar.gz
build_artifact: native-build-ubuntu-24.04-RelWithDebInfo
- vsce_target: linux-arm64
package_artifact: package-clice-arm64-linux-gnu.tar.gz
build_artifact: cross-build-arm64-linux-gnu
triple: aarch64-unknown-linux-gnu
ext: tar.gz
build_artifact: cross-build-aarch64-unknown-linux-gnu
- vsce_target: darwin-arm64
package_artifact: package-clice-arm64-macos-darwin.tar.gz
triple: aarch64-apple-darwin
ext: tar.gz
build_artifact: native-build-macos-15-RelWithDebInfo
- vsce_target: darwin-x64
package_artifact: package-clice-x64-macos-darwin.tar.gz
build_artifact: cross-build-x64-macos-darwin
triple: x86_64-apple-darwin
ext: tar.gz
build_artifact: cross-build-x86_64-apple-darwin
- vsce_target: win32-x64
package_artifact: package-clice-x64-windows-msvc.zip
triple: x86_64-pc-windows-msvc
ext: zip
build_artifact: native-build-windows-2025-RelWithDebInfo
- vsce_target: win32-arm64
package_artifact: package-clice-arm64-windows-msvc.zip
build_artifact: cross-build-arm64-windows-msvc
triple: aarch64-pc-windows-msvc
ext: zip
build_artifact: cross-build-aarch64-pc-windows-msvc

runs-on: ubuntu-latest

Expand All @@ -86,7 +92,7 @@ jobs:
- name: Download server binaries
uses: actions/download-artifact@v8
with:
name: ${{ inputs.source == 'package' && matrix.package_artifact || matrix.build_artifact }}
name: ${{ inputs.source == 'package' && format('package-clice.{0}.{1}', matrix.triple, matrix.ext) || matrix.build_artifact }}
path: /tmp/server

# Both sources end up as editors/vscode/clice/{bin,lib/clang,...}, the
Expand Down Expand Up @@ -133,10 +139,22 @@ jobs:
EOF
fi

- name: Determine vsix output name
id: vsix
env:
RELEASE_TAG: ${{ inputs.release_tag || (startsWith(github.ref, 'refs/tags/v') && github.ref_name || '') }}
run: |
if [ -n "$RELEASE_TAG" ]; then
VERSION="${RELEASE_TAG#v}"
echo "out=-o clice-${VERSION}.${{ matrix.triple }}.vsix" >> "$GITHUB_OUTPUT"
else
echo "out=" >> "$GITHUB_OUTPUT"
fi

- name: Package platform extension
run: |
FLAG="${{ (inputs.prerelease || contains(github.ref_name, '-')) && '--pre-release' || '' }}"
pixi run build-vscode $FLAG --target ${{ matrix.vsce_target }}
pixi run build-vscode $FLAG --target ${{ matrix.vsce_target }} ${{ steps.vsix.outputs.out }}
Comment thread
16bit-ykiko marked this conversation as resolved.
Resolved

- name: Upload vsix artifact
uses: actions/upload-artifact@v7
Expand Down
Loading
Loading