⚠️ NOTE: This project has been integrated into mob-sakai/docker, so we are NOT continuing development in this repository. ⚠️
Source of CI specialised docker images for Unity.
Inspired by game-ci/docker.
✳️ Changes from game-ci/docker
⚠️ Removed features- backend-versioning server (Use
workflow_dispatch
and unity-changeset instead) - Unity project for test (Move to another branch)
- backend-versioning server (Use
- Release automatically with semantic-release
- The release is based on a committed message
- Tagging based on Semantic Versioning 2.0.0
- Use
v1.0.0
insted ofv1.0
- Use
- Run workflow manually or automatically
- Build all images on tag pushed
- Build all editor images every 3 days
- Run workflow manually from Actions page.
- Fast skip earlier builds of images that already exist
- Support environment variables file (
.env
) for build settingsDOCKER_REGISTRY
DOCKER_USERNAME
BASE_IMAGE
HUB_IMAGE
EDITOR_IMAGE
MINIMUM_UNITY_VERSION
IGNORED_UNITY_VERSIONS
- The build specifies an unstable version and prevents flooding of the error notifications
IGNORED_IMAGE_TAGS
- Support for alpha/beta versions of Unity (e.g. 2020.2.0b, 2021.1.0a)
⚠️ NOTE: The versions removed from Unity beta will not be updated
- Grouping workflows in a module (base, ios, android, ...)
- Improve the visibility of actions page
- Easy to retry
Overwrite DOCKER_REGISTRY
, DOCKER_USERNAME
, BASE_IMAGE
, HUB_IMAGE
and EDITOR_IMAGE
in .env
.
# Docker Hub: docker.io
# GitHub Container Registory: ghcr.io
DOCKER_REGISTRY=ghcr.io
DOCKER_USERNAME=mob-sakai
# Full image ID
BASE_IMAGE=ghcr.io/mob-sakai/unity_base
HUB_IMAGE=ghcr.io/mob-sakai/unity_hub
EDITOR_IMAGE=ghcr.io/mob-sakai/unity3d
Overwite MINIMUM_UNITY_VERSION
, IGNORED_UNITY_VERSIONS
and IGNORED_IMAGE_TAGS
if you want.
# Minimum Unity version
MINIMUM_UNITY_VERSION=2018.3
# Ignored Unity versions (Regular expressions)
IGNORED_UNITY_VERSIONS="
^2020.2.0a
"
# Ignored image tags (Regular expressions)
IGNORED_IMAGE_TAGS="
^2018.*linux-il2cpp
^2019.1.*linux-il2cpp
^2019.2.*linux-il2cpp
"
Name | Description |
---|---|
DOCKER_TOKEN |
The access token or passward to longin docker registory. |
GH_WORKFLOW_TOKEN |
Github parsonal access token to dispatch workflow. |
All workflows will be run automatically.
Workflow | Description | Trigger | Inputs |
---|---|---|---|
Release |
Release new tag. | Pushed commits (include feat or fix) on main branch |
- |
Build All |
Build all images. (base/hub/editor) |
A new tag pushed | - |
Build Editor |
Build editor images with a specific Unity module | Dispatched from Build All |
module: Unity module to build. repoTag: The repository tag to build. |
Request Activation License File |
Request Activation License File | Dispatched from Build Editor (Base) |
repoTag: The repository tag to build. |
You can run them manually from the Actions page.
NOTE: You need permissions to run the workflow.
jobs:
unity-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
unity:
[
2019.3.15f1,
2019.4.16f1,
2020.1.16f1,
]
steps:
- uses: actions/checkout@v2
- uses: mob-sakai/unity-test-runner@main
with:
customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unity }}
customParameters: "-nographics"
testMode: editmode
env:
UNITY_LICENSE_FILE: .ulfs/Unity_v${{ matrix.unity }}.ulf
- uses: actions/upload-artifact@v2
if: failure()
with:
path: "*.alf"
https://unity-ci.com/docs/github/getting-started
https://github.com/webbertakken/unity-actions
Use with CustomImage
parameter.
Because the combination of the editor build is so large, the builds may fail due to the time limit of github actions (<6 hours) or API limitations.
Re-run Build All
workflow manually after all jobs are done.
If a missing library is found, fix the dockerfiles/editor.Dockerfile
in local.
If the problem is solved, fix the dockerfiles/base.Dockerfile
in the main
branch.
- Test the build for each patch versions (2018.3.0, 2018.3.1, ...)
- May be unnecessary for stable versions (2018.x, 2019.x)
- Build a simple project for all platforms
- Inspect the missing library
- Notify the error summary to mail, Slack or Discord