ci revamp

This commit is contained in:
rjindael 2023-07-17 22:45:29 -07:00
parent acaa5b72a1
commit 7889788a3a
No known key found for this signature in database
GPG Key ID: D069369C906CCF31
2 changed files with 25 additions and 22 deletions

View File

@ -1,13 +1,14 @@
name: ci name: Build
on: [push] on: [ push ]
jobs: jobs:
build-win_x64: windows:
strategy: strategy:
matrix: matrix:
configuration: [release, debug] configuration: [ Release, Debug ]
sys: [ clang64-x86_64 ]
name: build (win_x64) name: Windows
runs-on: windows-latest runs-on: windows-latest
defaults: defaults:
@ -23,47 +24,49 @@ jobs:
- uses: msys2/setup-msys2@v2 - uses: msys2/setup-msys2@v2
name: Set up MSYS2 name: Set up MSYS2
with: with:
msystem: mingw64 msystem: ${{ matrix.sys }}
install: >- install: >-
mingw-w64-x86_64-gcc mingw-w64-${{ matrix.sys }}-${{ contains(matrix.sys, 'clang') && 'clang' || 'gcc' }}
mingw-w64-x86_64-cmake mingw-w64-${{ matrix.sys }}-cmake
mingw-w64-x86_64-ninja mingw-w64-${{ matrix.sys }}-ninja
mingw-w64-x86_64-boost mingw-w64-${{ matrix.sys }}-boost
mingw-w64-x86_64-pugixml mingw-w64-${{ matrix.sys }}-pugixml
mingw-w64-x86_64-ogre3d mingw-w64-${{ matrix.sys }}-ogre3d
mingw-w64-x86_64-qt6 mingw-w64-${{ matrix.sys }}-qt6
- name: Generate Ninja build files - name: Generate Ninja build files
run: cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=${{ matrix.configuration == 'release' && 'MinSizeRel' || 'Debug' }} . run: cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=${{ matrix.configuration == 'Release' && 'MinSizeRel' || matrix.configuration }} .
- name: Build (Ninja) - name: Build (Ninja)
run: ninja -C build run: ninja -C build
# ouch - unless and until we start using CMake's install command, these next few commands are a necessary evil # ouch - unless and until we start using CMake's install command, these next few steps are a necessary evil
- name: Organize binaries - name: Organize binaries
run: mkdir build/dist && mv build/*.exe build/dist && cd build/dist && for x in *.exe; do mv $x "RNR.$x"; done && cd ../../ run: mkdir build/dist && mv build/*.exe build/dist && cd build/dist && for x in *.exe; do mv $x "RNR.$x"; done
- name: Add Qt dependencies - name: Add Qt dependencies
run: windeployqt6 build/dist/*.exe run: windeployqt6 build/dist/*.exe
- name: Add runtime dependencies - name: Add runtime dependencies
run: ldd build/dist/*.exe | grep "=> /" | awk '{print $3}' | grep "mingw64" | xargs -I '{}' cp -v '{}' build/dist run: ldd build/dist/*.exe | grep "=> /" | awk '{print $3}' | grep "clang64" | xargs -I '{}' cp -v '{}' build/dist
- name: Add OGRE plugins - name: Add OGRE plugins
run: cp Content/win32_plugins.cfg build/dist/plugins.cfg && mkdir build/dist/plugins/ && cat build/dist/plugins.cfg | grep "Plugin=" | sed -e "s/Plugin=//" | xargs -I '{}' cp -v '/mingw64/bin/{}.dll' build/dist/plugins/ run: cp Content/win32_plugins.cfg build/dist/plugins.cfg && mkdir build/dist/plugins/ && cat build/dist/plugins.cfg | grep "Plugin=" | sed -e "s/Plugin=//" | xargs -I '{}' cp -v '/${{ matrix.sys }}/bin/{}.dll' build/dist/plugins/
- name: Add OGRE shaders - name: Add OGRE shaders
run: mkdir build/dist/ShaderCache && mkdir build/dist/shaders && cp -R /mingw64/share/OGRE/Media/Main build/dist/shaders && cp -R /mingw64/share/OGRE/Media/RTShaderLib build/dist/shaders run: mkdir build/dist/ShaderCache && mkdir build/dist/shaders && cp -R /${{ matrix.sys }}/share/OGRE/Media/Main build/dist/shaders && cp -R /${{ matrix.sys }}/share/OGRE/Media/RTShaderLib build/dist/shaders
- name: Add resources - name: Add resources
run: cp -R Content/RNR build/dist/content && cp LICENSE build/dist run: cp -R Content/RNR build/dist/content && cp LICENSE build/dist
- name: Set output variables - name: Set output variables
id: vars id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT run: |
echo "configuration=${{ matrix.configuration }}" | awk '{print tolower($0)}' >> $GITHUB_OUTPUT
echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Upload - name: Upload
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: RNR (${{ steps.vars.outputs.sha_short }}-${{ matrix.configuration }}-win_x64) name: rnr-win_x64-${{ steps.vars.outputs.configuration }}-${{ steps.vars.outputs.hash }}
path: build/dist path: build/dist

View File

@ -1,5 +1,5 @@
# RNR # RNR
[![GitHub CI Status](https://img.shields.io/github/actions/workflow/status/lrre-foss/rnr/ci.yml?branch=trunk&label=builds)](https://github.com/lrre-foss/rnr/actions) [![GitHub CI Status](https://img.shields.io/github/actions/workflow/status/lrre-foss/rnr/build.yml?branch=trunk&label=builds)](https://github.com/lrre-foss/rnr/actions)
[![Star](https://img.shields.io/github/stars/lrre-foss/RNR?style=social)](https://github.com/lrre-foss/RNR/stargazers) [![Star](https://img.shields.io/github/stars/lrre-foss/RNR?style=social)](https://github.com/lrre-foss/RNR/stargazers)
RNR (**R**NR's **N**ot **R**oblox) is a project that aims to recreate the look and feel of classic Roblox with new features while remaining fully compatible with clients from that era. It is built upon an engine that closely resembles Roblox's own at the time, referencing disassemblies of legacy client binaries. RNR (**R**NR's **N**ot **R**oblox) is a project that aims to recreate the look and feel of classic Roblox with new features while remaining fully compatible with clients from that era. It is built upon an engine that closely resembles Roblox's own at the time, referencing disassemblies of legacy client binaries.