unity-devkit 0.1.6__tar.gz → 0.1.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. unity_devkit-0.1.7/.github/workflows/ci.yml +17 -0
  2. {unity_devkit-0.1.6 → unity_devkit-0.1.7}/.github/workflows/release.yml +1 -7
  3. unity_devkit-0.1.7/.github/workflows/unity-build.yml +146 -0
  4. {unity_devkit-0.1.6 → unity_devkit-0.1.7}/AGENTS.md +4 -4
  5. {unity_devkit-0.1.6 → unity_devkit-0.1.7}/PKG-INFO +1 -1
  6. {unity_devkit-0.1.6 → unity_devkit-0.1.7}/README.md +1 -1
  7. {unity_devkit-0.1.6 → unity_devkit-0.1.7}/pyproject.toml +1 -1
  8. unity_devkit-0.1.6/.github/workflows/ci.yml +0 -33
  9. {unity_devkit-0.1.6 → unity_devkit-0.1.7}/.gitattributes +0 -0
  10. {unity_devkit-0.1.6 → unity_devkit-0.1.7}/.gitignore +0 -0
  11. {unity_devkit-0.1.6 → unity_devkit-0.1.7}/CLAUDE.md +0 -0
  12. {unity_devkit-0.1.6 → unity_devkit-0.1.7}/LICENSE +0 -0
  13. {unity_devkit-0.1.6 → unity_devkit-0.1.7}/NOTICE +0 -0
  14. {unity_devkit-0.1.6 → unity_devkit-0.1.7}/publish-config.json +0 -0
  15. {unity_devkit-0.1.6 → unity_devkit-0.1.7}/ruff.base.toml +0 -0
  16. {unity_devkit-0.1.6 → unity_devkit-0.1.7}/ruff.toml +0 -0
  17. {unity_devkit-0.1.6 → unity_devkit-0.1.7}/src/unity_devkit/__init__.py +0 -0
  18. {unity_devkit-0.1.6 → unity_devkit-0.1.7}/src/unity_devkit/build_unity.py +0 -0
  19. {unity_devkit-0.1.6 → unity_devkit-0.1.7}/src/unity_devkit/compile_unity.py +0 -0
  20. {unity_devkit-0.1.6 → unity_devkit-0.1.7}/src/unity_devkit/install.py +0 -0
  21. {unity_devkit-0.1.6 → unity_devkit-0.1.7}/src/unity_devkit/license.py +0 -0
  22. {unity_devkit-0.1.6 → unity_devkit-0.1.7}/src/unity_devkit/license_restore.py +0 -0
  23. {unity_devkit-0.1.6 → unity_devkit-0.1.7}/src/unity_devkit/lock_unity.py +0 -0
  24. {unity_devkit-0.1.6 → unity_devkit-0.1.7}/src/unity_devkit/matrix.py +0 -0
  25. {unity_devkit-0.1.6 → unity_devkit-0.1.7}/src/unity_devkit/projects.py +0 -0
  26. {unity_devkit-0.1.6 → unity_devkit-0.1.7}/src/unity_devkit/py.typed +0 -0
  27. {unity_devkit-0.1.6 → unity_devkit-0.1.7}/src/unity_devkit/test_unity.py +0 -0
  28. {unity_devkit-0.1.6 → unity_devkit-0.1.7}/src/unity_devkit/unity.py +0 -0
  29. {unity_devkit-0.1.6 → unity_devkit-0.1.7}/uv.lock +0 -0
@@ -0,0 +1,17 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ concurrency:
10
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11
+ cancel-in-progress: true
12
+
13
+ jobs:
14
+ check:
15
+ uses: outernet-foundation/python-devkit/.github/workflows/check.yml@90141e9fc20af17afa25466c69ce4efb1bce8aba
16
+ with:
17
+ test: false
@@ -16,10 +16,4 @@ jobs:
16
16
  steps:
17
17
  - uses: actions/checkout@v5
