ci: progress towards building on windows again
This commit is contained in:
parent
66192daf6c
commit
6d7b83b1c2
|
@ -4,6 +4,7 @@ on:
|
|||
push:
|
||||
paths:
|
||||
- "**.zig"
|
||||
- "dl_sdl2.ps1"
|
||||
branches:
|
||||
- main
|
||||
schedule:
|
||||
|
@ -20,7 +21,12 @@ jobs:
|
|||
steps:
|
||||
- uses: goto-bus-stop/setup-zig@v2
|
||||
with:
|
||||
version: 0.11.0
|
||||
version: 0.12.0-dev.2063+804cee3b9
|
||||
- run: |
|
||||
git config --global core.autocrlf false
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: prepare-linux
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
|
@ -29,16 +35,11 @@ jobs:
|
|||
- name: prepare-windows
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
vcpkg integrate install
|
||||
vcpkg install sdl2:x64-windows
|
||||
git config --global core.autocrlf false
|
||||
.\dl_sdl2.ps1
|
||||
- name: prepare-macos
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
brew install sdl2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: build
|
||||
run: zig build -Doptimize=ReleaseSafe -Dcpu=baseline
|
||||
- name: prepare-executable
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
.hash = "12207da7e1f5d6180666db9575f84373055b230cb4259a4b6310562293338dc10b9d",
|
||||
},
|
||||
.@"zba-gdbstub" = .{
|
||||
.url = "https://git.musuka.dev/paoda/zba-gdbstub/archive/8c3a166a5daa453c3627dda42bc169c20a470c68.tar.gz",
|
||||
.hash = "12201dd0f0ae0c9efc8928aedd6970738f146675b2b9cbe8190177e37d1d849a6b6d",
|
||||
.url = "https://git.musuka.dev/paoda/zba-gdbstub/archive/8d2c76e410357166f092008ff5c7f7f097a043a7.tar.gz",
|
||||
.hash = "1220a171c7e14769386e3f4aab6aed53b5e176d654bdf1428a15b972effed750bf30",
|
||||
},
|
||||
.tomlz = .{
|
||||
.url = "https://github.com/paoda/tomlz/archive/f0aebccc31d48a131e57108cb05c8acfe4991eb8.tar.gz",
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
$SDL2Version = "2.30.0"
|
||||
$ArchiveFile = ".\SDL2-devel-mingw.zip"
|
||||
$Json = @"
|
||||
{
|
||||
"x86_64-windows-gnu": {
|
||||
"include": "SDL2\\include",
|
||||
"libs": "SDL2\\lib",
|
||||
"bin": "SDL2\\bin"
|
||||
}
|
||||
}
|
||||
"@
|
||||
|
||||
New-Item -Force -ItemType Directory -Path .\.build_config
|
||||
Set-Location -Path .build_config -PassThru
|
||||
|
||||
if (!(Test-Path -PathType Leaf $ArchiveFile)) {
|
||||
Invoke-WebRequest "https://github.com/libsdl-org/SDL/releases/download/release-$SDL2Version/SDL2-devel-$SDL2Version-mingw.zip" -OutFile $ArchiveFile
|
||||
}
|
||||
|
||||
Expand-Archive $ArchiveFile
|
||||
|
||||
if (Test-Path -PathType Leaf .\SDL2) {
|
||||
Remove-Item -Recurse .\SDL2
|
||||
}
|
||||
|
||||
New-Item -Force -ItemType Directory -Path .\SDL2
|
||||
Get-ChildItem -Path ".\SDL2-devel-mingw\SDL2-$SDL2Version\x86_64-w64-mingw32" | Move-Item -Destination .\SDL2
|
||||
|
||||
New-Item -Force .\sdl.json -Value $Json
|
||||
|
||||
Remove-Item -Recurse .\SDL2-devel-mingw
|
||||
Set-Location -Path .. -PassThru
|
Loading…
Reference in New Issue