Skip to content

Commit 8077d06

Browse files
committed
chore: move sample apps into examples/
Reorganise sample projects from repo root into examples/ to make room for the Audience sample app and clean up the root: sample/ -> examples/passport/ sample-unity6/ -> examples/passport-unity6/ Updated: - .github/workflows/test-build.yml — path triggers + projectPath - .github/workflows/ui-tests.yml — all path references - .github/workflows/update-version.yml — rsync source paths - .github/workflows/linter.yml — FILTER_REGEX_EXCLUDE regex - setup-symlinks.sh + setup-symlinks.ps1 — symlink targets - README.md — path references Linear: SDK-125
1 parent 867f9d0 commit 8077d06

392 files changed

Lines changed: 13169 additions & 103 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/linter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
VALIDATE_ALL_CODEBASE: true
5858
DEFAULT_BRANCH: main
5959
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60-
FILTER_REGEX_EXCLUDE: (.*src/Packages/Passport/Runtime/ThirdParty/.*|.*src/Packages/Passport/Runtime/Resources/.*|.*Plugins/.*|.*src/Packages/Passport/Runtime/Assets/ImmutableAndroid.androidlib/.*|.*src/Packages/Orderbook|.*src/Packages/ZkEvmApi/.*|.*sample|.*src/Packages/Passport/WebGLTemplates~|.*.github/workflows|.*src/Packages/Passport/Samples~)
60+
FILTER_REGEX_EXCLUDE: (.*src/Packages/Passport/Runtime/ThirdParty/.*|.*src/Packages/Passport/Runtime/Resources/.*|.*Plugins/.*|.*src/Packages/Passport/Runtime/Assets/ImmutableAndroid.androidlib/.*|.*src/Packages/Orderbook|.*src/Packages/ZkEvmApi/.*|.*examples/.*|.*src/Packages/Passport/WebGLTemplates~|.*.github/workflows|.*src/Packages/Passport/Samples~)
6161
VALIDATE_MARKDOWN: false
6262
VALIDATE_GITLEAKS: false
6363
VALIDATE_JSCPD: false

.github/workflows/test-build.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ on:
66
branches: [main]
77
paths:
88
- 'src/Packages/Passport/**'
9-
- 'sample/**'
10-
- 'sample-unity6/**'
9+
- 'examples/passport/**'
10+
- 'examples/passport-unity6/**'
1111
- 'Plugins/**'
1212
pull_request:
1313
paths:
1414
- 'src/Packages/Passport/**'
15-
- 'sample/**'
16-
- 'sample-unity6/**'
15+
- 'examples/passport/**'
16+
- 'examples/passport-unity6/**'
1717
- 'Plugins/**'
1818

1919
concurrency:
@@ -40,7 +40,7 @@ jobs:
4040
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
4141
with:
4242
unityVersion: 2021.3.26f1
43-
projectPath: './sample'
43+
projectPath: './examples/passport'
4444
githubToken: ${{ secrets.GITHUB_TOKEN }}
4545
testMode: 'EditMode'
4646
- uses: actions/upload-artifact@v4
@@ -71,7 +71,7 @@ jobs:
7171
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
7272
with:
7373
unityVersion: 6000.0.58f2
74-
projectPath: './sample-unity6'
74+
projectPath: './examples/passport-unity6'
7575
githubToken: ${{ secrets.GITHUB_TOKEN }}
7676
testMode: 'EditMode'
7777
- uses: actions/upload-artifact@v4
@@ -118,7 +118,7 @@ jobs:
118118
with:
119119
unityVersion: 2021.3.26f1
120120
targetPlatform: ${{ matrix.targetPlatform }}
121-
projectPath: sample
121+
projectPath: examples/passport
122122
- uses: actions/upload-artifact@v4
123123
if: always()
124124
with:
@@ -157,7 +157,7 @@ jobs:
157157
with:
158158
unityVersion: 6000.0.58f2
159159
targetPlatform: ${{ matrix.targetPlatform }}
160-
projectPath: sample-unity6
160+
projectPath: examples/passport-unity6
161161
- uses: actions/upload-artifact@v4
162162
if: always()
163163
with:

.github/workflows/ui-tests.yml

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ on:
2121
branches: [main]
2222
paths:
2323
- 'src/Packages/Passport/**'
24-
- 'sample/**'
25-
- 'sample-unity6/**'
24+
- 'examples/passport/**'
25+
- 'examples/passport-unity6/**'
2626
- 'Plugins/**'
2727
pull_request:
2828
paths:
2929
- 'src/Packages/Passport/**'
30-
- 'sample/**'
31-
- 'sample-unity6/**'
30+
- 'examples/passport/**'
31+
- 'examples/passport-unity6/**'
3232
- 'Plugins/**'
3333

