From e628ad9d98aab1315b89aa3f04465906732b53f4 Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Sat, 15 Jun 2024 20:43:27 +0200 Subject: [PATCH] Feature/remove deprecated macos build image (#712) * remove deprecated runner image from build --- .devcontainer/Dockerfile | 3 +-- .github/workflows/build-client.yml | 32 ++++++++++++++++++++++-------- CMakeLists.txt | 8 ++++---- CMakePresets.json | 6 ++++++ 4 files changed, 35 insertions(+), 14 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 35c21571ba..8895d2070e 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -66,8 +66,7 @@ ARG USER_GID=$USER_UID RUN wget --output-document=/tmp/cmake.sh https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.sh RUN mkdir --parents "$CMAKE_INSTALL_DIR" \ && sh /tmp/cmake.sh --skip-license --prefix="$CMAKE_INSTALL_DIR" \ - && ln --symbolic --force "$CMAKE_INSTALL_DIR/bin/cmake" /usr/local/bin/cmake \ - && ln --symbolic --force "$CMAKE_INSTALL_DIR/bin/ctest" /usr/local/bin/ctest + && ln --symbolic --force "$CMAKE_INSTALL_DIR/bin/"* /usr/local/bin RUN groupadd --gid $USER_GID $USERNAME \ && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ diff --git a/.github/workflows/build-client.yml b/.github/workflows/build-client.yml index bfd6ce8df5..895f760a23 100644 --- a/.github/workflows/build-client.yml +++ b/.github/workflows/build-client.yml @@ -26,7 +26,7 @@ jobs: - windows-2022 - windows-2019 - macos-14 - - macos-11 + - macos-12 include: - os: windows-2022 cmake_preset: windows-client @@ -43,8 +43,6 @@ jobs: - os: macos-12 cmake_preset: macos-client cmake_options: -DHUNTER_USE_CACHE_SERVERS=NO - - os: macos-11 - cmake_preset: macos-client steps: - uses: actions/checkout@v4 @@ -88,18 +86,22 @@ jobs: path: ${{ steps.strings.outputs.hunter-dir }} key: ${{ matrix.os }}-hunter - - name: Cache Chocolatey Dependencies + - uses: actions/cache/restore@v4.0.2 if: runner.os == 'Windows' - uses: actions/cache@v4.0.2 with: path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey - key: ${{ runner.os }}-chocolatey-cache + key: ${{ matrix.os }}-chocolatey - name: Dependencies Windows if: runner.os == 'Windows' - run: > + run: | choco install directx-sdk + - uses: actions/cache/save@v4 + with: + path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey + key: ${{ matrix.os }}-chocolatey + - name: Configure CMake env: MACOSX_DEPLOYMENT_TARGET: 10.12 @@ -108,7 +110,6 @@ jobs: ${{ matrix.cmake_options }} -DHUNTER_CONFIGURATION_TYPES=Release -DHUNTER_ENABLED=ON - -DHUNTER_STATUS_DEBUG=ON -DHUNTER_ROOT=${{ steps.strings.outputs.hunter-dir }} -S ${{ github.workspace }} @@ -121,3 +122,18 @@ jobs: env: MACOSX_DEPLOYMENT_TARGET: 10.12 run: cmake --build --preset client + + - name: Package + run: cmake --build --preset client --target package + + - uses: actions/upload-artifact@v4 + if: ${{ failure() }} + with: + name: ${{ matrix.os }}-logs + path: build/**/*.log + + - uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.os }}-client-package + path: build/ryzomcore-* + if-no-files-found: error diff --git a/CMakeLists.txt b/CMakeLists.txt index e62ff953ff..eca8265898 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -484,14 +484,13 @@ SET(CPACK_PACKAGE_VERSION_MINOR "${NL_VERSION_MINOR}") SET(CPACK_PACKAGE_VERSION_PATCH "${NL_VERSION_PATCH}") SET(CPACK_INSTALL_CMAKE_PROJECTS "${CMAKE_BINARY_DIR};NeL;ALL;/") SET(CPACK_PACKAGE_EXECUTABLES "ryzomcore${NL_VERSION}" "ryzomcore") -SET(CPACK_SET_DESTDIR TRUE) # NSIS Specific Packing Setup SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "RyzomCore") SET(CPACK_NSIS_MODIFY_PATH "ON") -SET(CPACK_NSIS_MUI_ICON ${CMAKE_SOURCE_DIR}/resources/nevraxpill.ico) -SET(CPACK_NSIS_MUI_UNIICON ${CMAKE_SOURCE_DIR}/resources/nevraxpill.ico) -SET(CPACK_PACKAGE_ICON ${CMAKE_SOURCE_DIR}/resources\\\\nel.bmp) +SET(CPACK_NSIS_MUI_ICON ${CMAKE_SOURCE_DIR}/nel/resources/nevraxpill.ico) +SET(CPACK_NSIS_MUI_UNIICON ${CMAKE_SOURCE_DIR}/nel/resources/nevraxpill.ico) +SET(CPACK_PACKAGE_ICON ${CMAKE_SOURCE_DIR}/nel/resources\\\\nel.bmp) SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} RyzomCore") SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\dev.ryzom.com") SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\dev.ryzom.com\\\\projects\\\\nel\\\\wiki") @@ -505,6 +504,7 @@ IF(WIN32) SET(CPACK_GENERATOR "NSIS;ZIP") SET(CPACK_SOURCE_GENERATOR "ZIP") ELSE() + SET(CPACK_SET_DESTDIR TRUE) SET(CPACK_GENERATOR "TGZ;STGZ") SET(CPACK_SOURCE_GENERATOR "TGZ") ENDIF() diff --git a/CMakePresets.json b/CMakePresets.json index cc95d7175e..a79022ce01 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -146,5 +146,11 @@ "GTEST_OUTPUT": "xml:${sourceDir}/build/reports/" } } + ], + "packagePresets": [ + { + "name": "client", + "configurePreset": "client" + } ] } \ No newline at end of file