wip host & connect buttons, NetworkReplicator #132
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: Build | |
on: [ push ] | |
jobs: | |
linux: | |
strategy: | |
matrix: | |
configuration: [ Release, Debug ] | |
name: Linux | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install required packages | |
uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
version: 1.3.0 | |
packages: >- | |
build-essential | |
cmake | |
ninja-build | |
libxi-dev | |
libx11-dev | |
libxft-dev | |
libxkbcommon-dev | |
libegl1-mesa-dev | |
libgl1-mesa-dev | |
libglu1-mesa-dev | |
mesa-common-dev | |
libxrandr-dev | |
libxxf86vm-dev | |
libxaw7-dev | |
libxext-dev | |
libwayland-dev | |
libibus-1.0-dev | |
libraw-dev | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: 6.* | |
cache: true | |
- name: Install development packages via vcpkg | |
uses: lukka/run-vcpkg@v11 | |
with: | |
runVcpkgInstall: true | |
vcpkgGitCommitId: 9d47b24eacbd1cd94f139457ef6cd35e5d92cc84 | |
vcpkgDirectory: ${{ github.workspace }}/vcpkg | |
- name: Generate Ninja build files | |
run: cmake -S . -G Ninja -B build -DCI=ON -DCMAKE_BUILD_TYPE=${{ matrix.configuration == 'Release' && 'MinSizeRel' || matrix.configuration }} -DOpenGL_GL_PREFERENCE=GLVND -DCMAKE_TOOLCHAIN_FILE=./vcpkg/scripts/buildsystems/vcpkg.cmake | |
- name: Run Ninja build | |
run: ninja -C build | |
# ouch - unless and until we start using CMake's install command, these next few steps are a necessary evil | |
- name: Organize binaries | |
run: mkdir packaged && mv build/RNR.* packaged | |
- name: Add RNR resources | |
run: cp -R Content/RNR packaged/content && cp LICENSE packaged | |
- name: Add OGRE plugins | |
run: cp -R build/plugins packaged && cp Content/linux_plugins.cfg packaged/plugins.cfg | |
- name: Add OGRE shaders | |
run: cp -R build/shaders packaged && mv packaged/shaders/GLSL/* packaged/shaders && rm -rf packaged/shaders/GLSL | |
- name: Add additional runtime dependencies | |
run: ldd packaged/RNR.* | grep "=> /lib/x86_64-linux-gnu/" | awk '{print $3}' | xargs -I '{}' cp -v '{}' packaged | |
- name: Set output variables | |
id: vars | |
run: | | |
echo "configuration=${{ matrix.configuration }}" | awk '{print tolower($0)}' >> $GITHUB_OUTPUT | |
echo "hash=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: rnr-${{ steps.vars.outputs.hash }}-linux_x64-${{ steps.vars.outputs.configuration }} | |
path: packaged | |
windows: | |
strategy: | |
matrix: | |
include: | |
- { sys: clang64, env: clang-x86_64 } | |
configuration: [ Release, Debug ] | |
name: Windows | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Set up MSYS2 and install required packages | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: ${{ matrix.sys }} | |
install: >- | |
mingw-w64-${{ matrix.env }}-${{ matrix.sys == 'clang64' && 'clang' || 'gcc' }} | |
mingw-w64-${{ matrix.env }}-cmake | |
mingw-w64-${{ matrix.env }}-ninja | |
mingw-w64-${{ matrix.env }}-ogre3d | |
mingw-w64-${{ matrix.env }}-bullet | |
mingw-w64-${{ matrix.env }}-qt6 | |
mingw-w64-${{ matrix.env }}-boost | |
mingw-w64-${{ matrix.env }}-pugixml | |
- name: Generate Ninja build files | |
run: cmake -S . -G Ninja -B build -DCI=ON -DCMAKE_BUILD_TYPE=${{ matrix.configuration == 'Release' && 'MinSizeRel' || matrix.configuration }} | |
- name: Run Ninja build | |
run: ninja -C build | |
# ouch - unless and until we start using CMake's install command, these next few steps are a necessary evil | |
- name: Organize binaries | |
run: mkdir packaged && mv build/*.exe packaged | |
- name: Add RNR resources | |
run: cp -R Content/RNR packaged/content && cp LICENSE packaged | |
- name: Add Qt plugins and dependencies | |
run: windeployqt6 packaged/*.exe | |
- name: Add OGRE plugins | |
run: cp Content/win32_plugins.cfg packaged/plugins.cfg && mkdir packaged/plugins/ && cat packaged/plugins.cfg | grep "Plugin=" | sed -e "s/Plugin=//" | xargs -I '{}' cp -v '/${{ matrix.sys }}/bin/{}.dll' packaged/plugins | |
- name: Add OGRE shaders | |
run: mkdir packaged/shaders && cp -R /${{ matrix.sys }}/share/OGRE/Media/Main/* packaged/shaders && cp -R /${{ matrix.sys }}/share/OGRE/Media/RTShaderLib/* packaged/shaders && mv packaged/shaders/GLSL/* packaged/shaders && rm -rf packaged/shaders/GLSL | |
- name: Add additional runtime dependencies | |
run: ldd packaged/*.exe | grep "=> /${{ matrix.sys }}/" | awk '{print $3}' | xargs -I '{}' cp -v '{}' packaged | |
- name: Set output variables | |
id: vars | |
run: | | |
echo "configuration=${{ matrix.configuration }}" | awk '{print tolower($0)}' >> $GITHUB_OUTPUT | |
echo "hash=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: rnr-${{ steps.vars.outputs.hash }}-win_x64-${{ steps.vars.outputs.configuration }} | |
path: packaged |