UniTask/.circleci/config.yml

71 lines
2.9 KiB
YAML

version: 2.1
executors:
unity:
# https://hub.docker.com/r/gableroux/unity3d/tags
parameters:
version: {type: string}
docker:
- image: gableroux/unity3d:<< parameters.version >>
commands:
unity_activate:
parameters:
unity_version: {type: string}
unity_license: {type: string}
steps:
# get activation file, if fail to activate unity, use this key and activate from https://license.unity3d.com/manual
- run: apt update && apt install libunwind8 -y
- run: /opt/Unity/Editor/Unity -quit -batchmode -nographics -logFile -createManualActivationFile || exit 0
- run: cat Unity_v<< parameters.unity_version >>.alf
# get from UNITY_LICENSE envvar(base64 encoded(cat foo.ulf | base64 )), this file is generated from above manual activation
- run: echo << parameters.unity_license >> | base64 -di >> .circleci/Unity.ulf
- run: /opt/Unity/Editor/Unity -quit -batchmode -nographics -silent-crashes -logFile -manualLicenseFile .circleci/Unity.ulf || exit 0
jobs:
build-and-test:
parameters:
unity_version: {type: string}
unity_license: {type: string}
executor:
name: unity
version: << parameters.unity_version >>
steps:
- checkout
- unity_activate:
unity_version: << parameters.unity_version >>
unity_license: << parameters.unity_license >>
# - run:
# name: Build Linux(Mono)
# command: /opt/Unity/Editor/Unity -quit -batchmode -nographics -silent-crashes -logFile -projectPath . -executeMethod UnitTestBuilder.BuildUnitTest /headless /ScriptBackend Mono2x /BuildTarget StandaloneLinux64
# working_directory: src/RandomFixtureKit.Unity
# - run: src/RandomFixtureKit.Unity/bin/UnitTest/StandaloneLinux64_Mono2x/test
# build-and-create-package:
# executor: unity
# steps:
# - checkout
# - unity_activate
# - run:
# name: Export unitypackage
# command: /opt/Unity/Editor/Unity -quit -batchmode -nographics -silent-crashes -logFile -projectPath . -executeMethod PackageExporter.Export
# working_directory: src/MagicOnion.Client.Unity
# - store_artifacts:
# path: src/MagicOnion.Client.Unity/MagicOnion.Client.Unity.unitypackage
# destination: /MagicOnion.Client.Unity.unitypackage
workflows:
version: 2
build-unity:
jobs:
- build-and-test:
unity_version: 2019.3.0a2
unity_license: ${UNITY_LICENSE_2019_3}
- build-and-test:
unity_version: 2019.2.0b2
unity_license: ${UNITY_LICENSE_2019_2}
- build-and-test:
unity_version: 2019.1.3f1
unity_license: ${UNITY_LICENSE_2019_1}
- build-and-test:
unity_version: 2018.4.0f1
unity_license: ${UNITY_LICENSE_2018_4}
# UniTask minimum support version is 2018.3(C# 7.x)
- build-and-test:
unity_version: 2018.3.14f1
unity_license: ${UNITY_LICENSE_2018_3}