Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into 490-ui-panels-simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
jatubi committed Mar 9, 2021
2 parents 5d25d58 + 955bb7a commit d0ed09b
Show file tree
Hide file tree
Showing 10 changed files with 286 additions and 130 deletions.
148 changes: 118 additions & 30 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ stages:
- deploy

flake8:
extends:
- .except_nightly_test
tags:
- docker
image: python:3
Expand All @@ -13,12 +15,15 @@ flake8:
- flake8 -v mixer tests extra

zip:
extends:
- .except_nightly_test
tags:
- docker
image: alpine
stage: pre_release
script:
- cp CHANGELOG.md README.md LICENSE mixer/
- rm -rf mixer/blender_data/tests/
artifacts:
name: "${CI_PROJECT_NAME}_${CI_COMMIT_REF_NAME}_${CI_COMMIT_SHORT_SHA}"
paths:
Expand All @@ -34,21 +39,33 @@ zip:

# Note: you cannot extend this job with another except: variables job
# If you need that, you should rewrite and combine the rules
.exclude_on_gitlab.com:
.except_on_gitlab.com:
except:
variables:
- $CI_SERVER_URL == "https://gitlab.com"

# Note: you cannot extend this job with another only: variables job
# If you need that, you should rewrite and combine the rules
.on_version_tag:
.only_version_tag:
only:
refs:
# see inject_version.py
- /^v([0-9]+)\.([0-9]+)\.([0-9]+)(\-[0-9A-Za-z-]+)?(\+[0-9A-Za-z-]+)?$/

.except_nightly_test:
except:
variables:
- $NIGHTLY_TEST == "true"

.only_nightly_test:
only:
variables:
- $NIGHTLY_TEST == "true"

release:
extends: .on_version_tag
extends:
- .only_version_tag
- .except_nightly_test
dependencies:
- zip
tags:
Expand All @@ -63,14 +80,19 @@ release:
paths:
- mixer-${CI_COMMIT_REF_NAME}.zip

####################################################################################

# https://gitlab-ncsa.ubisoft.org/help/ci/yaml/README.md
.base_unittest:


.test_base:
stage: pre_release
except:
variables:
- $CI_COMMIT_MESSAGE =~ /\[skip-tests\]/
tags:
- blender
variables:
MIXER_BLENDER_ZIP_BASENAME: blender-2.91.0-windows64
MIXER_BLENDER_VERSION_BASE: "2.91"
MIXER_BASH_EXE: C:\Program Files\Git\bin\bash.exe
VRTIST_PORT: 25600 # In case a server is already running on our default port on the test computer
MIXER_TEST_OUTPUT: logs\tests
Expand All @@ -86,33 +108,98 @@ release:
reports:
junit:
- logs\tests\*.xml

unittest:

.test_version_dev:
variables:
MIXER_BLENDER_ZIP_BASENAME: blender-2.91.0-windows64
MIXER_BLENDER_VERSION_BASE: "2.91"
MIXER_BLENDER_DOWNLOAD: "release"

test_dev:
extends:
- .base_unittest
except:
variables:
- $CI_COMMIT_MESSAGE =~ /\[skip-tests\]/
- $CI_SERVER_URL == "https://gitlab.com"
- .test_base
- .test_version_dev
- .except_nightly_test

unittest_gitlab.com:
.test_version_2.91.2:
extends:
- .base_unittest
except:
variables:
- $CI_COMMIT_MESSAGE =~ /\[skip-tests\]/
only:
refs:
# see inject_version.py
- /^v([0-9]+)\.([0-9]+)\.([0-9]+)(\-[0-9A-Za-z-]+)?(\+[0-9A-Za-z-]+)?$/
variables:
- $CI_SERVER_URL == "https://gitlab.com"
- .test_base
variables:
MIXER_BLENDER_VERSION_BASE: "2.91"
MIXER_BLENDER_ZIP_BASENAME: blender-2.91.2-windows64
MIXER_BLENDER_DOWNLOAD: "release"

.deploy_network_folder:
test_2.91.2:
extends:
- .test_version_2.91.2
- .only_nightly_test
- .except_on_gitlab.com

test_2.91.2_manual:
extends:
- .test_version_2.91.2
- .except_nightly_test
- .except_on_gitlab.com
when: manual

.test_version_2.92:
extends:
- .test_base
variables:
MIXER_BLENDER_VERSION_BASE: "2.92"
MIXER_BLENDER_ZIP_BASENAME: blender-2.92.0-windows64
MIXER_BLENDER_DOWNLOAD: "release"

test_2.92:
extends:
- .test_version_2.92
- .only_nightly_test
- .except_on_gitlab.com

test_2.92_manual:
extends:
- .test_version_2.92
- .except_nightly_test
- .except_on_gitlab.com
when: manual

.test_version_2.93.alpha:
extends:
- .test_base
variables:
MIXER_BLENDER_VERSION_BASE: "2.93"
# from https://builder.blender.org/download/
MIXER_BLENDER_ZIP_BASENAME: blender-2.93.${blender_alpha}-windows64
MIXER_BLENDER_DOWNLOAD: "builder"

test_2.93.alpha:
extends:
- .test_version_2.93.alpha
- .only_nightly_test
- .except_on_gitlab.com

test_2.93.alpha_manual:
extends:
- .test_version_2.93.alpha
- .except_nightly_test
- .except_on_gitlab.com
when: manual

test_gitlab.com:
extends:
- .on_version_tag
- .exclude_on_gitlab.com
- .test_base
- .test_version_dev
- .only_version_tag
- .only_on_gitlab.com

#########################################################################################

.deploy_network_folder:
stage: deploy
extends:
- .only_version_tag
- .except_on_gitlab.com
- .except_nightly_test
tags:
- linux
- uas_network_drive
Expand All @@ -121,10 +208,11 @@ unittest_gitlab.com:
when: manual

.deploy_perforce_folder:
extends:
- .on_version_tag
- .exclude_on_gitlab.com
stage: deploy
extends:
- .only_version_tag
- .except_on_gitlab.com
- .except_nightly_test
tags:
- linux
- uas_perforce_client
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# 0.22.0 (wip)

## Features

- Grease pencil: synchronize effects

## Fixes

- Object modifier synchronization failure on Blender 2.92
- VSE synchronization error on 2.92

## CI

- Run unit tests against several Blender versions

# 0.21.1 (22-02-2021)

## Fixes
Expand Down
7 changes: 0 additions & 7 deletions gitlab/download_blender.sh

This file was deleted.

9 changes: 9 additions & 0 deletions gitlab/download_blender_builder.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

set -e
set -x

CURRENT_DIR=`dirname $0`
mkdir -p $CURRENT_DIR/blender/cache/
curl https://builder.blender.org/download/$MIXER_BLENDER_ZIP_BASENAME.zip -o $CURRENT_DIR/blender/cache/$MIXER_BLENDER_ZIP_BASENAME.zip
ls -l $CURRENT_DIR/blender/cache/$MIXER_BLENDER_ZIP_BASENAME.zip
9 changes: 9 additions & 0 deletions gitlab/download_blender_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

set -e
set -x

CURRENT_DIR=`dirname $0`
mkdir -p $CURRENT_DIR/blender/cache/
curl https://download.blender.org/release/Blender$MIXER_BLENDER_VERSION_BASE/$MIXER_BLENDER_ZIP_BASENAME.zip -o $CURRENT_DIR/blender/cache/$MIXER_BLENDER_ZIP_BASENAME.zip
ls -l $CURRENT_DIR/blender/cache/$MIXER_BLENDER_ZIP_BASENAME.zip
31 changes: 20 additions & 11 deletions gitlab/run_unittest.bat
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,33 @@ set

REM create local folders if required
if not exist %CURRENT_DIR%\blender mkdir %CURRENT_DIR%\blender
if not exist %CURRENT_DIR%\blender\cache mkdir %CURRENT_DIR%\blender\cache
set CACHE=%CURRENT_DIR%\blender\cache
if not exist %CACHE% mkdir %CACHE%