18
18
 
19
- # Workaround: fetch-tags is broken with shallow clones
20
- - run: git fetch --tags origin
21
-
22
- - uses: astral-sh/setup-uv@v7
23
-
24
- - name: Publish
25
- run: uvx --from release-devkit==0.1.3 publish-packages --config publish-config.json
19
+ - uses: outernet-foundation/release-devkit/.github/actions/publish@098b8e918c50397fef2f6d7ed1bf2452c16267d6
@@ -0,0 +1,146 @@
1
+ name: Unity Build
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ runner-labels:
7
+ description: JSON-encoded runs-on value (string or array) for the license/build jobs
8
+ type: string
9
+ default: '"ubuntu-latest"'
10
+ build-env:
11
+ description: Newline-separated KEY=VALUE pairs injected into the Unity build process environment
12
+ type: string
13
+ default: ''
14
+ secrets:
15
+ UNITY_EMAIL:
16
+ required: true
17
+ UNITY_PASSWORD:
18
+ required: true
19
+ UNITY_SERIAL:
20
+ required: true
21
+
22
+ env:
23
+ CACHE_REGISTRY: ghcr.io/${{ github.repository }}/cache
24
+
25
+ jobs:
26
+ matrix:
27
+ runs-on: ubuntu-latest
28
+ permissions:
29
+ contents: read
30
+ outputs:
31
+ build-matrix: ${{ steps.generate.outputs.matrix }}
32
+ license-image: ${{ steps.generate.outputs.license-image }}
33
+ steps:
34
+ - uses: actions/checkout@v5
35
+
36
+ - uses: astral-sh/setup-uv@v7
37
+ with:
38
+ enable-cache: true
39
+ save-cache: "false"
40
+
41
+ - name: Sync dependencies
42
+ run: uv sync
43
+
44
+ - name: Generate build matrix
45
+ id: generate
46
+ run: uv run --no-sync unity-matrix >> "$GITHUB_OUTPUT"
47
+
48
+ activate-license:
49
+ needs: [matrix]
50
+ runs-on: ${{ fromJSON(inputs.runner-labels) }}
51
+ permissions:
52
+ contents: read
53
+ packages: write
54
+ outputs:
55
+ cache-tag: ${{ steps.tag.outputs.value }}
56
+ container:
57
+ image: ${{ needs.matrix.outputs.license-image }}
58
+ steps:
59
+ - uses: actions/checkout@v5
60
+
61
+ - uses: astral-sh/setup-uv@v7
62
+ with:
63
+ enable-cache: true
64
+ save-cache: "false"
65
+
66
+ - name: Sync dependencies
67
+ run: uv sync
68
+
69
+ - name: Compute license cache tag
70
+ id: tag
71
+ run: echo "value=$(uv run --no-sync unity-license-tag)" >> "$GITHUB_OUTPUT"
72
+
73
+ - name: Activate Unity license
74
+ run: uv run --no-sync activate-unity-license --oras-push
75
+ env:
76
+ GITHUB_TOKEN: ${{ github.token }}
77
+ LICENSE_CACHE_TAG: ${{ steps.tag.outputs.value }}
78
+ UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
79
+ UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
80
+ UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
81
+
82
+ build-unity:
83
+ needs: [matrix, activate-license]
84
+ name: ${{ matrix.project-name }} (${{ matrix.platform }})
85
+ runs-on: ${{ fromJSON(inputs.runner-labels) }}
86
+ permissions:
87
+ contents: read
88
+ packages: write
89
+ container:
90
+ image: ${{ matrix.editor-image }}
91
+ strategy:
92
+ fail-fast: false
93
+ matrix: ${{ fromJson(needs.matrix.outputs.build-matrix) }}
94
+ steps:
95
+ - name: Wipe workspace
96
+ run: |
97
+ find "$GITHUB_WORKSPACE" -mindepth 1 -delete
98
+ rm -rf ~/.cache/Unity
99
+
100
+ - uses: actions/checkout@v5
101
+
102
+ - uses: astral-sh/setup-uv@v7
103
+ with:
104
+ enable-cache: true
105
+ save-cache: "false"
106
+
107
+ - name: Sync dependencies
108
+ run: uv sync
109
+
110
+ - name: Cache UPM packages
111
+ uses: actions/cache@v5
112
+ with:
113
+ path: ~/.cache/Unity/upm
114
+ key: unity-upm-v3-${{ matrix.platform }}-${{ hashFiles(format('{0}/Packages/manifest.json', matrix.project)) }}
115
+
116
+ - name: Build
117
+ env:
118
+ GITHUB_TOKEN: ${{ github.token }}
119
+ LICENSE_CACHE_TAG: ${{ needs.activate-license.outputs.cache-tag }}
120
+ BUILD_ENV: ${{ inputs.build-env }}
121
+ run: |
122
+ uv run --no-sync build-unity \
123
+ --project ${{ matrix.project-name }} \
124
+ --project-path ${{ matrix.project }} \
125
+ --platform ${{ matrix.platform }} \
126
+ --cache-key ${{ matrix.cache-key }} \
127
+ --run-number ${{ github.run_number }} \
128
+ --branch ${{ github.head_ref || github.ref_name }} \
129
+ --registry "$CACHE_REGISTRY" \
130
+ --build-env "$BUILD_ENV"
131
+
132
+ - name: Upload Build Artifacts
133
+ if: success()
134
+ uses: actions/upload-artifact@v6
135
+ with:
136
+ name: ${{ matrix.project-name }}-${{ matrix.platform }}
137
+ path: /tmp/unity-builds/
138
+ if-no-files-found: ignore
139
+
140
+ - name: Upload Build Report
141
+ if: always()
142
+ uses: actions/upload-artifact@v6
143
+ with:
144
+ name: ${{ matrix.project-name }}-${{ matrix.platform }}-build-report
145
+ path: ${{ matrix.project }}/Build/**/BuildReport.json
146
+ if-no-files-found: ignore
@@ -2,13 +2,13 @@
2
2
 
