Skip to content

UI: Rework interface visibility flag #175

UI: Rework interface visibility flag

UI: Rework interface visibility flag #175

name: Windows MSYS Build
on:
push:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
env:
GH_CACHE_KEY: 8
jobs:
build:
strategy:
fail-fast: false
matrix:
env: [
#{sys: mingw32, build_type: Debug, arch: i686, arch_zip: x86, packages: "},
{sys: mingw64, build_type: Debug, arch: x86_64, arch_zip: x64, packages: "libbacktrace:p"},
{sys: mingw32, build_type: Release, arch: i686, arch_zip: x86, packages: ""},
{sys: mingw64, build_type: Release, arch: x86_64, arch_zip: x64, packages: "libbacktrace:p"},
]
name: ${{matrix.env.build_type}} ${{matrix.env.sys}}
if: github.event.pull_request.draft != true
defaults:
run:
shell: msys2 {0}
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: "${{matrix.env.sys}}"
install:
base-devel
wget
unzip
git
bash
mingw-w64-cross-winpthreads
pacboy:
ninja:p
gcc:p
cmake:p
make:p
SDL2:p
SDL2_image:p
SDL2_net:p
SDL2_mixer:p
boost:p
lld:p
libvpx:p
nasm:p
yasm:p
zlib:p
${{matrix.env.packages}}
- uses: actions/cache@v4
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' && matrix.env.arch_zip != ''
run: |
mkdir downloads
wget https://github.com/libsdl-org/SDL_image/releases/download/release-2.8.2/SDL2_image-2.8.2-win32-${{matrix.env.arch_zip}}.zip -O downloads/SDL2_image.zip
wget https://github.com/libsdl-org/SDL_mixer/releases/download/release-2.8.0/SDL2_mixer-2.8.0-win32-${{matrix.env.arch_zip}}.zip -O downloads/SDL2_mixer.zip
unzip downloads/SDL2_image.zip -d downloads/SDL2_image
unzip downloads/SDL2_mixer.zip -d downloads/SDL2_mixer
- name: ffmpeg -- download
if: steps.cache.outputs.cache-hit != 'true'
run: git clone --depth 1 --branch n6.1 https://git.ffmpeg.org/ffmpeg.git ffmpeg
- name: ffmpeg -- configure
if: steps.cache.outputs.cache-hit != 'true'
run: |
./configure \
--prefix=/${{matrix.env.sys}} \
--enable-static --disable-shared \
--disable-everything \
--enable-swscale \
--enable-swresample \
--enable-zlib \
--enable-libvpx \
--enable-demuxer=rawvideo,bink,matroska \
--enable-decoder=rawvideo,bink,binkaudio_dct,opus,vp8,vp9 \
--enable-parser=vp9 \
--enable-filter=aresample,aformat \
--enable-protocol=file \
--disable-d3d11va \
--disable-dxva2 \
--disable-vulkan \
--disable-network \
--disable-doc --disable-ffplay --disable-ffprobe --disable-ffmpeg \
--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
-S .. -B .
-DCMAKE_BUILD_TYPE=${{matrix.env.build_type}}
-DOPTION_LINKER=lld
-DOPTION_LINK_LIBS="bcrypt;winpthread.a"
working-directory: build
- name: perimeter -- make
run: ninja
working-directory: build
- name: perimeter -- prepare artifact folder
run: |
mkdir -p perimeter/bin
cp /${{matrix.env.sys}}/bin/SDL2.dll perimeter/bin/
cp /${{matrix.env.sys}}/bin/SDL2_net.dll perimeter/bin/
if [[ -n "${{matrix.env.arch_zip}}" ]]; then
cp downloads/SDL2_image/*.dll perimeter/bin/
cp downloads/SDL2_mixer/*.dll perimeter/bin/
else
cp /${{matrix.env.sys}}/bin/SDL2_image.dll perimeter/bin/
cp /${{matrix.env.sys}}/bin/SDL2_mixer.dll perimeter/bin/
fi
cp build/Source/perimeter.exe perimeter/bin/
- name: perimeter -- strip binary
run: strip -g -x perimeter/bin/perimeter.exe
if: matrix.env.build_type == 'Release'
- uses: actions/upload-artifact@v4
with:
name: Perimeter MSYS ${{matrix.env.build_type}} ${{matrix.env.sys}}
path: perimeter/bin/