Skip to content
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/licensing server macos #573

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

simensan
Copy link
Contributor

@simensan simensan commented Sep 19, 2023

Changes

  • Added support for licensing server when building unity project on mac.

I do not have ability to verify that the username/password/serial flow still works. So please sanity check the changes, or even better test it if you have ability to. I had to remove sending in username/password in build.sh, but that shouldn't be required as it is activated already, and we do not do that in the ubuntu version of build.sh.

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)

@github-actions
Copy link

Cat Gif

@codecov-commenter
Copy link

codecov-commenter commented Sep 19, 2023

Codecov Report

Merging #573 (d2f8361) into main (a13443a) will not change coverage.
The diff coverage is n/a.

❗ Current head d2f8361 differs from pull request most recent head 482c00f. Consider uploading reports for the commit 482c00f to get more accurate results

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #573   +/-   ##
=======================================
  Coverage   37.02%   37.02%           
=======================================
  Files          77       77           
  Lines        3041     3041           
  Branches      632      632           
=======================================
  Hits         1126     1126           
  Misses       1765     1765           
  Partials      150      150           

@simensan
Copy link
Contributor Author

Hi, any chance to merge this in? I have another dependent PR lined up. Thanks!

@AndrewKahr
Copy link
Member

Hey there! Apologies for the extreme delay. We can work on getting this merged but there are a few merge conflicts that need to be resolved before we can merge. If you could resolve them then ping for a review here I can make that happen.

@jfranco-cap
Copy link

+1

@jfranco-cap
Copy link

for those needing license activation from server licensing on mac. A workaround I'm using is skipping license activation and passing an custom parameter for adquiring the license.

- name: Configure License
      shell: bash
      run: |
        # Define the config file path
        CONFIG_FILE="/Library/Application Support/Unity/config/services-config.json"
        UNITY_LICENSE_PATH="/Library/Application Support/Unity/config"

        # Define the JSON content
        JSON_CONTENT='{
          "licensingServiceBaseUrl": "http://localhost:8080",
          "enableEntitlementLicensing": true,
          "hubEnableWorkOffline": true,
          "clientConnectTimeoutSec": 60,
          "clientHandshakeTimeoutSec": 30
        }'

        if [ ! -d "$UNITY_LICENSE_PATH" ]; then
          echo "Creating Unity License Directory"
          sudo mkdir -p "$UNITY_LICENSE_PATH"
          sudo chmod -R 777 "$UNITY_LICENSE_PATH"
        fi;

        # Write the JSON content to the config file
        echo "$JSON_CONTENT" > "$CONFIG_FILE"

        # Set the correct permissions for the file
        sudo chmod 644 "$CONFIG_FILE"

        echo "License configuration file updated successfully at $CONFIG_FILE"


    - uses: game-ci/[email protected]
      name: Execute Unity Build on MacOS
      with:
        unityLicensingServer: 'http://localhost:8080'
        # if using server license
        skipActivation: 'true'
        customParameters: --acquire-floating
        targetPlatform: ${{ inputs.target-platform }}
        projectPath: ${{ inputs.path }}
        buildsPath: ${{ inputs.build-path }}
        allowDirtyBuild: true
        cacheUnityInstallationOnMac: ${{ inputs.cache-unity-installation }}
        versioning: ${{ inputs.version != '' && inputs.version || 'Semantic' }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants