You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# The above line corresponds to https://internaldocs.unity.com/yamato_continuous_integration/usage/templating/
4
+
5
+
# Yamato paths disclaimer:
6
+
# Note that artifacts can get only local paths and since cloned project is in different location, you need to be careful with paths
7
+
# All artifact paths are defined relative to the Yamato source directory (YAMATO_SOURCE_DIR) and are case-sensitive.
8
+
# !!! important “Artifact directory locations” All artifact globs are defined relative to the source directory (YAMATO_SOURCE_DIR). Yamato can’t capture artifacts from outside this directory, so if you need files from elsewhere, you should copy them into your source directory as part of job commands.
9
+
10
+
# Those jobs were created in order to (in most cases) speed up playtesting and development time.
11
+
# The aim is to collect all possible projects that use Netcode for Entities and create a job that will build the project with the given version of N4E package.
12
+
# The package is taken directly from the branch from which the job was triggered. So image triggering the job from release/2.0.0 and release/2.1.0 branch to compare differences
13
+
# Example use case would be to trigger the build job on Sunday so by Monday morning all builds are ready for playtesting. This limits the time a dev/QA has to spend building projects for different configurations (win, mac, Android, scripting backends, burst etc) or simply time necessary for building huge projects (Megacity).
14
+
15
+
# This job takes parameters as scriptable backend configuration, burst compilation, unity editor version and platform.
16
+
# Since Yamato variables can't be restricted to only specific values, the job will validate the parameters passed to it and fail quickly if those are incorrect. In order to see what options are available, please look at the variable name.
17
+
18
+
# Note that for now all of those builds are being made on Windows machine (so for example combination of macOS + il2cpp is expected to fail)
19
+
# TODO: for now all builds are being made on Windows machine, but it would be nice to have a Mac build as well.
- echo Building {{ netcodeProject[0] }} project with Unity version of %UNITY_VERSION%, Scripting backend %SCRIPTING_BACKEND_IL2CPP_MONO%, Burst %BURST_ON_OFF% for platform %PLATFORM_WIN64_MAC_ANDROID%
37
+
38
+
# Clone the external project repository into a specific directory. Notice that branch is also specified.
# Modify the external project's manifest to use the local N4E package from current branch on which this Yamato job is running. (requires python that should be preinstalled in the image)
# Download the Unity Editor version specified in the UNITY_VERSION variable. Il2cpp component is downloaded only if the SCRIPTING_BACKEND_IL2CPP_MONO is set to "il2cpp".
53
+
# TODO: we could download components only if needed
# Add BuilderScript.cs to the project so we can modify and build the project using Unity Editor.
57
+
# This is a bit tricky step, notice that we also need to include proper assembly definition in order for those scripts to compile properly.
58
+
# TODO: the asmdef file can be simplified
59
+
- python -c "import os; os.makedirs('C:/ClonedProject/{{ netcodeProject[1].projectPath }}/Assets/Scripts/Editor', exist_ok=True)" # --> Create the directory if it doesn't exist
60
+
- python -c "import shutil; shutil.copy('Tools/CI/scripts/BuildAutomation/Unity.ProjectBuild.Editor.asmdef', 'C:/ClonedProject/{{ netcodeProject[1].projectPath }}/Assets/Scripts/Editor/')" # --> Copy the asmdef file to the directory
61
+
- python -c "import shutil; shutil.copy('Tools/CI/scripts/BuildAutomation/BuilderScripts.cs', 'C:/ClonedProject/{{ netcodeProject[1].projectPath }}/Assets/Scripts/Editor/')" # --> Copy the BuilderScripts.cs file to the directory (for build configuration setup)
62
+
63
+
# Build the project using Unity Editor. This will call the given static BuilderScripts method.
64
+
# Ideally, it would be nice to parametrize the BuilderScripts (for example to pass scripting backend as parameter) but -executeMethod only calls static methods without parameters so for now we will have multiple configurations
65
+
# Notice that for Android platform even if mono is selected, il2cpp will be used since mono is not supported for Android builds.
# Because of this we need to ensure that all files are copied to the source directory.
85
+
# TODO: this can be omitted if I can somehow build the project in the source directory (YAMATO_SOURCE_DIR) instead of C:/CompetitiveAction
86
+
- python -c "import os; os.makedirs('./build', exist_ok=True)" # --> Create the build directory if it doesn't exist
87
+
- python -c "import shutil; shutil.copytree('C:/ClonedProject/{{ netcodeProject[1].projectPath }}/build', './build', dirs_exist_ok=True)" # --> Copy the build directory to the source directory (YAMATO_SOURCE_DIR). Remember to copy entire directory and not only exe file
0 commit comments