UniTask/.circleci/config.yml

47 lines
2.2 KiB
YAML
Raw Normal View History

2019-05-20 00:09:12 +08:00
version: 2.1
executors:
2019-05-20 00:15:41 +08:00
unity_2018_3_12f1:
2019-05-20 00:09:12 +08:00
docker:
# https://hub.docker.com/r/gableroux/unity3d/tags
- image: gableroux/unity3d:2018.3.12f1
commands:
unity_activate:
2019-05-20 00:21:38 +08:00
steps:
2019-05-20 00:09:12 +08:00
# requires: parameters.unity_version and parameters.unity_license.
# 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
2019-05-20 00:15:41 +08:00
- run: cat << parameters.unity_version >>.alf # file name same as image's version
2019-05-20 00:09:12 +08:00
# 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:
executor: unity_<< parameters.unity_version >>
steps:
- checkout
- unity_activate
# - 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:
2019-05-20 00:23:58 +08:00
- build-and-test:
2019-05-20 00:15:41 +08:00
unity_version: 2018.3.12f1
unity_license: ${UNITY_LICENSE_2018_3}