3434
concurrency:
@@ -45,18 +45,18 @@ jobs:
4545
include:
4646
- targetPlatform: StandaloneOSX
4747
buildMethod: MacBuilder.BuildForAltTester
48-
buildPath: sample/Builds/MacOS
49-
projectPath: sample
48+
buildPath: examples/passport/Builds/MacOS
49+
projectPath: examples/passport
5050
unityVersion: 2021.3.26f1
5151
- targetPlatform: StandaloneWindows64
5252
buildMethod: WindowsBuilder.BuildForAltTester
53-
buildPath: sample/Builds/Windows64
54-
projectPath: sample
53+
buildPath: examples/passport/Builds/Windows64
54+
projectPath: examples/passport
5555
unityVersion: 2021.3.26f1
5656
# - targetPlatform: Android
5757
# buildMethod: MobileBuilder.BuildForAltTester
58-
# buildPath: sample/Builds/Android
59-
# projectPath: sample
58+
# buildPath: examples/passport/Builds/Android
59+
# projectPath: examples/passport
6060
# unityVersion: 2021.3.26f1
6161
steps:
6262
- uses: actions/checkout@v3
@@ -106,7 +106,7 @@ jobs:
106106
- name: Cleanup old builds
107107
run: |
108108
# Remove previous build to save space
109-
rm -rf sample-unity6/Tests/* 2>/dev/null || true
109+
rm -rf examples/passport-unity6/Tests/* 2>/dev/null || true
110110
- uses: actions/checkout@v3
111111
with:
112112
lfs: true
@@ -115,18 +115,18 @@ jobs:
115115
- name: Force clean package resolution
116116
run: |
117117
echo "Removing Library folder to force clean package resolution..."
118-
rm -rf sample-unity6/Library
118+
rm -rf examples/passport-unity6/Library
119119
echo "✅ Library folder removed"
120120
- name: First build (resolves packages)
121121
run: |
122122
echo "Running first build to trigger package resolution..."
123123
export TMPDIR="/Users/svc_buildsdk/tmp"
124124
mkdir -p "$TMPDIR"
125-
mkdir -p sample-unity6/Tests
126-
/Applications/Unity/Hub/Editor/6000.0.58f2/Unity.app/Contents/MacOS/Unity -projectPath "${{ github.workspace }}/sample-unity6" -executeMethod "MacBuilderUnity6.BuildForAltTester" -logFile "${{ github.workspace }}/sample-unity6/first-build-log.txt" -quit -batchmode --buildPath "${{ github.workspace }}/sample-unity6/Tests/Sample Unity 6 macOS" || true
125+
mkdir -p examples/passport-unity6/Tests
126+
/Applications/Unity/Hub/Editor/6000.0.58f2/Unity.app/Contents/MacOS/Unity -projectPath "${{ github.workspace }}/examples/passport-unity6" -executeMethod "MacBuilderUnity6.BuildForAltTester" -logFile "${{ github.workspace }}/examples/passport-unity6/first-build-log.txt" -quit -batchmode --buildPath "${{ github.workspace }}/examples/passport-unity6/Tests/Sample Unity 6 macOS" || true
127127
128128
echo "First build completed (may have failed, that's ok). Checking for AltTester..."
129-
if ls -la "${{ github.workspace }}/sample-unity6/Library/PackageCache/" | grep alttester; then
129+
if ls -la "${{ github.workspace }}/examples/passport-unity6/Library/PackageCache/" | grep alttester; then
130130
echo "✅ AltTester found in PackageCache after first build"
131131
else
132132
echo "⚠️ AltTester not found yet, but will be ready for second build"
@@ -136,11 +136,11 @@ jobs:
136136
echo "Building Unity 6 macOS using command line..."
137137
export TMPDIR="/Users/svc_buildsdk/tmp"
138138
mkdir -p "$TMPDIR"
139-
mkdir -p sample-unity6/Tests
140-
/Applications/Unity/Hub/Editor/6000.0.58f2/Unity.app/Contents/MacOS/Unity -projectPath "${{ github.workspace }}/sample-unity6" -executeMethod "MacBuilderUnity6.BuildForAltTester" -logFile "${{ github.workspace }}/sample-unity6/build-log.log" -quit -batchmode --buildPath "${{ github.workspace }}/sample-unity6/Tests/Sample Unity 6 macOS"
139+
mkdir -p examples/passport-unity6/Tests
140+
/Applications/Unity/Hub/Editor/6000.0.58f2/Unity.app/Contents/MacOS/Unity -projectPath "${{ github.workspace }}/examples/passport-unity6" -executeMethod "MacBuilderUnity6.BuildForAltTester" -logFile "${{ github.workspace }}/examples/passport-unity6/build-log.log" -quit -batchmode --buildPath "${{ github.workspace }}/examples/passport-unity6/Tests/Sample Unity 6 macOS"
141141
142142
echo "Build completed. Checking for build output..."
143-
ls -la sample-unity6/Tests/
143+
ls -la examples/passport-unity6/Tests/
144144
- name: Create temporary keychain
145145
run: |
146146
# Clean up any leftover temporary keychain from a previous failed run
@@ -153,20 +153,20 @@ jobs:
153153
security unlock-keychain -p "" temporary
154154
security set-keychain-settings -lut 600 temporary
155155
- name: Make macOS artifact executable
156-
run: chmod -R +x 'sample-unity6/Tests/Sample Unity 6 macOS.app/Contents/MacOS'
156+
run: chmod -R +x 'examples/passport-unity6/Tests/Sample Unity 6 macOS.app/Contents/MacOS'
157157
- uses: actions/setup-python@v4
158158
with:
159159
python-version: "3.13"
160160
- name: Install dependencies
161-
run: pip install -r sample-unity6/Tests/requirements-desktop.txt
161+
run: python -m pip install -r examples/passport-unity6/Tests/requirements-desktop.txt
162162
- name: Run UI tests
163163
env:
164164
UNITY_APP_PATH: Sample Unity 6 macOS.app
165165
UNITY_APP_NAME: Sample Unity 6 macOS
166166
MAILSLURP_API_KEY: ${{ secrets.MAILSLURP_API_KEY }}
167167
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
168168
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
169-
working-directory: sample-unity6/Tests
169+
working-directory: examples/passport-unity6/Tests
170170
run: pytest -xs test/test_mac.py::MacTest
171171
- name: Close Brave Browser
172172
if: always()
@@ -187,13 +187,13 @@ jobs:
187187
uses: actions/upload-artifact@v4
188188
with:
189189
name: Unity6-First-Build-Log
190-
path: sample-unity6/first-build-log.txt
190+
path: examples/passport-unity6/first-build-log.txt
191191
- name: Upload build log
192192
if: always()
193193
uses: actions/upload-artifact@v4
194194
with:
195195
name: Unity6-macOS-Build-Log
196-
path: sample-unity6/build-log.log
196+
path: examples/passport-unity6/build-log.log
197197

198198
build-and-test-unity6-windows: # Unity 6 requires a full build cycle to compile AltTester packages properly. This doesn't work well in Game CI, so we have to build it manually.
199199
name: Build & Test Unity 6 Windows 🛠️🧪
@@ -206,22 +206,22 @@ jobs:
206206
- name: Cleanup old builds
207207
run: |
208208
# Remove previous build to save space
209-
if (Test-Path "sample-unity6/Tests") { Remove-Item -Recurse -Force "sample-unity6/Tests" -ErrorAction SilentlyContinue }
209+
if (Test-Path "examples/passport-unity6/Tests") { Remove-Item -Recurse -Force "examples/passport-unity6/Tests" -ErrorAction SilentlyContinue }
210210
- uses: actions/checkout@v3
211211
with:
212212
lfs: true
213213
- name: Cache Unity Library folder
214214
uses: actions/cache@v3
215215
with:
216-
path: sample-unity6/Library
217-
key: Library-Unity6-Windows-${{ hashFiles('sample-unity6/Assets/**', 'sample-unity6/Packages/**', 'sample-unity6/ProjectSettings/**') }}
216+
path: examples/passport-unity6/Library
217+
key: Library-Unity6-Windows-${{ hashFiles('examples/passport-unity6/Assets/**', 'examples/passport-unity6/Packages/**', 'examples/passport-unity6/ProjectSettings/**') }}
218218
restore-keys: |
219219
Library-Unity6-Windows-
220220
- name: Setup symlinks for Unity 6 Windows
221221
run: .\setup-symlinks.ps1
222222
- name: Verify symlinks were created
223223
run: |
224-
if (-not (Test-Path "sample-unity6/Assets/Editor/WindowsBuilderUnity6.cs")) {
224+
if (-not (Test-Path "examples/passport-unity6/Assets/Editor/WindowsBuilderUnity6.cs")) {
225225
Write-Output "❌ Build script not found - symlink setup failed"
226226
exit 1
227227
}
@@ -230,17 +230,17 @@ jobs:
230230
# Deleting it forces a complete reimport which takes too long
231231
- name: Ensure Tests directory exists
232232
run: |
233-
if (-not (Test-Path "sample-unity6/Tests")) {
234-
New-Item -ItemType Directory -Path "sample-unity6/Tests" -Force | Out-Null
233+
if (-not (Test-Path "examples/passport-unity6/Tests")) {
234+
New-Item -ItemType Directory -Path "examples/passport-unity6/Tests" -Force | Out-Null
235235
}
236236
- name: First build (resolves packages)
237237
run: |
238238
Write-Output "Running first build to trigger package resolution..."
239239
240240
$unityPath = "C:\Program Files\Unity\Hub\Editor\6000.0.58f2\Editor\Unity.exe"
241-
$projectPath = "${{ github.workspace }}\sample-unity6"
242-
$logFile = "${{ github.workspace }}\sample-unity6\first-build-log.txt"
243-
$buildPath = "${{ github.workspace }}\sample-unity6\Tests\Sample Unity 6 Windows.exe"
241+
$projectPath = "${{ github.workspace }}\examples\passport-unity6"
242+
$logFile = "${{ github.workspace }}\examples\passport-unity6\first-build-log.txt"
243+
$buildPath = "${{ github.workspace }}\examples\passport-unity6\Tests\Sample Unity 6 Windows.exe"
244244
245245
$arguments = @(
246246
"-projectPath", "`"$projectPath`"",
@@ -257,8 +257,8 @@ jobs:
257257
258258
Write-Output "First build completed (exit code: $($process.ExitCode), may have failed, that's ok). Checking for AltTester..."
259259
260-
if (Test-Path "${{ github.workspace }}\sample-unity6\Library\PackageCache") {
261-
$altTesterFound = Get-ChildItem "${{ github.workspace }}\sample-unity6\Library\PackageCache" -Filter "*alttester*" -ErrorAction SilentlyContinue
260+
if (Test-Path "${{ github.workspace }}\examples\passport-unity6\Library\PackageCache") {
261+
$altTesterFound = Get-ChildItem "${{ github.workspace }}\examples\passport-unity6\Library\PackageCache" -Filter "*alttester*" -ErrorAction SilentlyContinue
262262
if ($altTesterFound) {
263263
Write-Output "✅ AltTester found in PackageCache after first build"
264264
} else {
@@ -273,9 +273,9 @@ jobs:
273273
274274
# Run Unity build
275275
$unityPath = "C:\Program Files\Unity\Hub\Editor\6000.0.58f2\Editor\Unity.exe"
276-
$projectPath = "${{ github.workspace }}\sample-unity6"
277-
$logFile = "${{ github.workspace }}\sample-unity6\build-log.log"
278-
$buildPath = "${{ github.workspace }}\sample-unity6\Tests\Sample Unity 6 Windows.exe"
276+
$projectPath = "${{ github.workspace }}\examples\passport-unity6"
277+
$logFile = "${{ github.workspace }}\examples\passport-unity6\build-log.log"
278+
$buildPath = "${{ github.workspace }}\examples\passport-unity6\Tests\Sample Unity 6 Windows.exe"
279279
280280
# Build argument list with proper quoting for paths with spaces
281281
$arguments = @(
@@ -314,16 +314,16 @@ jobs:
314314
python-version: "3.13"
315315
- name: Verify test files are accessible
316316
run: |
317-
if (-not (Test-Path "sample-unity6/Tests/requirements-desktop.txt") -and -not (Test-Path "sample/Tests/requirements-desktop.txt")) {
317+
if (-not (Test-Path "examples/passport-unity6/Tests/requirements-desktop.txt") -and -not (Test-Path "examples/passport/Tests/requirements-desktop.txt")) {
318318
Write-Output "❌ Test requirements file not found"
319319
exit 1
320320
}
321321
- name: Install dependencies
322322
run: |
323-
if (Test-Path "sample-unity6/Tests/requirements-desktop.txt") {
324-
pip install -r sample-unity6/Tests/requirements-desktop.txt
323+
if (Test-Path "examples/passport-unity6/Tests/requirements-desktop.txt") {
324+
python -m pip install -r examples/passport-unity6/Tests/requirements-desktop.txt
325325
} else {
326-
pip install -r sample/Tests/requirements-desktop.txt
326+
python -m pip install -r examples/passport/Tests/requirements-desktop.txt
327327
}
328328
- name: Kill leftover Brave processes
329329
if: always()
@@ -336,7 +336,7 @@ jobs:
336336
MAILSLURP_API_KEY: ${{ secrets.MAILSLURP_API_KEY }}
337337
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
338338
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
339-
working-directory: sample-unity6/Tests
339+
working-directory: examples/passport-unity6/Tests
340340
run: python -m pytest -xs test/test_windows.py::WindowsTest
341341
- name: Close Brave Browser
342342
if: always()
@@ -347,7 +347,7 @@ jobs:
347347
uses: actions/upload-artifact@v4
348348
with:
349349
name: Unity6-Windows-Build-Log
350-
path: sample-unity6/build-log.log
350+
path: examples/passport-unity6/build-log.log
351351

352352
test:
353353
name: Run ${{ matrix.targetPlatform }} UI tests 🧪
@@ -360,14 +360,14 @@ jobs:
360360
- targetPlatform: StandaloneOSX
361361
runs-on: [self-hosted, macOS]
362362
test_script: pytest -xs test/test_mac.py::MacTest
363-
projectPath: sample
363+
projectPath: examples/passport
364364
unityAppName: SampleApp
365365
unityAppExtension: .app
366366
concurrency_group: macos
367367
- targetPlatform: StandaloneWindows64
368368
runs-on: [self-hosted, windows]
369369
test_script: python -m pytest -xs test/test_windows.py::WindowsTest
370-
projectPath: sample
370+
projectPath: examples/passport
371371
unityAppName: Immutable Sample
372372
unityAppExtension: .exe
373373
concurrency_group: windows
@@ -411,7 +411,7 @@ jobs:
411411
python-version: "3.13"
412412
- name: Install dependencies (Windows)
413413
if: matrix.targetPlatform == 'StandaloneWindows64' && (github.event_name != 'workflow_dispatch' || github.event.inputs.targetPlatform == 'All' || github.event.inputs.targetPlatform == 'StandaloneWindows64')
414-
run: pip install -r "${{ matrix.projectPath }}/Tests/requirements-desktop.txt"
414+
run: python -m pip install -r "${{ matrix.projectPath }}/Tests/requirements-desktop.txt"
415415
- name: Install dependencies (Mac)
416416
if: contains(matrix.targetPlatform, 'StandaloneOSX') && (github.event_name != 'workflow_dispatch' || github.event.inputs.targetPlatform == 'All' || github.event.inputs.targetPlatform == matrix.targetPlatform)
417417
run: pip install -r "${{ matrix.projectPath }}/Tests/requirements-desktop.txt"
@@ -474,5 +474,5 @@ jobs:
474474
# MAILSLURP_API_KEY: ${{ secrets.MAILSLURP_API_KEY }}
475475
# BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
476476
# BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
477-
# working-directory: sample/Tests/test/ios
477+
# working-directory: examples/passport/Tests/test/ios
478478
# run: browserstack-sdk pytest -xs ./test_ios.py --browserstack.config "browserstack.ios.yml"

.github/workflows/update-version.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,11 @@ jobs:
118118
- name: Copy sample scenes and scripts to Passport package Samples~
119119
id: copy_sample_scenes_and_scripts
120120
run: |
121-
rsync -av --exclude='*.meta' ./sample/Assets/Scenes/Passport ./src/Packages/Passport/Samples~/SamplesScenesScripts/Scenes/
122-
rsync -av --exclude='*.meta' --exclude='features.json' --exclude='_prompts~/' --exclude='_tutorials~/' ./sample/Assets/Scripts/Passport ./src/Packages/Passport/Samples~/SamplesScenesScripts/Scripts/
121+
rsync -av --exclude='*.meta' ./examples/passport/Assets/Scenes/Passport ./src/Packages/Passport/Samples~/SamplesScenesScripts/Scenes/
122+
rsync -av --exclude='*.meta' --exclude='features.json' --exclude='_prompts~/' --exclude='_tutorials~/' ./examples/passport/Assets/Scripts/Passport ./src/Packages/Passport/Samples~/SamplesScenesScripts/Scripts/
123123
124-
rsync -av --exclude='*.meta' ./sample/Assets/Scenes/Marketplace ./src/Packages/Marketplace/Samples~/SamplesScenesScripts/Scenes/
125-
rsync -av --exclude='*.meta' ./sample/Assets/Scripts/Marketplace ./src/Packages/Marketplace/Samples~/SamplesScenesScripts/Scripts/
124+
rsync -av --exclude='*.meta' ./examples/passport/Assets/Scenes/Marketplace ./src/Packages/Marketplace/Samples~/SamplesScenesScripts/Scenes/
125+
rsync -av --exclude='*.meta' ./examples/passport/Assets/Scripts/Marketplace ./src/Packages/Marketplace/Samples~/SamplesScenesScripts/Scripts/
126126
127127
- uses: gr2m/create-or-update-pull-request-action@v1
128128
env:

0 commit comments

Comments
 (0)