Merge pull request #91 from ivan-ushakov/steamworks-sdk-integration-l… #11
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: macOS | |
on: | |
push: | |
branches: [ cmake ] | |
pull_request: | |
branches: [ cmake ] | |
env: | |
BUILD_TYPE: RelWithDebInfo | |
GH_CACHE_KEY: 3 | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- name: Install dependencies | |
run: brew install cmake nasm ninja zlib | |
- uses: actions/cache@v3 | |
id: cache | |
with: | |
path: | | |
${{github.workspace}}/3rdparty/SDL-2.26.5 | |
${{github.workspace}}/3rdparty/FFmpeg-n4.3.6 | |
key: ${{runner.os}}-${{env.GH_CACHE_KEY}} | |
- name: SDL -- download | |
if: steps.cache.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.outputs.cache-hit != 'true' | |
run: cmake -B cmake-build-release -DCMAKE_BUILD_TYPE=Release -DSDL_SHARED=0 -DSDL_STATIC=1 -DSDL_TEST=0 -DCMAKE_INSTALL_PREFIX=target-release | |
working-directory: SDL | |
- name: SDL -- build and install | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: | | |
cmake --build cmake-build-release --target install | |
mkdir -p ${{github.workspace}}/3rdparty/SDL-2.26.5 | |
cp -r target-release/include ${{github.workspace}}/3rdparty/SDL-2.26.5/ | |
cp -r target-release/lib ${{github.workspace}}/3rdparty/SDL-2.26.5/ | |
working-directory: SDL | |
- name: ffmpeg -- download | |
if: steps.cache.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.outputs.cache-hit != 'true' | |
run: ./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.outputs.cache-hit != 'true' | |
run: | | |
make -j4 | |
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 | |
- name: Game -- configure | |
run: cmake -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
- name: Game -- build | |
run: ninja | |
working-directory: ${{github.workspace}}/build | |
- name: Upload a Build Artifact | |
uses: actions/[email protected] | |
with: | |
name: moonshine-runners-macos | |
path: build/MechoSoma/moonshine-runners.app |