3
3
  ## What this is
4
4
 
5
- `unity-devkit` is the Unity build toolkit: project discovery, local builds, CI builds, license activation, the `install` command (download-or-build then install onto a device), and the ORAS cache/setup helpers those need. Consumer repositories install this package from PyPI and get the same Unity CI and install flow — paired with a reusable `unity-build.yml` GitHub Actions workflow (housed in consumer repos today) that invokes only this package's entry points.
5
+ `unity-devkit` is the Unity build toolkit: project discovery, local builds, CI builds, license activation, the `install` command (download-or-build then install onto a device), and the ORAS cache/setup helpers those need. Consumer repositories install this package from PyPI and get the same Unity CI and install flow — paired with the reusable `unity-build.yml` GitHub Actions workflow hosted in this repo's `.github/workflows/`, which invokes only this package's entry points inside the caller's checkout.
6
6
 
7
7
  The repo and package renamed from `unity-buildkit` to `unity-devkit` (2026-09-21, member of the `-devkit` family; before that `placeframe-unity` → `unity-buildkit` on extraction). The PyPI identity is fresh: `unity-devkit` starts its own tag ledger at `0.1.0`; the terminal `unity-buildkit` distributions (≤0.1.1) are deprecation signposts pointing here, not this package's history.
8
8
 
9
9
  ## Release flow
10
10
 