REM remove old blender install if it exists
IF NOT EXIST %CURRENT_DIR%\blender\%MIXER_BLENDER_ZIP_BASENAME% GOTO DOWNLOADZIP
RMDIR /S /Q %CURRENT_DIR%\blender\%MIXER_BLENDER_ZIP_BASENAME%
RD /S /Q %CURRENT_DIR%\blender\%MIXER_BLENDER_ZIP_BASENAME%

:DOWNLOADZIP
IF %MIXER_BLENDER_DOWNLOAD% == "release" GOTO DOWNLOADZIP
REM Download from builder: always cleanup, files are never reusable
REM - Beta file changes event if name does not
REM - Alpha file has hash in name
RMDIR /S /Q %CACHE%\%MIXER_BLENDER_ZIP_BASENAME%
DEL %CACHE%\%MIXER_BLENDER_ZIP_BASENAME%.zip

:DOWNLOADZIP
REM if unzipped folder already exists in cache folder, just copy it
IF EXIST %CURRENT_DIR%\blender\cache\%MIXER_BLENDER_ZIP_BASENAME% GOTO COPYUNZIPEDFOLDER

IF EXIST %CURRENT_DIR%\blender\cache\%MIXER_BLENDER_ZIP_BASENAME%.zip GOTO UNZIP
IF EXIST %CACHE%\%MIXER_BLENDER_ZIP_BASENAME% GOTO COPYUNZIPEDFOLDER
IF EXIST %CACHE%\%MIXER_BLENDER_ZIP_BASENAME%.zip GOTO UNZIP

REM rely on a bash script to download blender, to bypass proxy issues with powershell Invoke-WebRequest
"%MIXER_BASH_EXE%" %CURRENT_DIR%\download_blender.sh
"%MIXER_BASH_EXE%" %CURRENT_DIR%\download_blender_%MIXER_BLENDER_DOWNLOAD%%.sh

:UNZIP

REM unzip blender
powershell Expand-Archive %CURRENT_DIR%\blender\cache\%MIXER_BLENDER_ZIP_BASENAME%.zip -DestinationPath %CURRENT_DIR%\blender\cache
powershell Expand-Archive %CACHE%\%MIXER_BLENDER_ZIP_BASENAME%.zip -DestinationPath %CURRENT_DIR%\blender\cache

:COPYUNZIPEDFOLDER
xcopy /S /Q /Y /F %CURRENT_DIR%\blender\cache\%MIXER_BLENDER_ZIP_BASENAME% %CURRENT_DIR%\blender\%MIXER_BLENDER_ZIP_BASENAME%\
xcopy /S /Q /Y /F %CACHE%\%MIXER_BLENDER_ZIP_BASENAME% %CURRENT_DIR%\blender\%MIXER_BLENDER_ZIP_BASENAME%\

REM create config folder to isolate blender from user environment
powershell New-Item -ItemType Directory -Path %CURRENT_DIR%\blender\%MIXER_BLENDER_ZIP_BASENAME%\%MIXER_BLENDER_VERSION_BASE%\config
Expand All @@ -61,5 +65,10 @@ if %ERRORLEVEL% GEQ 1 SET ERROR=%ERRORLEVEL%
%PYTHON% -m xmlrunner discover --verbose tests.blender -o %MIXER_TEST_OUTPUT%
if %ERRORLEVEL% GEQ 1 SET ERROR=%ERRORLEVEL%

IF %MIXER_BLENDER_DOWNLOAD% == "release" GOTO END
REM Download from builder: always cleanup, files are never reusable
RMDIR /S /Q %CACHE%\%MIXER_BLENDER_ZIP_BASENAME%
DEL %CACHE%\%MIXER_BLENDER_ZIP_BASENAME%.zip

:END
if %ERROR% GEQ 1 EXIT /B %ERROR%
5 changes: 4 additions & 1 deletion mixer/blender_data/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,10 @@ def unhandled_bpy_data_collection_names(self) -> List[str]:
]
)
],
#
T.Modifier: [
# UI
NameFilterOut(["is_active"])
],
T.Node: [
NameFilterOut(
[
Expand Down
Loading

0 comments on commit d0ed09b

Please sign in to comment.