Skip to content

Commit f5351a7

Browse files
committed
Add Windows build to binary release workflow
- Add build-windows job to build clang and clangd for Windows x86_64 - Uses PowerShell syntax for cmake configuration - Produces clang-nullsafe-windows-x86_64.tar.gz with clang.exe and clangd.exe - Now building for all three major platforms: Linux, macOS, and Windows
1 parent b4ed617 commit f5351a7

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

.github/workflows/build-clang.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,3 +159,73 @@ jobs:
159159
See the [README](https://github.com/cs01/llvm-project/blob/null-safe-c-dev/README.md) for usage instructions.
160160
env:
161161
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
162+
163+
build-windows:
164+
runs-on: windows-latest
165+
166+
steps:
167+
- name: Checkout code
168+
uses: actions/checkout@v4
169+
170+
- name: Install dependencies
171+
run: |
172+
choco install ninja cmake
173+
174+
- name: Configure build
175+
run: |
176+
mkdir build
177+
cd build
178+
cmake -G Ninja `
179+
-DCMAKE_BUILD_TYPE=Release `
180+
-DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" `
181+
-DLLVM_TARGETS_TO_BUILD="X86" `
182+
-DLLVM_ENABLE_ASSERTIONS=OFF `
183+
-DCMAKE_INSTALL_PREFIX=../install `
184+
../llvm
185+
186+
- name: Build Clang and clangd
187+
run: |
188+
cd build
189+
ninja clang clangd
190+
191+
- name: Install Clang and clangd
192+
run: |
193+
cd build
194+
ninja install-clang
195+
ninja install-clang-headers
196+
ninja install-clangd
197+
198+
- name: Package binaries
199+
run: |
200+
cd install
201+
tar -czf clang-nullsafe-windows-x86_64.tar.gz bin/ lib/clang/
202+
203+
- name: Upload artifact
204+
uses: actions/upload-artifact@v4
205+
with:
206+
name: clang-nullsafe-windows-x86_64
207+
path: install/clang-nullsafe-windows-x86_64.tar.gz
208+
209+
- name: Create Release
210+
uses: softprops/action-gh-release@v1
211+
with:
212+
files: install/clang-nullsafe-windows-x86_64.tar.gz
213+
body: |
214+
## Null-Safe Clang Binary Release (Windows)
215+
216+
This release contains the Null-Safe Clang compiler and clangd language server for Windows x86_64.
217+
218+
### What's included:
219+
- `clang.exe` - The Null-Safe C compiler
220+
- `clangd.exe` - Language server for IDE integration (VSCode, vim, etc.)
221+
222+
### Installation:
223+
```bash
224+
tar -xzf clang-nullsafe-windows-x86_64.tar.gz
225+
# Add bin/ directory to your PATH
226+
clang --version
227+
```
228+
229+
See the [README](https://github.com/cs01/llvm-project/blob/null-safe-c-dev/README.md) for usage instructions.
230+
env:
231+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)