Skip to content

Commit

Permalink
Merge pull request #330 from Unity-Technologies/dev
Browse files Browse the repository at this point in the history
FTV-699 Alembic Release 2.0.1
  • Loading branch information
clusty authored May 25, 2020
2 parents fae5951 + 039bb2b commit 996a9d6
Show file tree
Hide file tree
Showing 77 changed files with 3,947 additions and 449 deletions.
82 changes: 40 additions & 42 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,67 +1,64 @@
# see http://editorconfig.org/ for docs on this file
; see http://editorconfig.org/ for docs on this file

root = true

[*]
# help with sharing files across os's (i.e. network share or through local vm)
end_of_line = lf
ignore_if_in_header = This code was generated by a tool|<auto-generated>
indent_style = space
indent_size = 4
; uncomment to help with sharing files across os's (i.e. network share or through local vm)
#end_of_line = lf
; avoid a bom, which causes endless problems with naive text tooling
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
; keeping auto-format enabled helps avoid merge hell for projects without CI-based format validation
#disable_auto_format = true

# formattable file extensions (keep in sync with format.ini from unity-meta repo)
#
# Note: We need to split the formattable files configs into shorter duplicate entries (logically grouped)
# due to known issue in VS editorconfig extension where there is a limit of 51 characters (empirically determined).
# see: https://github.com/editorconfig/editorconfig-visualstudio/issues/21
#
## uncrustify
[*.{c,h,cpp,hpp,m,mm,cc,cs}]
indent_style = space
indent_size = 4
[*.cs]
; uncomment to enable full formatting of c# files
formatters = generic, uncrustify

## generic formatter (shaders)
[*.{cg,cginc,glslinc,hlsl,shader,y,ypp,yy}]
indent_style = space
indent_size = 4
[*.asmdef]
scrape_api = true

