Browse Source

Travis: Add build job with Blender 2.81

Rémi Verschelde 5 years ago
parent
commit
0ed31b2a0f
2 changed files with 15 additions and 7 deletions
  1. 8 1
      .travis.yml
  2. 7 6
      tests/install_blender.sh

+ 8 - 1
.travis.yml

@@ -7,6 +7,13 @@ cache:
     directories:
         - $HOME/.blender-cache
 
+matrix:
+    include:
+        - name: Blender 2.80
+          env: BLENDER_VERSION=2.80
+        - name: Blender 2.81
+          env: BLENDER_VERSION=2.81
+
 before_install:
     - sudo apt-get update
     - pip install --upgrade pip
@@ -15,7 +22,7 @@ before_install:
 install:
     - sudo apt-get install --no-install-recommends -y libsdl1.2debian libglu1 python3-pip
     - pip install -r requirements.txt
-    - bash tests/install_blender.sh
+    - bash tests/install_blender.sh ${BLENDER_VERSION}
     - source .envs
 
 script:

+ 7 - 6
tests/install_blender.sh

@@ -2,20 +2,21 @@
 
 set -e
 
-BLENDER_28_LINUX_64_URL="https://mirror.clarkson.edu/blender/release/Blender2.80/blender-2.80-linux-glibc217-x86_64.tar.bz2"
+BLENDER_VERSION=$1
 
-BLENDER_DIRNAME_REGEX_PATTERN='/Blender2\.80/(.+)\.tar\.bz2$'
-[[ ${BLENDER_28_LINUX_64_URL} =~ ${BLENDER_DIRNAME_REGEX_PATTERN} ]]
+BLENDER_LINUX_64_URL="https://mirror.clarkson.edu/blender/release/Blender${BLENDER_VERSION}/blender-${BLENDER_VERSION}-linux-glibc217-x86_64.tar.bz2"
+
+BLENDER_DIRNAME_REGEX_PATTERN='/Blender2\.[0-9]+/(.+)\.tar\.bz2$'
+[[ ${BLENDER_LINUX_64_URL} =~ ${BLENDER_DIRNAME_REGEX_PATTERN} ]]
 NAME=${BASH_REMATCH[1]}
 
-VERSION=2.80
 CACHE="${HOME}/.blender-cache"
 TAR="${CACHE}/${NAME}.tar.bz2"
 
-echo "Installing Blender ${VERSION}"
+echo "Installing Blender ${BLENDER_VERSION}"
 mkdir -p $CACHE
 if [ ! -f $TAR ]; then
-    wget -O $TAR $BLENDER_28_LINUX_64_URL
+    wget -O $TAR $BLENDER_LINUX_64_URL
 fi
 tar -xjf $TAR -C $HOME