Kaynağa Gözat

Reorganized layout of CI directory, move all before_install files into
common directory, remove copy-pasted files

Ivan Savenko 1 yıl önce
ebeveyn
işleme
ecf063cd1c

+ 11 - 1
.github/workflows/github.yml

@@ -23,14 +23,17 @@ jobs:
           - platform: linux-qt6
             os: ubuntu-24.04
             test: 0
+            before_install: linux_qt6.sh
             preset: linux-clang-test
           - platform: linux
             os: ubuntu-24.04
             test: 1
+            before_install: linux_qt5.sh
             preset: linux-gcc-test
           - platform: linux
             os: ubuntu-20.04
             test: 0
+            before_install: linux_qt5.sh
             preset: linux-gcc-debug
           - platform: mac-intel
             os: macos-13
@@ -38,6 +41,7 @@ jobs:
             pack: 1
             pack_type: Release
             extension: dmg
+            before_install: macos.sh
             preset: macos-conan-ninja-release
             conan_profile: macos-intel
             conan_prebuilts: dependencies-mac-intel
@@ -49,6 +53,7 @@ jobs:
             pack: 1
             pack_type: Release
             extension: dmg
+            before_install: macos.sh
             preset: macos-arm-conan-ninja-release
             conan_profile: macos-arm
             conan_prebuilts: dependencies-mac-arm
@@ -60,6 +65,7 @@ jobs:
             pack: 1
             pack_type: Release
             extension: ipa
+            before_install: macos.sh
             preset: ios-release-conan-ccache
             conan_profile: ios-arm64
             conan_prebuilts: dependencies-ios
@@ -70,6 +76,7 @@ jobs:
             pack: 1
             pack_type: RelWithDebInfo
             extension: exe
+            before_install: msvc.sh
             preset: windows-msvc-release
           - platform: mingw
             os: ubuntu-24.04
@@ -79,6 +86,7 @@ jobs:
             extension: exe
             cpack_args: -D CPACK_NSIS_EXECUTABLE=`which makensis`
             cmake_args: -G Ninja
+            before_install: mingw_x86_64.sh
             preset: windows-mingw-conan-linux
             conan_profile: mingw64-linux.jinja
             conan_prebuilts: dependencies-mingw
@@ -90,6 +98,7 @@ jobs:
             extension: exe
             cpack_args: -D CPACK_NSIS_EXECUTABLE=`which makensis`
             cmake_args: -G Ninja
+            before_install: mingw_x86.sh
             preset: windows-mingw-conan-linux
             conan_profile: mingw32-linux.jinja
             conan_prebuilts: dependencies-mingw-32
@@ -121,7 +130,8 @@ jobs:
         submodules: recursive
 
     - name: Prepare CI
-      run: source '${{github.workspace}}/CI/${{matrix.platform}}/before_install.sh'
+      if: "${{ matrix.before_install != '' }}"
+      run: source '${{github.workspace}}/CI/before_install/${{matrix.before_install}}'
       env:
         VCMI_BUILD_PLATFORM: x64
 

+ 0 - 4
CI/android-32/before_install.sh

@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-DEPS_FILENAME=dependencies-android-32
-. CI/android/before_install.sh

+ 0 - 4
CI/android-64/before_install.sh

@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-DEPS_FILENAME=dependencies-android-64
-. CI/android/before_install.sh

+ 0 - 5
CI/android/before_install.sh

@@ -1,5 +0,0 @@
-#!/usr/bin/env bash
-
-echo "ANDROID_NDK_ROOT=$ANDROID_HOME/ndk/25.2.9519653" >> $GITHUB_ENV
-
-brew install ninja

+ 4 - 0
CI/before_install/android.sh

@@ -0,0 +1,4 @@
+#!/bin/sh
+
+sudo apt-get update
+sudo apt-get install ninja-build

+ 2 - 3
CI/linux/before_install.sh → CI/before_install/linux_qt5.sh

@@ -1,6 +1,5 @@
 #!/bin/sh
 
-sudo apt remove needrestart
 sudo apt-get update
 
 # Dependencies
@@ -9,6 +8,6 @@ sudo apt-get update
 # - debian build settings at debian/control
 sudo apt-get install libboost-dev libboost-filesystem-dev libboost-system-dev libboost-thread-dev libboost-program-options-dev libboost-locale-dev libboost-iostreams-dev \
 libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev \
-qtbase5-dev \
+qtbase5-dev qttools5-dev \
 ninja-build zlib1g-dev libavformat-dev libswscale-dev libtbb-dev libluajit-5.1-dev \
-libminizip-dev libfuzzylite-dev qttools5-dev libsqlite3-dev # Optional dependencies
+libminizip-dev libfuzzylite-dev libsqlite3-dev # Optional dependencies

+ 3 - 1
CI/linux-qt6/before_install.sh → CI/before_install/linux_qt6.sh

@@ -1,9 +1,11 @@
 #!/bin/sh
 
-sudo apt remove needrestart
 sudo apt-get update
 
 # Dependencies
+# In case of change in dependencies list please also update:
+# - developer docs at docs/developer/Building_Linux.md
+# - debian build settings at debian/control
 sudo apt-get install libboost-dev libboost-filesystem-dev libboost-system-dev libboost-thread-dev libboost-program-options-dev libboost-locale-dev libboost-iostreams-dev \
 libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev \
 qt6-base-dev qt6-base-dev-tools qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools \

+ 0 - 0
CI/ios/before_install.sh → CI/before_install/macos.sh


+ 0 - 0
CI/mingw-32/before_install.sh → CI/before_install/mingw_x86.sh


+ 0 - 0
CI/mingw/before_install.sh → CI/before_install/mingw_x86_64.sh


+ 0 - 0
CI/msvc/before_install.sh → CI/before_install/msvc.sh


+ 0 - 1
CI/linux-qt6/upload_package.sh

@@ -1 +0,0 @@
-#!/bin/sh

+ 0 - 1
CI/linux/upload_package.sh

@@ -1 +0,0 @@
-#!/bin/sh

+ 0 - 3
CI/mac-arm/before_install.sh

@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-. CI/mac/before_install.sh

+ 0 - 3
CI/mac-intel/before_install.sh

@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-. CI/mac/before_install.sh

+ 0 - 5
CI/mac/before_install.sh

@@ -1,5 +0,0 @@
-#!/usr/bin/env bash
-
-echo DEVELOPER_DIR=/Applications/Xcode_14.2.app >> $GITHUB_ENV
-
-brew install ninja

+ 0 - 0
CI/linux-qt6/validate_json.py → CI/validate_json.py