Fixed artifact build #81
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: CI | |
on: [push, pull_request] | |
jobs: | |
build-windows: | |
runs-on: windows-2022 | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Setup WSL | |
uses: Vampire/[email protected] | |
- name: Restore vcpkg cache | |
uses: lukka/run-vcpkg@v10 | |
with: | |
vcpkgGitCommitId: 7977f0a771e64e9811d32aa30d9a247e09c39b2e | |
- name: Prepare environment | |
run: | | |
mkdir x64\Release | |
& $Env:VCPKG_ROOT\vcpkg integrate install | |
((Get-Content -path "$Env:VCPKG_ROOT\ports\poco\portfile.cmake") -replace "VCPKG_TARGET_IS_WINDOWS", "false") -replace "lib/cmake/Poco", "cmake" | Set-Content -Path "$Env:VCPKG_ROOT\ports\poco\portfile.cmake" | |
- name: Make CL code | |
shell: wsl-bash {0} | |
run: | | |
printf '// Generated automatically; do not edit!\n#include <string>\nnamespace OpenCL {std::string get_opencl_c_code() { return ' > src/cc-pixel-cl.cpp | |
sed -n -e '/#ifndef OPENCV/{:a; N; /#endif/!ba; d}; s/\\/\\\\/g; s/"/\\"/g; s/^/"/g; s/$/\\n"/g; p' src/cc-pixel.cpp >> src/cc-pixel-cl.cpp | |
echo ';}}' >> src/cc-pixel-cl.cpp | |
- name: Build sanjuuni | |
run: | | |
function Invoke-Environment { | |
param | |
( | |
# Any cmd shell command, normally a configuration batch file. | |
[Parameter(Mandatory=$true)] | |
[string] $Command | |
) | |
$Command = "`"" + $Command + "`"" | |
cmd /c "$Command > nul 2>&1 && set" | . { process { | |
if ($_ -match '^([^=]+)=(.*)') { | |
[System.Environment]::SetEnvironmentVariable($matches[1], $matches[2]) | |
} | |
}} | |
} | |
Invoke-Environment "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | |
msbuild "sanjuuni.sln" /p:Configuration=Release | |
copy 32vid-player.lua x64\Release\32vid-player.lua | |
copy bimg-player.lua x64\Release\bimg-player.lua | |
copy raw-player.lua x64\Release\raw-player.lua | |
copy websocket-player.lua x64\Release\websocket-player.lua | |
copy LICENSE x64\Release\LICENSE | |
# Remove buildtrees that kill the cache | |
Remove-Item vcpkg\buildtrees\* -Force -Recurse -ErrorAction SilentlyContinue | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: sanjuuni-Artifact | |
path: | | |
x64\Release\sanjuuni.exe | |
x64\Release\avcodec-59.dll | |
x64\Release\swresample-4.dll | |
x64\Release\avutil-57.dll | |
x64\Release\soxr.dll | |
x64\Release\libwebpmux.dll | |
x64\Release\libwebp.dll | |
x64\Release\libsharpyuv.dll | |
x64\Release\liblzma.dll | |
x64\Release\dav1d.dll | |
x64\Release\snappy.dll | |
x64\Release\libmp3lame.DLL | |
x64\Release\openjp2.dll | |
x64\Release\opus.dll | |
x64\Release\speex-1.dll | |
x64\Release\theoraenc.dll | |
x64\Release\ogg.dll | |
x64\Release\theoradec.dll | |
x64\Release\vorbis.dll | |
x64\Release\vorbisenc.dll | |
x64\Release\openh264-6.dll | |
x64\Release\zlib1.dll | |
x64\Release\avdevice-59.dll | |
x64\Release\avfilter-8.dll | |
x64\Release\swscale-6.dll | |
x64\Release\avformat-59.dll | |
x64\Release\bz2.dll | |
x64\Release\modplug.dll | |
x64\Release\OpenCL.dll | |
x64\Release\PocoFoundation.dll | |
x64\Release\pcre2-8.dll | |
x64\Release\PocoNet.dll | |
x64\Release\PocoNetSSL.dll | |
x64\Release\PocoCrypto.dll | |
x64\Release\libcrypto-3-x64.dll | |
x64\Release\PocoUtil.dll | |
x64\Release\PocoXML.dll | |
x64\Release\libexpat.dll | |
x64\Release\PocoJSON.dll | |
x64\Release\libssl-3-x64.dll | |
x64\Release\32vid-player.lua | |
x64\Release\bimg-player.lua | |
x64\Release\raw-player.lua | |
x64\Release\websocket-player.lua | |
x64\Release\LICENSE |