Skip to content

[3D] windows link fix #724

[3D] windows link fix

[3D] windows link fix #724

name: Vangers MacOS Build
on: [push, pull_request]
env:
MACOSX_DEPLOYMENT_TARGET: 11
env:

Check failure on line 7 in .github/workflows/vangers_macos_build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/vangers_macos_build.yml

Invalid workflow file

You have an error in your yaml syntax on line 7
VANGE_RS_REF: adf17c6b563b2b236847a04b5f8df3023b1d1b5b
jobs:
build:
runs-on: macos-11
steps:
- uses: actions/checkout@v2
# - name: update repos
# run: |
# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
# brew update
- name: install libs
run: |
brew install ninja yasm dylibbundler sdl2 sdl2_net libvorbis libogg libsndfile
- name: install rustup toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
# TODO
# - name: vange-rs -- cache build
# uses: actions/cache@v2
# id: vange-rs-cache-build
# with:
# path: vange-rs/target/release/libvangers_ffi.a
# key: ${{ env.VANGE_RS_REF }}
- name: vange-rs -- download
uses: actions/checkout@v2
with:
repository: kvark/vange-rs
ref: ${{ env.VANGE_RS_REF }}
path: vange-rs
- name: vange-rs -- build
run: cargo build --release --features env_logger
working-directory: vange-rs/lib/ffi
- name: vange-rs -- copy artifacts to prefix
run: sudo cp vange-rs/target/release/librusty_vangers.a /usr/local/lib/
- name: clunk -- download lib
run: git clone --depth 1 https://github.com/stalkerg/clunk.git clunk
- name: clunk -- create build dir
run: mkdir clunk/build
- name: clunk -- build and install
run: cmake -DCMAKE_INSTALL_PREFIX=/usr/local -G Ninja .. && ninja && sudo ninja install
working-directory: clunk/build
env:
MACOSX_DEPLOYMENT_TARGET: 10.12
- name: ffmpeg -- download
run: git clone --depth 1 --branch n4.2.3 https://git.ffmpeg.org/ffmpeg.git ffmpeg
- name: ffmpeg -- configure
run: ./configure --enable-shared --prefix=/usr/local
--cc=clang
--arch=x86_64
--cpu=westmere
--disable-everything
--enable-swscale
--enable-zlib
--enable-demuxer=avi,rawvideo
--enable-decoder=png,rawvideo,h264
--enable-parser=png
--enable-protocol=file
--disable-d3d11va
--disable-dxva2
--disable-avx
--disable-doc --disable-ffplay --disable-ffprobe --disable-ffmpeg
--disable-static --disable-bzlib --disable-libopenjpeg --disable-iconv
working-directory: ffmpeg
- name: ffmpeg -- build and install
run: |
make -j4
sudo make install
working-directory: ffmpeg
- name: configure
run: mkdir build && cd build && cmake -G Ninja ..
- name: make
run: ninja
working-directory: build
- name: vangers -- prepare release folder
run: |
mkdir Vangers.app/Contents/Frameworks
mkdir Vangers.app/Contents/Libs
cp -L /usr/local/lib/libSDL2-2.0.0.dylib Vangers.app/Contents/Libs/
cp -L /usr/local/lib/libSDL2_net-2.0.0.dylib Vangers.app/Contents/Libs/
cp -L /usr/local/lib/libavcodec.58.54.100.dylib Vangers.app/Contents/Libs/
cp -L /usr/local/lib/libavformat.58.29.100.dylib Vangers.app/Contents/Libs/
cp -L /usr/local/lib/libavutil.56.31.100.dylib Vangers.app/Contents/Libs/
cp -L /usr/local/lib/libogg.0.dylib Vangers.app/Contents/Libs/
cp -L /usr/local/lib/libvorbis.0.dylib Vangers.app/Contents/Libs/
cp -L /usr/local/lib/libvorbisfile.3.dylib Vangers.app/Contents/Libs/
cp clunk/build/libclunk.dylib Vangers.app/Contents/Libs/
cp build/src/vangers Vangers.app/Contents/MacOS/Vangers
dylibbundler -x Vangers.app/Contents/MacOS/Vangers
strip Vangers.app/Contents/MacOS/Vangers
sudo chmod 777 Vangers.app/Contents/Libs/*
install_name_tool -change /usr/local/opt/libogg/lib/libogg.0.dylib "@executable_path/../Libs/libogg.0.dylib" Vangers.app/Contents/Libs/libvorbis.0.dylib
install_name_tool -change /usr/local/Cellar/libvorbis/1.3.6/lib/libvorbis.0.dylib "@executable_path/../Libs/libvorbis.0.dylib" Vangers.app/Contents/Libs/libvorbisfile.3.dylib
install_name_tool -change /usr/local/opt/libogg/lib/libogg.0.dylib "@executable_path/../Libs/libogg.0.dylib" Vangers.app/Contents/Libs/libvorbisfile.3.dylib
mv Vangers.app/Contents/Libs/libavcodec.58.54.100.dylib Vangers.app/Contents/Libs/libavcodec.58.dylib
mv Vangers.app/Contents/Libs/libavformat.58.29.100.dylib Vangers.app/Contents/Libs/libavformat.58.dylib
mv Vangers.app/Contents/Libs/libavutil.56.31.100.dylib Vangers.app/Contents/Libs/libavutil.56.dylib
install_name_tool -change "@executable_path/../libs/libavcodec.58.54.100.dylib" "@executable_path/../Libs/libavcodec.58.dylib" Vangers.app/Contents/MacOS/Vangers
install_name_tool -change "@executable_path/../libs/libavformat.58.29.100.dylib" "@executable_path/../Libs/libavformat.58.dylib" Vangers.app/Contents/MacOS/Vangers
install_name_tool -change "@executable_path/../libs/libavutil.56.31.100.dylib" "@executable_path/../Libs/libavutil.56.dylib" Vangers.app/Contents/MacOS/Vangers
install_name_tool -change "/usr/local/lib/libavutil.56.dylib" "@executable_path/../Libs/libavutil.56.dylib" Vangers.app/Contents/Libs/libavcodec.58.dylib
install_name_tool -change "/usr/local/lib/libavutil.56.dylib" "@executable_path/../Libs/libavutil.56.dylib" Vangers.app/Contents/Libs/libavformat.58.dylib
install_name_tool -change "/usr/local/lib/libavcodec.58.dylib" "@executable_path/../Libs/libavcodec.58.dylib" Vangers.app/Contents/Libs/libavformat.58.dylib
install_name_tool -change "/usr/local/opt/sdl2/lib/libSDL2-2.0.0.dylib" "@executable_path/../Libs/libSDL2-2.0.0.dylib" Vangers.app/Contents/Libs/libSDL2_net-2.0.0.dylib
tar -cvf Vangers.app.tar Vangers.app
- uses: actions/upload-artifact@v2
with:
name: Vangers.app.tar
path: Vangers.app.tar