Update project #81
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Windows | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
windows-test-build-release: | |
runs-on: windows-latest | |
steps: | |
# - uses: compnerd/gha-setup-swift@main | |
# with: | |
# branch: swift-5.7-release | |
# tag: 5.7-RELEASE | |
# - name: Checkout | |
# uses: actions/checkout@v3.5.2 | |
- name: Install dependencies, generate shims & copy libs | |
shell: pwsh | |
run: | | |
vcpkg install sdl2[core,vulkan] --recurse --triplet x64-windows | |
vcpkg integrate install | |
vcpkg install --triplet x64-windows pkgconf | |
echo "PKG_CONFIG=C:\vcpkg\installed\x64-windows\tools\pkgconf\pkgconf.exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
echo "PKG_CONFIG_PATH=C:\vcpkg\installed\x64-windows\lib\pkgconfig" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
$env:Path += ";C:\vcpkg\installed\x64-windows\tools\pkgconf\" | |
pkgconf --version | |
Copy-Item C:/vcpkg/packages/sdl2_x64-windows/debug/lib/pkgconfig/sdl2.pc C:\vcpkg\installed\x64-windows\lib\pkgconfig | |
pkgconf --list-all | |
pkgconf sdl2 --exists | |
pkgconf sdl2 --print-variables | |
# $includedir = (pkgconf --variable includedir sdl2).Trim() | |
# Write-Output ('#include "' + $includedir + '/SDL2/SDL.h"') > Sources/CSDL2/windows_generated.h | |
# Write-Output ('#include "' + $includedir + '/SDL2/SDL_vulkan.h"') >> Sources/CSDL2/windows_generated.h | |
# $bindir = ((pkgconf --variable exec_prefix sdl2).Trim() + "/bin") | |
# $libdir = (pkgconf --variable libdir sdl2).Trim() | |
# foreach ($config in "debug", "release") { | |
# $path = ".build/$config" | |
# if (Test-Path -Path $path) { | |
# Copy-Item ($bindir + '/SDL2.dll') $path | |
# Copy-Item ($libdir + '/SDL2.lib') $path | |
# } | |
# } | |
- name: Test | |
run: swift test | |
- name: Build Release | |
run: swift build -c release | |