CI specialised docker images for Unity3d.
Unity - Builder and Unity - Test runner actions support customImage parameter:
- uses: game-ci/unity-test-runner@v2
with:
customImage: mobsakai/unity3d:2020.3.0f1-webgl
...jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
unityVersion:
[
2019.3.15f1,
2019.4.16f1,
2020.1.16f1,
]
include:
- targetPlatform: StandaloneLinux64
module: -base
- targetPlatform: StandaloneOSX
module: -mac
- targetPlatform: StandaloneWindows64
module: -windows
- targetPlatform: iOS
module: -ios
- targetPlatform: Android
module: -android
- targetPlatform: WebGL
module: -webgl
steps:
- uses: actions/checkout@v2
- uses: game-ci/unity-test-runner@v2
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }
with:
customImage: mobsakai/unity3d:${{ matrix.unityVersion }}${{ matrix.module }}
customParameters: -nographics
targetPlatform: ${{ matrix.targetPlatform }}
githubToken: ${{ github.token }}
- uses: game-ci/unity-builder@v2
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
customImage: mobsakai/unity3d:${{ matrix.unityVersion }}${{ matrix.module }}
targetPlatform: ${{ matrix.targetPlatform }}
- uses: actions/upload-artifact@v2
with:
name: Build
path: buildFor details, see https://game.ci/docs/github/getting-started
β³οΈ Changes from game-ci/docker
- Remove original workflows
- Cats
- Docs
- New Versions (Base/Hub/Editor/Retry)
- PR
- Remove backend-versioning server (Use
workflow_dispatchand unity-changeset instead) - Release automatically with semantic-release
- The release is based on a committed message
- Tagging based on Semantic Versioning 2.0.0
- Use
v1.0.0insted ofv1.0
- Use
- Run workflow manually or automatically
- Build all images on tag pushed
- Check/Build all new editor images every day
- Run workflow manually from Actions page
- Fast skip earlier builds of images that already exist
- Add build configurations file (
.github/workflow/.env) - Support for alpha/beta versions of Unity (e.g. 2022.1.0a, 2021.2.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
- Support short image tags (eg.
mobsakai/unity3d:2020.3.0f1for Linux (Mono),mobsakai/unity3d:2020.3.0f1-webglfor WebGL, etc.) - Image tags that fail to build twice will automatically be ignored
- This locked issue is used for failure log
See .env
# ================= Registry settings =================
DOCKER_REGISTRY=docker.io
# DOCKER_REGISTRY=ghcr.io
# DOCKER_REGISTRY=gcr.io
# ================ Repository settings ================
BASE_IMAGE_REPOSITORY=mobsakai/unity3d_base
HUB_IMAGE_REPOSITORY=mobsakai/unity3d_hub
EDITOR_IMAGE_REPOSITORY=mobsakai/unity3d
# =================== Build settings ==================
UBUNTU_IMAGE=ubuntu:18.04
MINIMUM_UNITY_VERSION=2018.3
INCLUDE_BETA_VERSIONS=true
# Excluded image tags (Regular expressions)
EXCLUDE_IMAGE_TAGS="
2018.*-linux-il2cpp
2019.1.*-linux-il2cpp
2019.2.*-linux-il2cpp
<<AUTO_IGNORED_IMAGE_TAGS>>
"| Name | Description |
|---|---|
DOCKER_USERNAME |
Docker username to login. |
DOCKER_PASSWORD |
Docker password or access token to login. |
GH_WORKFLOW_TOKEN |
A Github parsonal access token with workflow premission. |
All workflows will be run automatically.
| Workflow | Description | Trigger |
|---|---|---|
Release |
Release new tag. | - Pushed commits (include feat or fix) on main branch |
Build All |
Build base/hub images and dispatch Build Editor workflows. |
- Released a new version - Scheduled (daily) - New Unity version released |
Build Editor |
Build editor images with a specific Unity module | - Dispatched from Build All |
You can run them manually from the Actions page.
NOTE: You need permissions to run the workflow.
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 editor/Dockerfile or base/Dockerfile.
- 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
π << The following is the original Readme >> π
(Not affiliated with Unity Technologies)
Source of CI specialised docker images for Unity, free to use for everyone.
Please find our website for any related documentation.
See the base readme for base image usage.
See the hub readme for hub image usage.
See the editor readme for editor image usage.
Feel free to join us on
and engage with the community.
To contribute, please see the development readme after you agree with our code of conduct and have read the contribution guide.
GameCI is free for everyone forever.
You can support us at OpenCollective.
This repository is MIT licensed.
This includes all contributions from the community.