41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
build-windows:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Zig
|
|
uses: mlugg/setup-zig@v2
|
|
with:
|
|
version: master # pin to a specific version once stable
|
|
|
|
- name: Download LLVM 18
|
|
run: |
|
|
Invoke-WebRequest -Uri "https://github.com/vovkos/llvm-package-windows/releases/download/llvm-18.1.8/llvm-18.1.8-windows-amd64-msvc17-msvcrt.7z" -OutFile "$env:TEMP\llvm.7z"
|
|
7z x "$env:TEMP\llvm.7z" -oC:\LLVM
|
|
|
|
- name: Verify LLVM
|
|
run: |
|
|
Get-ChildItem C:\LLVM -Recurse -Name "*.lib" | Select-Object -First 5
|
|
Get-ChildItem C:\LLVM -Directory
|
|
|
|
- name: Build
|
|
run: zig build -Dstatic-llvm -Dllvm-prefix="C:\LLVM\llvm-18.1.8-windows-amd64-msvc17-msvcrt"
|
|
|
|
- name: Test
|
|
run: zig build test -Dstatic-llvm -Dllvm-prefix="C:\LLVM\llvm-18.1.8-windows-amd64-msvc17-msvcrt"
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: sx-windows-x86_64
|
|
path: zig-out/bin/
|