11
- Publishing rides `release.yml`, triggered by a successful CI run on a `main` push: the machinery — release-devkit, invoked uvx-isolated, never a project dependency (unity-devkit sits inside its own dependency graph; a project-level release-devkit edge is a resolver cycle) — computes the plan from the tag ledger and path-diff, patches the version ephemerally, and publishes to PyPI under OIDC trusted publishing (publisher bound to `release.yml`, no environment). The committed `pyproject.toml` version is permanently the `0.0.0.dev0` sentinel; the `unity-devkit-v*` tags are the version ledger (first release `0.1.0`, patch-auto thereafter). API-breaking changes ship with a manually bumped version — patch-auto assumes additive changes.
11
+ Publishing rides `release.yml`, triggered by a successful CI run on a `main` push: the machinery — release-devkit's publish composite action (pinned by SHA; the uvx invocation runs inside the caller's job, keeping OIDC identity local), never a project dependency (unity-devkit sits inside its own dependency graph; a project-level release-devkit edge is a resolver cycle) — computes the plan from the tag ledger and path-diff, patches the version ephemerally, and publishes to PyPI under OIDC trusted publishing (publisher bound to `release.yml`, no environment). The committed `pyproject.toml` version is permanently the `0.0.0.dev0` sentinel; the `unity-devkit-v*` tags are the version ledger (first release `0.1.0`, patch-auto thereafter). API-breaking changes ship with a manually bumped version — patch-auto assumes additive changes.
12
12
 
13
13
  ## Shape
14
14
 
@@ -35,9 +35,9 @@ Supporting modules: `projects.py` (manifest schema + discovery), `unity.py` (edi
35
35
 
36
36
  **Unity project discovery is manifest-driven, not catalog-driven.** The Unity commands discover projects by scanning the working-directory tree for `unity-build.json` manifest files (pruning `Library`, `Temp`, `obj`, `Build`, `node_modules`, `.git`, and dot-directories). A manifest marks its directory as an opted-in Unity project; the project name is the directory name; the manifest carries only intent the project cannot otherwise express (`builds`, `execute_methods`, `package`, `grant_permissions`, `tag_prefix` — schema in `projects.py`). There is no central catalog: a project's build identity lives inside the project, so it travels with the project if it moves between repositories, and the commands run unchanged in any repo containing manifests. Discovery anchors at the current working directory — run commands from the repo root.
37
37
 
38
- **`unity-matrix` prints `$GITHUB_OUTPUT`-format lines, not bare JSON.** Its stdout is two `key=value` lines — `matrix=<JSON with an include array>` and `license-image=<unityci/editor tag>` — so the workflow step is exactly `uv run --no-sync unity-matrix >> "$GITHUB_OUTPUT"` with no shell logic. Each matrix entry carries an `editor-image` tag composed from the project's `ProjectSettings/ProjectVersion.txt` editor version, the platform's unityci module, and the `UNITYCI_IMAGE_REVISION` constant in `unity.py`; `license-image` uses the highest discovered editor version with the `linux-il2cpp` module. Nothing else pins an editor version: upgrading a project's editor in `ProjectVersion.txt` automatically switches its CI container, and the consumer-side `unity-build.yml` stays free of repo-specific values.
38
+ **`unity-matrix` prints `$GITHUB_OUTPUT`-format lines, not bare JSON.** Its stdout is two `key=value` lines — `matrix=<JSON with an include array>` and `license-image=<unityci/editor tag>` — so the workflow step is exactly `uv run --no-sync unity-matrix >> "$GITHUB_OUTPUT"` with no shell logic. Each matrix entry carries an `editor-image` tag composed from the project's `ProjectSettings/ProjectVersion.txt` editor version, the platform's unityci module, and the `UNITYCI_IMAGE_REVISION` constant in `unity.py`; `license-image` uses the highest discovered editor version with the `linux-il2cpp` module. Nothing else pins an editor version: upgrading a project's editor in `ProjectVersion.txt` automatically switches its CI container, and the hosted `unity-build.yml` stays free of repo-specific values.
39
39
 
40
- **Entry-point names are the workflow contract.** Consumer `unity-build.yml` workflows invoke `unity-matrix`, `unity-license-tag`, `activate-unity-license`, and `build-unity` by name via `uv run`. Consumers pin the workflow by ref and this package by git revision independently; the two pins stay compatible as long as the entry-point names and flags hold, so treat those as a public API.
40
+ **Entry-point names are the workflow contract.** The hosted `unity-build.yml` invokes `unity-matrix`, `unity-license-tag`, `activate-unity-license`, and `build-unity` by name via `uv run` in the caller's checkout (the caller's venv supplies this package). Consumers pin the workflow by pushed SHA and the package by PyPI version independently; the two pins stay compatible as long as the entry-point names and flags hold, so treat those as a public API.
41
41
 
