mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
inital windows build support
This commit is contained in:
35
.github/workflows/test.yml
vendored
35
.github/workflows/test.yml
vendored
@ -68,6 +68,41 @@ jobs:
|
||||
- name: Build Ghostty.app
|
||||
run: cd macos && xcodebuild
|
||||
|
||||
build-windows:
|
||||
runs-on: windows-2019
|
||||
# this will not stop other jobs from running
|
||||
continue-on-error: true
|
||||
needs: test
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
# This could be from a script if we wanted to but inlining here for now
|
||||
# in one place.
|
||||
# Using powershell so that we do not need to install WSL components. Also,
|
||||
# WSLv1 is only installed on Github runners.
|
||||
- name: Install zig
|
||||
shell: pwsh
|
||||
run: |
|
||||
# Get the zig version from build.zig so that it only needs to be updated
|
||||
$fileContent = Get-Content -Path "build.zig" -Raw
|
||||
$pattern = 'const required_zig = "(.*?)";'
|
||||
$zigVersion = [regex]::Match($fileContent, $pattern).Groups[1].Value
|
||||
Write-Output $version
|
||||
$version = "zig-windows-x86_64-$zigVersion"
|
||||
$uri = "https://ziglang.org/builds/$version.zip"
|
||||
Invoke-WebRequest -Uri "$uri" -OutFile ".\zig-windows.zip"
|
||||
Expand-Archive -Path ".\zig-windows.zip" -DestinationPath ".\" -Force
|
||||
Remove-Item -Path ".\zig-windows.zip"
|
||||
Rename-Item -Path ".\$version" -NewName ".\zig"
|
||||
Write-Host "Zig installed."
|
||||
./zig/zig.exe version
|
||||
- name: Test Windows
|
||||
shell: pwsh
|
||||
run: ./zig/zig.exe build test
|
||||
|
||||
test:
|
||||
strategy:
|
||||
matrix:
|
||||
|
Reference in New Issue
Block a user