Skip to content

Commit 137ea85

Browse files
committed
feat(lsp): add release workflow and upgrade dependencies
Add GitHub Actions workflow for building and releasing LSP server binaries for Linux, Windows, and macOS (x64 and arm64). Upgrade workspace dependencies to latest versions including rayon, tokio, clap, and various other crates.
1 parent 09944f0 commit 137ea85

File tree

3 files changed

+230
-27
lines changed

3 files changed

+230
-27
lines changed

.github/workflows/release-lsp.yml

Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
name: Release LSP
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
release:
10+
name: Release LSP - ${{ matrix.os }} (${{ matrix.arch }})
11+
runs-on: ${{ matrix.runner }}
12+
strategy:
13+
matrix:
14+
include:
15+
- os: linux
16+
arch: x64
17+
runner: ubuntu-latest
18+
target: x86_64-unknown-linux-gnu
19+
binary_name: ci
20+
asset_name: ci-lsp-linux-x64
21+
- os: linux
22+
arch: arm64
23+
runner: ubuntu-latest
24+
target: aarch64-unknown-linux-gnu
25+
binary_name: ci
26+
asset_name: ci-lsp-linux-arm64
27+
- os: windows
28+
arch: x64
29+
runner: windows-latest
30+
target: x86_64-pc-windows-msvc
31+
binary_name: ci.exe
32+
asset_name: ci-lsp-windows-x64.exe
33+
- os: windows
34+
arch: arm64
35+
runner: windows-latest
36+
target: aarch64-pc-windows-msvc
37+
binary_name: ci.exe
38+
asset_name: ci-lsp-windows-arm64.exe
39+
- os: darwin
40+
arch: x64
41+
runner: macos-latest
42+
target: x86_64-apple-darwin
43+
binary_name: ci
44+
asset_name: ci-lsp-darwin-x64
45+
- os: darwin
46+
arch: arm64
47+
runner: macos-latest
48+
target: aarch64-apple-darwin
49+
binary_name: ci
50+
asset_name: ci-lsp-darwin-arm64
51+
52+
steps:
53+
- name: Checkout Source
54+
uses: actions/checkout@v4
55+
56+
- name: Set variables
57+
id: vars
58+
shell: bash
59+
run: |
60+
echo "package_name=$(sed -En 's/name[[:space:]]*=[[:space:]]*"([^"]+)"/\1/p' Cargo.toml | head -1)" >> $GITHUB_OUTPUT
61+
echo "package_version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
62+
63+
- name: Install Rust toolchain
64+
uses: dtolnay/rust-toolchain@stable
65+
with:
66+
targets: ${{ matrix.target }}
67+
68+
- name: Install cross-compilation tools (Linux ARM64)
69+
if: matrix.target == 'aarch64-unknown-linux-gnu'
70+
run: |
71+
sudo apt-get update
72+
sudo apt-get install -y gcc-aarch64-linux-gnu
73+
74+
- name: Configure cross-compilation (Linux ARM64)
75+
if: matrix.target == 'aarch64-unknown-linux-gnu'
76+
run: |
77+
echo "[target.aarch64-unknown-linux-gnu]" >> ~/.cargo/config.toml
78+
echo "linker = \"aarch64-linux-gnu-gcc\"" >> ~/.cargo/config.toml
79+
80+
- name: Cache cargo registry and build
81+
uses: actions/cache@v4
82+
with:
83+
path: |
84+
~/.cargo/registry
85+
~/.cargo/git
86+
target
87+
key: ${{ runner.os }}-${{ matrix.target }}-cargo-lsp-${{ hashFiles('**/Cargo.lock') }}
88+
restore-keys: |
89+
${{ runner.os }}-${{ matrix.target }}-cargo-lsp-
90+
91+
- name: Build release binary with LSP feature
92+
run: cargo build --release --features lsp --target ${{ matrix.target }}
93+
94+
- name: Upload binary as artifact
95+
uses: actions/upload-artifact@v4
96+
with:
97+
name: ${{ matrix.asset_name }}
98+
path: target/${{ matrix.target }}/release/${{ matrix.binary_name }}
99+
100+
create-release:
101+
name: Create LSP Release
102+
runs-on: ubuntu-latest
103+
needs: release
104+
steps:
105+
- name: Checkout Source
106+
uses: actions/checkout@v4
107+
108+
- name: Set variables
109+
id: vars
110+
run: |
111+
echo "package_name=$(sed -En 's/name[[:space:]]*=[[:space:]]*"([^"]+)"/\1/p' Cargo.toml | head -1)" >> $GITHUB_OUTPUT
112+
echo "package_version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
113+
114+
- name: Download all artifacts
115+
uses: actions/download-artifact@v4
116+
with:
117+
path: artifacts
118+
119+
- name: Remove Same Release
120+
uses: omarabid-forks/action-rollback@stable
121+
continue-on-error: true
122+
with:
123+
tag: ${{ steps.vars.outputs.package_version }}
124+
env:
125+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
126+
127+
- name: Create Release
128+
id: create-release
129+
uses: actions/create-release@latest
130+
env:
131+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
132+
with:
133+
tag_name: ${{ steps.vars.outputs.package_version }}
134+
release_name: LSP Server ${{ steps.vars.outputs.package_version }}
135+
body: ${{ steps.vars.outputs.package_name }} LSP Server - ${{ steps.vars.outputs.package_version }}
136+
draft: false
137+
prerelease: false
138+
139+
- name: Upload Linux x64 binary
140+
uses: actions/upload-release-asset@v1
141+
env:
142+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
143+
with:
144+
upload_url: ${{ steps.create-release.outputs.upload_url }}
145+
asset_path: artifacts/ci-lsp-linux-x64/ci
146+
asset_name: ci-lsp-linux-x64
147+
asset_content_type: application/octet-stream
148+
149+
- name: Upload Linux arm64 binary
150+
uses: actions/upload-release-asset@v1
151+
env:
152+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
153+
with:
154+
upload_url: ${{ steps.create-release.outputs.upload_url }}
155+
asset_path: artifacts/ci-lsp-linux-arm64/ci
156+
asset_name: ci-lsp-linux-arm64
157+
asset_content_type: application/octet-stream
158+
159+
- name: Upload Windows x64 binary
160+
uses: actions/upload-release-asset@v1
161+
env:
162+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
163+
with:
164+
upload_url: ${{ steps.create-release.outputs.upload_url }}
165+
asset_path: artifacts/ci-lsp-windows-x64.exe/ci.exe
166+
asset_name: ci-lsp-windows-x64.exe
167+
asset_content_type: application/octet-stream
168+
169+
- name: Upload Windows arm64 binary
170+
uses: actions/upload-release-asset@v1
171+
env:
172+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
173+
with:
174+
upload_url: ${{ steps.create-release.outputs.upload_url }}
175+
asset_path: artifacts/ci-lsp-windows-arm64.exe/ci.exe
176+
asset_name: ci-lsp-windows-arm64.exe
177+
asset_content_type: application/octet-stream
178+
179+
- name: Upload macOS x64 binary
180+
uses: actions/upload-release-asset@v1
181+
env:
182+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
183+
with:
184+
upload_url: ${{ steps.create-release.outputs.upload_url }}
185+
asset_path: artifacts/ci-lsp-darwin-x64/ci
186+
asset_name: ci-lsp-darwin-x64
187+
asset_content_type: application/octet-stream
188+
189+
- name: Upload macOS arm64 binary
190+
uses: actions/upload-release-asset@v1
191+
env:
192+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
193+
with:
194+
upload_url: ${{ steps.create-release.outputs.upload_url }}
195+
asset_path: artifacts/ci-lsp-darwin-arm64/ci
196+
asset_name: ci-lsp-darwin-arm64
197+
asset_content_type: application/octet-stream
198+
199+
- name: Purge artifacts
200+
uses: omarabid-forks/purge-artifacts@v1
201+
with:
202+
token: ${{ secrets.GITHUB_TOKEN }}
203+
expire-in: 0

Cargo.toml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,42 +4,42 @@ resolver = "2"
44

55
[workspace.dependencies]
66
# Shared dependencies
7-
rand = { version = "0.9.1", default-features = false }
8-
rayon = "1.10.0"
9-
human-panic = "2.0.2"
7+
rand = { version = "0.10.0", default-features = false }
8+
rayon = "1.11.0"
9+
human-panic = "2.0.6"
1010
better-panic = "0.3.0"
11-
log = "0.4.27"
12-
clap_complete = "4.5.54"
13-
ignore = "0.4.23"
14-
serde = { version = "1.0.219", features = ["derive"] }
15-
serde_json = "1.0.140"
11+
log = "0.4.29"
12+
clap_complete = "4.5.66"
13+
ignore = "0.4.25"
14+
serde = { version = "1.0.228", features = ["derive"] }
15+
serde_json = "1.0.149"
1616
bincode = { version = "2.0.1", features = ["serde"] }
17-
git2 = { version = "0.20.2", default-features = false }
17+
git2 = { version = "0.20.4", default-features = false }
1818
sha2 = { version = "0.10.9" }
19-
thiserror = "2.0.12"
20-
backtrace = "0.3.75"
21-
color-backtrace = "0.7.0"
22-
config = "0.15.11"
19+
thiserror = "2.0.18"
20+
backtrace = "0.3.76"
21+
color-backtrace = "0.7.2"
22+
config = "0.15.19"
2323
lazy_static = "1.5.0"
24-
slog = "2.7.0"
24+
slog = "2.8.2"
2525
slog-syslog = "0.13.0"
26-
slog-term = "2.9.1"
27-
slog-scope = "4.4.0"
26+
slog-term = "2.9.2"
27+
slog-scope = "4.4.1"
2828
slog-async = "2.8.0"
2929
slog-stdlog = "4.1.1"
3030
tabled = "0.20.0"
31-
terminal_size = "0.4.2"
32-
clap = { version = "4.5.40", features = ["cargo", "derive"] }
33-
chrono = { version = "0.4.41", features = ["serde"] }
31+
terminal_size = "0.4.3"
32+
clap = { version = "4.5.60", features = ["cargo", "derive"] }
33+
chrono = { version = "0.4.44", features = ["serde"] }
3434
tower-lsp = "0.20"
35-
tokio = { version = "1", features = ["full"] }
36-
url = "2.5"
35+
tokio = { version = "1.49.0", features = ["full"] }
36+
url = "2.5.8"
3737

3838
# Dev dependencies
39-
assert_cmd = "2.0.17"
40-
predicates = "3.1.3"
41-
tempfile = "3.20"
42-
criterion = { version = "0.6.0", features = ["html_reports"] }
39+
assert_cmd = "2.1.2"
40+
predicates = "3.1.4"
41+
tempfile = "3.26.0"
42+
criterion = { version = "0.8.2", features = ["html_reports"] }
4343

4444
[profile.dev]
4545
opt-level = 0

codeinput/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,14 @@ config = { workspace = true, optional = true }
8686
lazy_static = { workspace = true, optional = true }
8787
slog = { workspace = true, optional = true }
8888
slog-syslog = { version = "0.13.0", optional = true }
89-
slog-term = { version = "2.9.1", optional = true }
89+
slog-term = { version = "2.9.2", optional = true }
9090
slog-scope = { workspace = true, optional = true }
9191
slog-async = { workspace = true, optional = true }
9292
slog-stdlog = { workspace = true, optional = true }
9393
tabled = { workspace = true, optional = true }
9494
terminal_size = { workspace = true, optional = true }
9595
clap = { workspace = true, optional = true }
96-
chrono = { version = "0.4.41", features = ["serde"], optional = true }
96+
chrono = { version = "0.4.44", features = ["serde"], optional = true }
9797
tower-lsp = { workspace = true, optional = true }
9898
tokio = { workspace = true, optional = true }
9999
url = { workspace = true, optional = true }

0 commit comments

Comments
 (0)