forked from KD-lab-Open-Source/Perimeter
-
Notifications
You must be signed in to change notification settings - Fork 0
136 lines (133 loc) · 5.61 KB
/
windows_msys_build.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: Windows MSYS Build
on:
push:
pull_request:
env:
GH_CACHE_KEY: 6
jobs:
build:
strategy:
fail-fast: false
matrix:
env: [
#{bits: 32, build_type: Debug, arch: i686, arch_zip: x86},
{bits: 64, build_type: Debug, arch: x86_64, arch_zip: x64},
{bits: 32, build_type: Release, arch: i686, arch_zip: x86},
{bits: 64, build_type: Release, arch: x86_64, arch_zip: x64}
]
name: ${{matrix.env.build_type}} ${{matrix.env.bits}} bits
defaults:
run:
shell: msys2 {0}
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW${{matrix.env.bits}}
install:
mingw-w64-${{matrix.env.arch}}-ninja
mingw-w64-${{matrix.env.arch}}-gcc
mingw-w64-${{matrix.env.arch}}-cmake
mingw-w64-${{matrix.env.arch}}-make
mingw-w64-${{matrix.env.arch}}-SDL2
mingw-w64-${{matrix.env.arch}}-SDL2_image
mingw-w64-${{matrix.env.arch}}-SDL2_net
mingw-w64-${{matrix.env.arch}}-SDL2_mixer
mingw-w64-${{matrix.env.arch}}-boost
mingw-w64-${{matrix.env.arch}}-lld
mingw-w64-${{matrix.env.arch}}-libbacktrace
mingw-w64-${{matrix.env.arch}}-libvpx
mingw-w64-${{matrix.env.arch}}-nasm
mingw-w64-${{matrix.env.arch}}-yasm
mingw-w64-${{matrix.env.arch}}-zlib
base-devel
wget
unzip
git
bash
- uses: actions/cache@v2
id: cache
with:
path: |
${{ github.workspace }}\downloads
${{ github.workspace }}\ffmpeg
key: MSYS-${{matrix.env.arch}}-${{ env.GH_CACHE_KEY }}
- name: SDL2 binaries -- download
if: steps.cache.outputs.cache-hit != 'true'
run: |
mkdir downloads
wget https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.5-win32-${{matrix.env.arch_zip}}.zip -O downloads/SDL2_image.zip
wget https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.4-win32-${{matrix.env.arch_zip}}.zip -O downloads/SDL2_mixer.zip
- name: ffmpeg -- download
if: steps.cache.outputs.cache-hit != 'true'
run: git clone --depth 1 --branch n4.4.1 https://git.ffmpeg.org/ffmpeg.git ffmpeg
- name: ffmpeg -- configure
if: steps.cache.outputs.cache-hit != 'true'
run: |
./configure --enable-shared --prefix=/mingw${{matrix.env.bits}} \
--disable-everything \
--enable-swscale \
--enable-swresample \
--enable-zlib \
--enable-libvpx \
--enable-libvorbis \
--enable-demuxer=avi,rawvideo,bink,matroska \
--enable-decoder=png,rawvideo,bink,binkaudio_dct,vorbis,opus,vp8,vp9 \
--enable-parser=png,vp9 \
--enable-filter=aresample,aformat \
--enable-protocol=file \
--disable-d3d11va \
--disable-dxva2 \
--disable-doc --disable-ffplay --disable-ffprobe --disable-ffmpeg \
--disable-static --disable-bzlib --disable-libopenjpeg --disable-iconv
working-directory: ffmpeg
- name: ffmpeg -- build
if: steps.cache.outputs.cache-hit != 'true'
run: |
mingw32-make -j4
working-directory: ffmpeg
- name: ffmpeg -- install
run: |
mingw32-make install
working-directory: ffmpeg
- name: perimeter -- create build dir
run: mkdir build
- name: perimeter -- configure build
run: cmake -G Ninja .. -DCMAKE_BUILD_TYPE=${{matrix.env.build_type}}
working-directory: build
- name: perimeter -- make
run: ninja
working-directory: build
- name: perimeter -- prepare artifact folder
run: |
unzip downloads/SDL2_image.zip -d /SDL2_image
unzip downloads/SDL2_mixer.zip -d /SDL2_mixer
mkdir -p perimeter/bin
cp /mingw${{matrix.env.bits}}/bin/SDL2.dll perimeter/bin/
cp /mingw${{matrix.env.bits}}/bin/SDL2_net.dll perimeter/bin/
cp /mingw${{matrix.env.bits}}/bin/libgcc_*.dll perimeter/bin/
cp /mingw${{matrix.env.bits}}/bin/libstdc++-6.dll perimeter/bin/
cp /mingw${{matrix.env.bits}}/bin/libwinpthread-1.dll perimeter/bin/
#cp /mingw${{matrix.env.bits}}/bin/libbacktrace-0.dll perimeter/bin/
cp /mingw${{matrix.env.bits}}/bin/avcodec-58.dll perimeter/bin/
cp /mingw${{matrix.env.bits}}/bin/avfilter-7.dll perimeter/bin/
cp /mingw${{matrix.env.bits}}/bin/avformat-58.dll perimeter/bin/
cp /mingw${{matrix.env.bits}}/bin/avutil-56.dll perimeter/bin/
cp /mingw${{matrix.env.bits}}/bin/swscale-5.dll perimeter/bin/
cp /mingw${{matrix.env.bits}}/bin/swresample-3.dll perimeter/bin/
cp /mingw${{matrix.env.bits}}/bin/zlib1.dll perimeter/bin/
cp /SDL2_image/SDL2_image.dll perimeter/bin/
cp /SDL2_image/libjpeg-9.dll perimeter/bin/
cp /SDL2_image/libpng16-16.dll perimeter/bin/
cp /SDL2_mixer/SDL2_mixer.dll perimeter/bin/
cp /SDL2_mixer/libogg-0.dll perimeter/bin/
cp /SDL2_mixer/libvorbis-0.dll perimeter/bin/
cp /SDL2_mixer/libvorbisfile-3.dll perimeter/bin/
cp build/Source/perimeter.exe perimeter/bin/
- name: perimeter -- strip binary
run: strip -g -x perimeter/bin/perimeter.exe
- uses: actions/upload-artifact@v1
with:
name: Perimeter MSYS ${{matrix.env.build_type}} ${{matrix.env.bits}} bits
path: perimeter/bin/