From 4811cf2195d720619d42aa61db8274957dacf42f Mon Sep 17 00:00:00 2001 From: rjindael Date: Mon, 17 Jul 2023 23:47:40 -0700 Subject: [PATCH 1/6] ci optimizations and hopefully fix linux builds --- .github/workflows/build.yml | 6 ++++-- Projects/Client/CMakeLists.txt | 6 +----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7ee7a9e..42ec952 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,6 +30,9 @@ jobs: libpugixml-dev qt6-base-dev + - name: Let CMake recognize Qt + run: cp /usr/lib/x86_64-linux-gnu/cmake/Qt6/Qt6Config.cmake /usr/lib/cmake/Qt6 + - name: Generate Ninja build files run: cmake -G Ninja -B build -DCI=ON -DCMAKE_BUILD_TYPE=${{ matrix.configuration == 'Release' && 'MinSizeRel' || matrix.configuration }} . @@ -86,7 +89,6 @@ jobs: with: msystem: ${{ matrix.sys }} install: >- - git mingw-w64-${{ matrix.env }}-${{ matrix.sys == 'clang64' && 'clang' || 'gcc' }} mingw-w64-${{ matrix.env }}-cmake mingw-w64-${{ matrix.env }}-ninja @@ -124,7 +126,7 @@ jobs: id: vars run: | echo "configuration=${{ matrix.configuration }}" | awk '{print tolower($0)}' >> $GITHUB_OUTPUT - echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + echo "hash=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT - name: Upload artifact uses: actions/upload-artifact@v3 diff --git a/Projects/Client/CMakeLists.txt b/Projects/Client/CMakeLists.txt index 0c8ceb0..66fa33e 100644 --- a/Projects/Client/CMakeLists.txt +++ b/Projects/Client/CMakeLists.txt @@ -4,12 +4,8 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) option(FORCE_ENABLE_VSYNC ON) if(COMPILE_PLAYER OR COMPILE_STUDIO) - if(LINUX) - include(/usr/share/cmake/Modules/FindX11.cmake) - endif() - find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets OpenGLWidgets) - set(QT6_LIBRARIES_INCL Qt6::Core Qt6::Gui Qt6::Widgets Qt6::OpenGLWidgets Qt6::GuiPrivate ${X11_X11_LIB}) + set(QT6_LIBRARIES_INCL Qt6::Core Qt6::Gui Qt6::Widgets Qt6::OpenGLWidgets Qt6::GuiPrivate) add_subdirectory(Common) From c718ddf370bc7daf1da27d78e7c0295b26e3e4d2 Mon Sep 17 00:00:00 2001 From: rjindael Date: Mon, 17 Jul 2023 23:51:25 -0700 Subject: [PATCH 2/6] fix linux(??) --- .github/workflows/build.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 42ec952..b459ce5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ jobs: - uses: awalsh128/cache-apt-pkgs-action@latest name: Install required packages with: - version: 1.0 + version: 1.1 packages: >- git clang @@ -27,11 +27,10 @@ jobs: ninja-build libboost-dev Libogre-1.12-dev - libpugixml-dev - qt6-base-dev + libpugixml-dev - - name: Let CMake recognize Qt - run: cp /usr/lib/x86_64-linux-gnu/cmake/Qt6/Qt6Config.cmake /usr/lib/cmake/Qt6 + - name: Install Qt + run: sudo apt-get install qt6-base-dev - name: Generate Ninja build files run: cmake -G Ninja -B build -DCI=ON -DCMAKE_BUILD_TYPE=${{ matrix.configuration == 'Release' && 'MinSizeRel' || matrix.configuration }} . From 65d151e9a7370b3e5b86f2bf9e7b8ac8f05ef3e1 Mon Sep 17 00:00:00 2001 From: rjindael Date: Tue, 18 Jul 2023 00:05:05 -0700 Subject: [PATCH 3/6] add required linux libraries --- .github/workflows/build.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b459ce5..b17c24d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,16 +21,10 @@ jobs: with: version: 1.1 packages: >- - git - clang - cmake - ninja-build - libboost-dev - Libogre-1.12-dev - libpugixml-dev + - - name: Install Qt - run: sudo apt-get install qt6-base-dev + - name: Install required packages + run: sudo apt-get update && sudo apt-get install -y clang cmake ninja-build libboost-dev libogre-1.12-dev libpugixml-dev libglx-dev qt6-base-dev qt6-3d-dev libqt6gui6 libqt6core6 libqt6openglwidgets6 libqt6opengl6-dev - name: Generate Ninja build files run: cmake -G Ninja -B build -DCI=ON -DCMAKE_BUILD_TYPE=${{ matrix.configuration == 'Release' && 'MinSizeRel' || matrix.configuration }} . From c8819fd43b3b2634d6dcd90c041dd7b913709979 Mon Sep 17 00:00:00 2001 From: rjindael Date: Tue, 18 Jul 2023 00:13:23 -0700 Subject: [PATCH 4/6] oops --- .github/workflows/build.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b17c24d..465257c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,14 +15,7 @@ jobs: name: Clone repository with: submodules: recursive - - - uses: awalsh128/cache-apt-pkgs-action@latest - name: Install required packages - with: - version: 1.1 - packages: >- - - name: Install required packages run: sudo apt-get update && sudo apt-get install -y clang cmake ninja-build libboost-dev libogre-1.12-dev libpugixml-dev libglx-dev qt6-base-dev qt6-3d-dev libqt6gui6 libqt6core6 libqt6openglwidgets6 libqt6opengl6-dev From c9fee96a129e15ecbbfbc5832191f735eebea1d4 Mon Sep 17 00:00:00 2001 From: rj Date: Tue, 18 Jul 2023 15:28:54 -0700 Subject: [PATCH 5/6] Update build.yml --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 465257c..3b37a89 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ jobs: submodules: recursive - name: Install required packages - run: sudo apt-get update && sudo apt-get install -y clang cmake ninja-build libboost-dev libogre-1.12-dev libpugixml-dev libglx-dev qt6-base-dev qt6-3d-dev libqt6gui6 libqt6core6 libqt6openglwidgets6 libqt6opengl6-dev + run: sudo apt-get update && sudo apt-get install -y build-essential clang-15 clangd-15 libclang-15-dev cmake ninja-build libboost-dev libogre-1.12-dev libpugixml-dev libglx-dev qt6-base-dev qt6-base-private-dev qt6-declarative-dev qt6-declarative-private-dev qt6-tools-dev qt6-tools-private-dev qt6-scxml-dev qt6-documentation-tools libqt6core5compat6-dev qt6-tools-dev-tools qt6-l10n-tools qt6-shader-baker libqt6shadertools6-dev qt6-quick3d-dev qt6-quick3d-dev-tools libqt6svg6-dev libqt6quicktimeline6-dev libqt6serialport6-dev libgl1-mesa-dev libvulkan-dev libxcb-xinput-dev libxcb-xinerama0-dev libxkbcommon-dev libxkbcommon-x11-dev libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xkb1 libxcb-randr0 libxcb-icccm4 - name: Generate Ninja build files run: cmake -G Ninja -B build -DCI=ON -DCMAKE_BUILD_TYPE=${{ matrix.configuration == 'Release' && 'MinSizeRel' || matrix.configuration }} . @@ -118,4 +118,4 @@ jobs: uses: actions/upload-artifact@v3 with: name: rnr-${{ steps.vars.outputs.hash }}-win_x64-${{ steps.vars.outputs.configuration }} - path: build/dist \ No newline at end of file + path: build/dist From c99afb47d34b47e31d1ccd6c761098659dbf14e8 Mon Sep 17 00:00:00 2001 From: rj Date: Tue, 18 Jul 2023 15:40:58 -0700 Subject: [PATCH 6/6] tired of linux --- .github/workflows/build.yml | 48 ------------------------------------- 1 file changed, 48 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3b37a89..6d087ce 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,54 +2,6 @@ name: Build on: [ push ] jobs: - linux: - strategy: - matrix: - configuration: [ Release, Debug ] - - name: Linux - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - name: Clone repository - with: - submodules: recursive - - - name: Install required packages - run: sudo apt-get update && sudo apt-get install -y build-essential clang-15 clangd-15 libclang-15-dev cmake ninja-build libboost-dev libogre-1.12-dev libpugixml-dev libglx-dev qt6-base-dev qt6-base-private-dev qt6-declarative-dev qt6-declarative-private-dev qt6-tools-dev qt6-tools-private-dev qt6-scxml-dev qt6-documentation-tools libqt6core5compat6-dev qt6-tools-dev-tools qt6-l10n-tools qt6-shader-baker libqt6shadertools6-dev qt6-quick3d-dev qt6-quick3d-dev-tools libqt6svg6-dev libqt6quicktimeline6-dev libqt6serialport6-dev libgl1-mesa-dev libvulkan-dev libxcb-xinput-dev libxcb-xinerama0-dev libxkbcommon-dev libxkbcommon-x11-dev libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xkb1 libxcb-randr0 libxcb-icccm4 - - - name: Generate Ninja build files - run: cmake -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 build/dist && find build -perm /a+x -exec mv {} build/dist \; - - - name: Add RNR resources - run: cp -R Content/RNR build/dist/content && cp LICENSE build/dist - - - name: Add OGRE plugins - run: cp -R build/plugins build/dist && cp Content/linux_plugins.cfg build/dist/plugins.cfg - - - name: Add OGRE shaders - run: cp -R build/shaders build/dist - - - name: Set output variables - id: vars - run: | - echo "configuration=${{ matrix.configuration }}" | awk '{print tolower($0)}' >> $GITHUB_OUTPUT - echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT - - - name: Upload artifact - uses: actions/upload-artifact@v3 - with: - name: rnr-${{ steps.vars.outputs.hash }}-linux_x64-${{ steps.vars.outputs.configuration }} - path: build/dist - windows: strategy: matrix: