-
Notifications
You must be signed in to change notification settings - Fork 20
108 lines (102 loc) · 3.47 KB
/
windows.yaml
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
106
107
108
name: Windows
on:
push:
branches: [ cmake ]
pull_request:
branches: [ cmake ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: mingw build
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
base-devel
git
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-cmake
mingw-w64-x86_64-nasm
mingw-w64-x86_64-libjpeg-turbo
unzip
- name: SDL -- cache
id: cache-sdl
uses: actions/cache@v3
with:
path: ${{github.workspace}}/3rdparty/SDL-2.26.5
key: ${{ runner.os }}-sdl-2.26.5
- name: SDL -- download
if: steps.cache-sdl.outputs.cache-hit != 'true'
run: git clone --depth 1 --branch release-2.26.5 https://github.com/libsdl-org/SDL.git SDL
- name: SDL -- configure
if: steps.cache-sdl.outputs.cache-hit != 'true'
run: msys2 -c 'cmake -B cmake-build-debug -DSDL_SHARED=0 -DSDL_STATIC=1 -DSDL_TEST=0 -DCMAKE_INSTALL_PREFIX=target-debug'
working-directory: SDL
- name: SDL -- build and install
if: steps.cache-sdl.outputs.cache-hit != 'true'
run: |
msys2 -c 'cmake --build cmake-build-debug --target install'
mkdir -p ${{github.workspace}}/3rdparty/SDL-2.26.5
cp -r target-debug/include ${{github.workspace}}/3rdparty/SDL-2.26.5/
cp -r target-debug/lib ${{github.workspace}}/3rdparty/SDL-2.26.5/
working-directory: SDL
- name: ffmpeg -- cache
id: cache-ffmpeg
uses: actions/cache@v3
with:
path: ${{github.workspace}}/3rdparty/FFmpeg-n4.3.6
key: ${{ runner.os }}-ffmpeg-n4.3.6
- name: ffmpeg -- download
if: steps.cache-ffmpeg.outputs.cache-hit != 'true'
run: |
git clone --depth 1 --branch n4.3.6 https://git.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
git apply ${{github.workspace}}/avcodec-x86-mathops.patch
- name: ffmpeg -- configure
if: steps.cache-ffmpeg.outputs.cache-hit != 'true'
run: msys2 -c './configure
--prefix=build
--disable-programs
--disable-doc
--disable-avdevice
--disable-avfilter
--disable-network
--disable-pixelutils
--disable-everything
--enable-decoder=pcm_s16le,mpc7
--enable-demuxer=wav,mpc
--enable-protocol=file'
working-directory: ffmpeg
- name: ffmpeg -- build and install
if: steps.cache-ffmpeg.outputs.cache-hit != 'true'
run: |
msys2 -c 'mingw32-make -j4'
msys2 -c 'mingw32-make install'
mkdir -p ${{github.workspace}}/3rdparty/FFmpeg-n4.3.6
cp -r build/include ${{github.workspace}}/3rdparty/FFmpeg-n4.3.6/
cp -r build/lib ${{github.workspace}}/3rdparty/FFmpeg-n4.3.6/
working-directory: ffmpeg
- shell: msys2 {0}
run: |
mkdir build-mingw
cd build-mingw
cmake -G "Unix Makefiles" ..
make -j4
cd ..
- name: prepare release folder
run: |
msys2 -c 'cp /mingw64/bin/libiconv-2.dll build-mingw/MechoSoma/'
msys2 -c 'cp /mingw64/bin/zlib1.dll build-mingw/MechoSoma/'
msys2 -c 'cp /mingw64/bin/libgcc_s_seh-1.dll build-mingw/MechoSoma/'
- name: publish artifact
uses: actions/upload-artifact@v2
with:
name: Mechosoma
path: |
build-mingw/MechoSoma/moonshine-runners.exe
build-mingw/MechoSoma/*.dll