## generic formatter (misc)
[*.{asm,s,S,pch,pchmm,java,sh,uss}]
indent_style = space
indent_size = 4
[**/Tests/**.asmdef]
scrape_api = false

## perltidy
[*.{pl,pm,t,it}]
indent_style = space
indent_size = 4
[*.Tests.asmdef]
scrape_api = false

## unity special
[*.{bindings,mem.xml}]
indent_style = space
indent_size = 4
[*.md]
indent_size = 2
; trailing whitespace is unfortunately significant in markdown
trim_trailing_whitespace = false
; uncomment to enable basic formatting of markdown files
#formatters = generic

# other filetypes we want to overwrite default configuration to preserve the standard
[{Makefile,makefile}]
# TAB characters are part of the Makefile format
; tab characters are part of the Makefile format
indent_style = tab

[*.{md,markdown}]
# trailing whitespace is significant in markdown (bad choice, bad!)
trim_trailing_whitespace = false
[*.asmdef]
indent_size = 4

[*.{json,asmdef}]
indent_style = space
# seems to be more common
[*.json]
indent_size = 2

# keep these and the VS stuff below in sync with .hgeol's CRLF extensions
[*.{vcproj,bat,cmd,xaml,tt,t4,ttinclude}]
end_of_line = crlf

# this VS-specific stuff is based on experiments to see how VS will modify a file after it has been manually edited.
# the settings are meant to closely match what VS does to minimize unnecessary diffs. this duplicates some settings in *
# but let's be explicit here to be safe (in case someone wants to copy-paste this out to another .editorconfig).
[*.{vcxproj,vcxproj.filters,csproj,props,targets}]
; this VS-specific stuff is based on experiments to see how VS will modify a file after it has been manually edited.
; the settings are meant to closely match what VS does to minimize unnecessary diffs.
[*.{vcxproj,vcxproj.filters}]
indent_style = space
indent_size = 2
end_of_line = crlf
charset = utf-8-bom
trim_trailing_whitespace = true
insert_final_newline = false
; must be broken out because of 51-char bug (https://github.com/editorconfig/editorconfig-visualstudio/issues/21)
[*.{csproj,pyproj,props,targets}]
indent_style = space
indent_size = 2
end_of_line = crlf
Expand All @@ -72,5 +69,6 @@ insert_final_newline = false
indent_style = tab
indent_size = 4
end_of_line = crlf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false
35 changes: 22 additions & 13 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
* text=auto
*.txt text
*.cmake text
*.h text
*.c text
*.hpp text
*.cpp text
*.ispc text
*.cs text
*.bat text eol=crlf
*.sln text eol=crlf
*.vcxproj text eol=crlf
*.vcxproj.filters text eol=crlf
* text=auto eol=lf

# match .editorconfig

*.vcproj eol=crlf
*.bat eol=crlf
*.cmd eol=crlf
*.xaml eol=crlf
*.tt eol=crlf
*.t4 eol=crlf
*.ttinclude eol=crlf

*.vcxproj eol=crlf
*.vcxproj.filters eol=crlf

*.csproj eol=crlf
*.pyproj eol=crlf
*.props eol=crlf
*.targets eol=crlf

*.sln eol=crlf
*.sln.template eol=crlf
8 changes: 5 additions & 3 deletions .yamato/promotion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ promotion_fetch:
variables:
UPMCI_PROMOTION: 1
commands:
- npm install upm-ci-utils@latest -g --registry https://api.bintray.com/npm/unity/unity-npm
- npm install upm-ci-utils@latest -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci package pack --package-path com.unity.formats.alembic
artifacts:
packages:
Expand All @@ -38,7 +38,7 @@ promotion_test_{{ platform.name }}_{{ editor.version }}:
variables:
UPMCI_PROMOTION: 1
commands:
- npm install upm-ci-utils@latest -g --registry https://api.bintray.com/npm/unity/unity-npm
- npm install upm-ci-utils@latest -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci package test --unity-version {{ editor.version }} --package-path com.unity.formats.alembic
artifacts:
logs:
Expand All @@ -55,6 +55,8 @@ promotion_test_trigger:
type: Unity::VM
image: package-ci/win10:stable
flavor: b1.large
commands:
- dir
artifacts:
logs:
paths:
Expand All @@ -78,7 +80,7 @@ promote:
variables:
UPMCI_PROMOTION: 1
commands:
- npm install upm-ci-utils@latest -g --registry https://api.bintray.com/npm/unity/unity-npm
- npm install upm-ci-utils@latest -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci package promote --package-path com.unity.formats.alembic
triggers:
tags:
Expand Down
51 changes: 38 additions & 13 deletions .yamato/upm-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ platforms:
flavor: b1.large
- name: mac
type: Unity::VM::osx
image: buildfarm/mac:stable
image: package-ci/mac:latest
flavor: m1.mac
- name: centOS
type: Unity::VM
type: Unity::VM::GPU
image: package-ci/centos:latest
flavor: b1.large

Expand All @@ -36,7 +36,7 @@ build_mac:
name: Build Mac
agent:
type: Unity::VM::osx
image: buildfarm/mac:stable
image: package-ci/mac:latest
flavor: m1.mac
commands:
- git submodule update --init --recursive
Expand All @@ -54,7 +54,7 @@ build_centOS:
flavor: b1.large
commands:
- git submodule update --init --recursive
- scl enable devtoolset-6 ./build.sh
- scl enable devtoolset-7 ./build.sh

artifacts:
build:
Expand All @@ -65,10 +65,10 @@ pack:
name: Pack
agent:
type: Unity::VM::osx
image: buildfarm/mac:stable
image: package-ci/mac:latest
flavor: m1.mac
commands:
- npm install upm-ci-utils -g --registry https://api.bintray.com/npm/unity/unity-npm
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci package pack --package-path com.unity.formats.alembic
artifacts:
packages:
Expand All @@ -92,8 +92,12 @@ test_{{ platform.name }}_{{ editor.version }}:
image: {{ platform.image }}
flavor: {{ platform.flavor}}
commands:
- npm install upm-ci-utils -g --registry https://api.bintray.com/npm/unity/unity-npm
- upm-ci package test --unity-version {{ editor.version }} --package-path com.unity.formats.alembic
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
{% if platform.name == 'centOS' %}
- DISPLAY=:0 upm-ci package test --unity-version {{ editor.version }} --package-path com.unity.formats.alembic --enable-code-coverage --code-coverage-options 'enableCyclomaticComplexity;generateHtmlReport'
{% else %}
- upm-ci package test --unity-version {{ editor.version }} --package-path com.unity.formats.alembic --enable-code-coverage --code-coverage-options 'enableCyclomaticComplexity;generateHtmlReport'
{% endif %}
artifacts:
logs.zip:
paths:
Expand Down Expand Up @@ -131,12 +135,35 @@ test_trigger:
- .yamato/upm-ci.yml#pack
{% for editor in editors %}
{% for platform in platforms %}
{% if platform.name != 'centOS' %}
- .yamato/upm-ci.yml#test_{{platform.name}}_{{editor.version}}
{% endif %}
{% endfor %}
{% endfor %}

nightly_test_trigger:
name: Nightly tests Trigger
agent:
type: Unity::VM
image: package-ci/win10:stable
flavor: b1.large
commands:
- dir
triggers:
recurring:
- branch: dev
frequency: daily
- branch: master
frequency: daily
artifacts:
logs:
paths:
- "upm-ci~/test-results/**/*"
packages:
paths:
- "upm-ci~/packages/**/*"
dependencies:
- .yamato/upm-ci.yml#pack
- .yamato/upm-ci.yml#test_trigger

publish:
name: Publish
agent:
Expand All @@ -145,7 +172,7 @@ publish:
flavor: b1.large
name: Runner
commands:
- npm install upm-ci-utils -g --registry https://api.bintray.com/npm/unity/unity-npm
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci package publish --package-path com.unity.formats.alembic
triggers:
tags:
Expand All @@ -163,8 +190,6 @@ publish:
- .yamato/upm-ci.yml#pack
{% for editor in editors %}
{% for platform in platforms %}
{% if platform.name != 'centOS' %}
- .yamato/upm-ci.yml#test_{{platform.name}}_{{editor.version}}
{% endif %}
{% endfor %}
{% endfor %}
16 changes: 0 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,10 @@ PROJECT(AlembicForUnity LANGUAGES C CXX)

set(CMAKE_VERBOSE_MAKEFILE ON)

# Get git tag as package version
find_package(Git REQUIRED)
execute_process(COMMAND ${GIT_EXECUTABLE} describe --tags HEAD
OUTPUT_VARIABLE PACKAGE_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)
# only keep x.y.z[-preview.n]
string(REGEX REPLACE "^.*([0-9]\.[0-9]\.[0-9].*)$" "\\1" PACKAGE_VERSION "${PACKAGE_VERSION}")

# Get git revision hash as package revision
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
OUTPUT_VARIABLE PACKAGE_REVISION
OUTPUT_STRIP_TRAILING_WHITESPACE)

configure_file(${CMAKE_SOURCE_DIR}/package.json.in ${CMAKE_BINARY_DIR}/package.json @ONLY)

add_subdirectory("Source/")

# create package
install(DIRECTORY com.unity.formats.alembic/ DESTINATION ${CMAKE_INSTALL_PREFIX}/com.unity.formats.alembic PATTERN *.in EXCLUDE)
install(FILES ${CMAKE_BINARY_DIR}/package.json DESTINATION ${CMAKE_INSTALL_PREFIX}/com.unity.formats.alembic)
install(FILES
DESTINATION ${CMAKE_INSTALL_PREFIX}/com.unity.formats.alembic)
install(FILES ${CMAKE_SOURCE_DIR}/LICENSE.md DESTINATION ${CMAKE_INSTALL_PREFIX}/com.unity.formats.alembic)
Loading

0 comments on commit 996a9d6

Please sign in to comment.