-
-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/support for unity licensing server linux #468
Feature/support for unity licensing server linux #468
Conversation
…ript to copy over template file for unity licensing server
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work!
1 comment. The rest looks great!
echo "Adding licensing server config" | ||
pushd /resources | ||
cat services-config.json.template | tr -d '\r' | awk "{sub(/%URL%/,\"$UNITY_LICENSING_SERVER\")}1" > services-config.json | ||
mkdir -p /usr/share/unity3d/config/ | ||
mv services-config.json /usr/share/unity3d/config/ | ||
|
||
/opt/unity/Editor/Data/Resources/Licensing/Client/Unity.Licensing.Client --acquire-floating > license.txt #is this accessible in a env variable? | ||
PARSEDFILE=$(grep -oP '\".*?\"' < license.txt | tr -d '"') | ||
export FLOATING_LICENSE | ||
FLOATING_LICENSE=$(sed -n 2p <<< "$PARSEDFILE") | ||
FLOATING_LICENSE_TIMEOUT=$(sed -n 4p <<< "$PARSEDFILE") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parsing and writing of this file should happen in the logic (javascript) part, not in bash. We're trying to keep the bash part as thin as possible because it's extremely hard to test and maintain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume you are talking about the services-config.json? I can definitely fix that, but is there any way for me to copy it to the right location inside the container without mounting and doing it from bash? Or should I just mount it to /usr/share/unity3d/config/ in the docker command since I am creating the directory from script anyways?
…pecific activate scripts to typescript
I have moved the processing of services-config file to platform-setup, let me know if you think there is a better place for it. |
Sure! I like that it's part of the logic now. That makes it more manageable for us. |
I agree, makes more sense. I will make sure to do an iteration on that, will need to make this change to the test runner also, so will do a take on a feature-setup there first. |
You have to rebase on main, or merge main into your branch and run yarn build to generate the dist files again. It can't be merged as is. |
…inux # Conflicts: # dist/index.js # dist/index.js.map
Fixed |
Codecov Report
@@ Coverage Diff @@
## main #468 +/- ##
==========================================
+ Coverage 52.52% 52.98% +0.45%
==========================================
Files 66 66
Lines 2056 2059 +3
Branches 353 355 +2
==========================================
+ Hits 1080 1091 +11
+ Misses 972 964 -8
Partials 4 4
|
Thanks so much for your contribution! 🧡 Please consider (concisely) documenting your feature in the docs @ https://github.com/game-ci/documentation so that other people in the community also know how to use it. People will be able to find your feature because of the search. |
Hi,
I needed support for a lot of parallel builds and as such also wanted to use the build server as it unlocks using cheaper licenses that can only be used by CI (https://unity.com/products/unity-build-server). Since game-ci did not currently support this, I have forked and implemented the changes as bare-bones as possible to the level where it currently works for us. Since this might be useful to others I hope to be able to contribute this back to gameci. I am no bash-script-guru, and this was my first time working with TS. So I probably haven't solved it all gracefully, but I am happy to make any fixes/improvements you come up with. I have also only fixed this for the ubuntu platform, but looking at the other platforms they already do not seem to support all features, like using license files. I am happy to try to add this to mac also if desired, but I assume that almost all unity builds will be done on the ubuntu platform to save build-minutes, so I have focused on that initially.
I have added a template for the necessary services-config.json file here: dist/resources/services-config.json.template
I am not sure if there is a better location for it? Alternatively it can just be inlined in some script.
Changes
Checklist