-
-
Notifications
You must be signed in to change notification settings - Fork 6
105 lines (99 loc) · 3.88 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
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