42
42
  **The environment-lookup helpers are cross-repo Python API.** `unity.find_editor_for_version` (editor ladder: `unity-editor` on PATH → `/opt/unity/<version>` → `~/Unity/Hub/Editor/<version>`; raises `ValueError` listing every searched path on a miss), `unity.editor_version` (`ProjectVersion.txt` parse; `None` for a missing file or unparseable content), and `projects.directories_containing` (+ `PRUNE_DIRECTORIES`) are imported by registry consumers — prepo's `sync` verb. Their signatures and miss behavior are contract, not internals. The `SystemExit`-raising wrappers (`find_unity_editor`, `read_editor_version`) exist for unity-devkit's own CLI paths and delegate to the core helpers.
43
43
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: unity-devkit
3
- Version: 0.1.6
3
+ Version: 0.1.7
4
4
  Summary: Unity project discovery, build, license, and CI tooling
5
5
  License-File: LICENSE
6
6
  License-File: NOTICE
@@ -1,6 +1,6 @@
1
1
  # unity-devkit
2
2
 
3
- Unity project discovery, local builds, CI builds, license activation, and the shared CI helpers those need. Consumers scan the working-directory tree for `unity-build.json` manifests to enumerate their Unity projects; the commands here (`compile-unity`, `install`, `build-unity`, `unity-matrix`, license helpers) work unchanged in any repo containing manifests. Paired with the reusable [`unity-build.yml`](https://github.com/outernet-foundation/unity-devkit/blob/main/.github/workflows/unity-build.yml) GitHub Actions workflow (once the workflow lands here — until then, workflow YAML lives in consumer repos).
3
+ Unity project discovery, local builds, CI builds, license activation, and the shared CI helpers those need. Consumers scan the working-directory tree for `unity-build.json` manifests to enumerate their Unity projects; the commands here (`compile-unity`, `install`, `build-unity`, `unity-matrix`, license helpers) work unchanged in any repo containing manifests. Paired with the reusable [`unity-build.yml`](https://github.com/outernet-foundation/unity-devkit/blob/main/.github/workflows/unity-build.yml) GitHub Actions workflow hosted here — consumers call it cross-repo pinned to a pushed SHA with `secrets: inherit`.
4
4
 
5
5
  ## Setup
6
6
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "unity-devkit"
3
- version = "0.1.6"
3
+ version = "0.1.7"
4
4
  description = "Unity project discovery, build, license, and CI tooling"
5
5
  requires-python = ">=3.13"
6
6
  dependencies = [
@@ -1,33 +0,0 @@
1
- name: CI
2
-
3
- on:
4
- push:
5
- branches: [main]
6
- pull_request:
7
- branches: [main]
8
-
9
- concurrency:
10
- group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11
- cancel-in-progress: true
12
-
13
- jobs:
14
- check:
15
- runs-on: ubuntu-latest
16
- steps:
17
- - uses: actions/checkout@v5
18
-
19
- - uses: astral-sh/setup-uv@v7
20
- with:
21
- enable-cache: true
22
-
23
- - name: Lint
24
- run: uv run ruff check .
25
-
26
- - name: Format
27
- run: uv run ruff format --check .
28
-
29
- - name: Type check
30
- run: uv run basedpyright
31
-
32
- - name: Ruff config drift
33
- run: uvx --from python-devkit==0.1.3 sync-ruff --check
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes