Skip to content

Conversation

cseteram
Copy link
Contributor

@cseteram cseteram commented Sep 11, 2025

Changes

GameCI currently supports Unity license server activation, but the Bash scripts for the macOS platform have not been updated to support this functionality. While there was a previous PR addressing this, it has not yet been merged. 😭 This PR revisits and adapts the changes from the previous PR to fit the current Linux-based script structure.

Additionally, since BSD grep (used on macOS runners) does not support Perl-compatible regular expressions, the regex pattern used for license token parsing has been updated to ensure compatibility.

  • Added logic to activate and return Unity licenses when the UNITY_LICENSING_SERVER environment variable is set
  • Removed the email and password parameters in the build script
  • Updated the regular expression pattern for license token parsing to work correctly with BSD grep

Related Issues

  • N/A

Related PRs

Successful Workflow Run Link

I have successfully tested this in our private repository and have attached logs from tests, showing the use of the Unity license server at each step. Since the implementation closely follows the Linux version, I expect it to work without any issues. If necessary, I can provide the full log file of workflows (with secrets masked).

Activate license

Changing to "/Users/***/actions-runner/_work/_actions/cseteram/unity-builder/main/dist/BlankProject" directory.
~/actions-runner/_work/_actions/cseteram/unity-builder/main/dist/BlankProject ~/actions-runner/_work/tech-internal-test/tech-internal-test
Adding licensing server config
Acquired floating license: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" with timeout 2025-09-11T13:26:41.6611694+09:00
Activation complete.

Build

###########################
#    Building project     #
###########################

[UnityConnectServicesConfig] Local config successfully read: "/Library/Application Support/Unity/config/services-config.json"
[UnityConnectServicesConfig] "licensingServiceBaseUrl" was overridden with "http://***:8080/"
[UnityConnectServicesConfig] "clientConnectTimeoutSec" was overridden with "5"
[UnityConnectServicesConfig] "clientHandshakeTimeoutSec" was overridden with "10"
[UnityConnectServicesConfig] Service configuration:
    "servicesConfigBaseUrl": "",
    "disableServicesWindow": false,
    "disableUserLogin": false,
    "entitlementCacheTimeoutInSeconds": 60,
    "clientConnectTimeoutSec": 5,
    "clientHandshakeTimeoutSec": 10,
    "clientResolveEntitlementsTimeoutSec": 30,
    "clientUpdateLicenseTimeoutSec": 30,
    "licensingServiceBaseUrl": "http://***:8080/",
    "enableProxyAutoconfig": "false"

Return license

Returning floating license: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Trying to return floating license lease (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) to: *** ...
License lease returned successfully

Checklist

  • Read the contribution guide and accept the
    code of conduct
  • Docs (If new inputs or outputs have been added or changes to behavior that should be documented. Please make a PR
    in the documentation repo)
  • Readme (updated or not needed)
  • Tests (added, updated or not needed)

Copy link

coderabbitai bot commented Sep 11, 2025

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (4)
  • dist/platforms/mac/steps/activate.sh is excluded by !**/dist/**
  • dist/platforms/mac/steps/build.sh is excluded by !**/dist/**
  • dist/platforms/mac/steps/return_license.sh is excluded by !**/dist/**
  • dist/platforms/ubuntu/steps/activate.sh is excluded by !**/dist/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

Cat Gif

@cseteram cseteram marked this pull request as ready for review September 11, 2025 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant