]> git.lizzy.rs Git - minetest.git/commitdiff
Centralize IrrlichtMt version used for builds
authorsfan5 <sfan5@live.de>
Thu, 21 Jul 2022 18:51:02 +0000 (20:51 +0200)
committersfan5 <sfan5@live.de>
Sat, 23 Jul 2022 20:27:19 +0000 (22:27 +0200)
maybe a submodule would have really been easier...

.github/workflows/build.yml
.github/workflows/macos.yml
.gitlab-ci.yml
misc/irrlichtmt_tag.txt [new file with mode: 0644]
util/buildbot/buildwin32.sh
util/buildbot/buildwin64.sh
util/ci/common.sh

index c457432844b1df9dff7bd80c3bd498e2ecf3fbfd..d578c3d9fc11de78394a57bd740738b55d7cba34 100644 (file)
@@ -226,11 +226,9 @@ jobs:
       - uses: actions/checkout@v3
 
       - name: Checkout IrrlichtMt
-        uses: actions/checkout@v3
-        with:
-          repository: minetest/irrlicht
-          path: lib/irrlichtmt/
-          ref: "1.9.0mt7"
+        run: |
+          $ref = @(Get-Content misc\irrlichtmt_tag.txt)
+          git clone https://github.com/minetest/irrlicht lib\irrlichtmt --depth 1 -b $ref[0]
 
       - name: Restore from cache and run vcpkg
         uses: lukka/run-vcpkg@v7
index 7f0318c7650e7a3ecf7704fe4c6179c90670a6f8..038765494d3386b5ed52fd6649f7beb163d6ae98 100644 (file)
@@ -22,7 +22,6 @@ on:
       - '.github/workflows/macos.yml'
 
 env:
-  IRRLICHT_TAG: 1.9.0mt7
   MINETEST_GAME_REPO: https://github.com/minetest/minetest_game.git
   MINETEST_GAME_BRANCH: master
   MINETEST_GAME_NAME: minetest_game
@@ -43,8 +42,7 @@ jobs:
       - name: Build
         run: |
           git clone -b $MINETEST_GAME_BRANCH $MINETEST_GAME_REPO games/$MINETEST_GAME_NAME
-          rm -rvf games/$MINETEST_GAME_NAME/.git
-          git clone https://github.com/minetest/irrlicht -b $IRRLICHT_TAG lib/irrlichtmt
+          git clone https://github.com/minetest/irrlicht lib/irrlichtmt --depth 1 -b $(cat misc/irrlichtmt_tag.txt)
           mkdir build
           cd build
           cmake .. \
index a24ae45b0b867bdf5dc3d49718da2ed55470d16b..28e35a97144eda6b1a66286e6787429f855b8791 100644 (file)
@@ -9,7 +9,6 @@ stages:
   - deploy
 
 variables:
-  IRRLICHT_TAG: "1.9.0mt7"
   MINETEST_GAME_REPO: "https://github.com/minetest/minetest_game.git"
   CONTAINER_IMAGE: registry.gitlab.com/$CI_PROJECT_PATH
 
@@ -19,7 +18,7 @@ variables:
    - apt-get update
    - DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential git cmake libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libleveldb-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev libzstd-dev
   script:
-    - git clone https://github.com/minetest/irrlicht -b $IRRLICHT_TAG lib/irrlichtmt
+    - git clone https://github.com/minetest/irrlicht lib/irrlichtmt --depth 1 -b $(cat misc/irrlichtmt_tag.txt)
     - mkdir build && cd build
     - cmake -DCMAKE_INSTALL_PREFIX=../artifact/minetest/usr/ -DRUN_IN_PLACE=FALSE -DENABLE_GETTEXT=TRUE -DBUILD_SERVER=TRUE ..
     - make -j $(($(nproc) + 1))
diff --git a/misc/irrlichtmt_tag.txt b/misc/irrlichtmt_tag.txt
new file mode 100644 (file)
index 0000000..2684ddf
--- /dev/null
@@ -0,0 +1 @@
+1.9.0mt7
index e54c1af4d3a4d1ae876bec97abb3a36e33f166b9..3df48f178823542911d81c0bf770c1b232998d6d 100755 (executable)
@@ -8,7 +8,7 @@ GAME_GIT=https://github.com/minetest/minetest_game
 GAME_BRANCH=master
 GAME_NAME=minetest_game
 
-dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+topdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 if [ $# -ne 1 ]; then
        echo "Usage: $0 <build directory>"
        exit 1
@@ -28,7 +28,7 @@ if [ -z "$compiler" ]; then
        echo "Unable to determine which MinGW compiler to use"
        exit 1
 fi
-toolchain_file=$dir/toolchain_${compiler/-gcc/}.cmake
+toolchain_file=$topdir/toolchain_${compiler/-gcc/}.cmake
 echo "Using $toolchain_file"
 
 # Try to find runtime DLLs in various paths (varies by distribution, sigh)
@@ -45,7 +45,7 @@ done
        echo "The compiler runtime DLLs could not be found, they might be missing in the final package."
 
 # Get stuff
-irrlicht_version=1.9.0mt7
+irrlicht_version=$(cat $topdir/../../misc/irrlichtmt_tag.txt)
 ogg_version=1.3.5
 openal_version=1.21.1
 vorbis_version=1.3.7
index af6b5b3501301630abd6c245b7adf0ad46ffb9c3..9d222ab427ce7b7d24fe59417a76eeba502aa3a1 100755 (executable)
@@ -8,7 +8,7 @@ GAME_GIT=https://github.com/minetest/minetest_game
 GAME_BRANCH=master
 GAME_NAME=minetest_game
 
-dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+topdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 if [ $# -ne 1 ]; then
        echo "Usage: $0 <build directory>"
        exit 1
@@ -28,7 +28,7 @@ if [ -z "$compiler" ]; then
        echo "Unable to determine which MinGW compiler to use"
        exit 1
 fi
-toolchain_file=$dir/toolchain_${compiler/-gcc/}.cmake
+toolchain_file=$topdir/toolchain_${compiler/-gcc/}.cmake
 echo "Using $toolchain_file"
 
 # Try to find runtime DLLs in various paths (varies by distribution, sigh)
@@ -45,7 +45,7 @@ done
        echo "The compiler runtime DLLs could not be found, they might be missing in the final package."
 
 # Get stuff
-irrlicht_version=1.9.0mt7
+irrlicht_version=$(cat $topdir/../../misc/irrlichtmt_tag.txt)
 ogg_version=1.3.5
 openal_version=1.21.1
 vorbis_version=1.3.7
index db525a61c62aa209872ed3d027a8da7dd5545ccc..3015680c4b420754315f3f1ceb9656d92bf0c2e6 100644 (file)
@@ -10,7 +10,8 @@ install_linux_deps() {
        if [[ "$1" == "--no-irr" ]]; then
                shift
        else
-               wget "https://github.com/minetest/irrlicht/releases/download/1.9.0mt7/ubuntu-bionic.tar.gz"
+               local ver=$(cat misc/irrlichtmt_tag.txt)
+               wget "https://github.com/minetest/irrlicht/releases/download/$ver/ubuntu-bionic.tar.gz"
                sudo tar -xaf ubuntu-bionic.tar.gz -C /usr/local
        fi