- Docker
- docker-compose
- nvidia-docker runtime
- Pro Unity license
To run builds locally you run them via docker-compose.
First export necessary environment variables:
export UNITY_USERNAME=...
export UNITY_PASSWORD=...
export UNITY_SERIAL=...
export UNITY_VERSION="2020.3.19f1"
export UNITY_DOCKER_IMAGE="hdrp/unityci/editor-lgsvl"
export UNITY_DOCKER_IMAGE_TAG="2020.3.19f1-v0.15-4-g07a8336__build__31"
export PYTHONUNBUFFERED=1
export UID
export CODE_SIGNING_FILE=/dev/urandom
export FORCE_DEV_BUILD=true
docker-compose run --rm build-simulator check
Output will be in svlsimulator-check.html
file.
docker-compose run --rm build-simulator test
Output will be in svlsimulator-test.xml
file in NUnit v3 format
docker-compose run --rm build-simulator windows
Output will be svlsimulator-windows.zip
file.
Replace windows
with linux
or macos
to build for other OS'es.
docker-compose run --rm build-bundles
Output will be in AssetBundles folder.
To setup Pipeline CI job on jenkins following global environment variables are required:
UNITY_USERNAME
- Unity username for licenseUNITY_PASSWORD
- Unity username for passwordUNITY_SERIAL
- Unity username for serialUNITY_VERSION
- Version of Unity, ex:2020.3.19f1
GITLAB_HOST
- hostname of GitLab instance, ex:gitlab.example.com
UNITY_DOCKER_IMAGE
- name of Docker image, ex:gitlab.example.com:4567/hdrp/simulator
UNITY_DOCKER_IMAGE_TAG
- tag of Docker image with Unity, ex:2020.3.19f1-v0.15-4-g07a8336__build__31
SIMULATOR_ENVIRONMENTS
- comma separated list of environment bundles to build, ex:CubeTown,SanFrancisco
SIMULATOR_VEHICLES
- comma separated list of vehicle bundles to build, ex:Car1,Car2
S3_BUCKET_NAME
- AWS S3 bucket name to where upload bundlesSIMULATOR_STAGING_CLOUD_URL
- staging URL to use for cloud access, used only for non-release jobSIMULATOR_RELEASE_EMAILS
- comma separated e-mails where to send start/finish e-mails abour release job
Following credentials must be set up in Jenkins:
auto-gitlab
- ssh key for cloning git repositories, this key must have access to HDRP repositoriesauto-gitlab-docker-registry
- username/password combo for Docker registry on GitLab where to push Simulator docker imagedockerhub-docker-registry
- username/password combo for default Docker registry from docker deamon (usually dockerhub https://hub.docker.com/)s3--aws-credentials
- credentials to upload assets to s3s3-release--aws-credentials
- credentials to upload assets to release s3
Pipeline requires following parameters available:
BUILD_WINDOWS
- boolean param, with value "true" if Windows binary needs to be builtBUILD_LINUX
- boolean param, with value "true" if Linux binary needs to be builtBUILD_MACOS
- boolean param, with value "true" if macOS binary needs to be builtCLOUD_URL
- string param, if non-empty then the value will be used for cloud accessLGSVL_CODE_SIGNING_FILE
- secret file containing code signing key/certificate for AuthenticodeLGSVL_CODE_SIGNING_PASSWORD
- if nonempty then value of this variable will be used as password to code signing key fromLGSVL_CODE_SIGNING_FILE
secret file credential
It will automatically upload asset bundles to AWS S3 bucket when master
branch is built.
Job will produce following artifacts:
svlsimulator-check-BRANCH-NUM.html
svlsimulator-OS-BRANCH-NUM.zip
- for each OS selected for building