Skip to content

Commit dcdb955

Browse files
Erik Bylundkirre-bylund
authored andcommitted
Split packaging, sample tests, and validation to different repos
1 parent c272be4 commit dcdb955

File tree

1 file changed

+90
-14
lines changed

1 file changed

+90
-14
lines changed

.github/workflows/smoke-test-and-package.yml

Lines changed: 90 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,8 @@ jobs:
342342
buildName: smokeTest
343343
projectPath: unity-sdk-smoketest-project
344344
customParameters: -apikey ${{ ENV.JOB_API_KEY }} -domainkey ${{ ENV.JOB_DOMAIN_KEY }}
345-
test-samples-and-validate-sdk:
346-
name: Test Samples and Validate SDK
345+
test-samples:
346+
name: Test Samples
347347
runs-on: [ubuntu-latest]
348348
#runs-on: [k8s]
349349
#container:
@@ -388,24 +388,24 @@ jobs:
388388
uses: actions/checkout@v3
389389
with:
390390
path: unity-sdk
391-
- name: Checkout unity-sdk-packager-project repository
391+
- name: Checkout unity-sdk-sample-tester repository
392392
uses: actions/checkout@v3
393393
with:
394-
repository: lootlocker/unity-sdk-packager
395-
path: unity-sdk-packager
394+
repository: lootlocker/unity-sdk-sample-tester
395+
path: unity-sdk-sample-tester
396396
token: ${{ SECRETS.LL_PERSONAL_ACCESS_TOKEN }}
397397
- name: Add LootLockerSDK as asset folder
398398
run: |
399-
cp -r unity-sdk unity-sdk-packager/Assets/LootLockerSDK
399+
cp -r unity-sdk unity-sdk-sample-tester/Assets/LootLockerSDK
400400
- uses: actions/cache@v3
401401
with:
402-
path: unity-sdk-packager/Library
403-
key: ${{ matrix.targetPlatform }}-Library-unity-sdk-packager
402+
path: unity-sdk-sample-tester/Library
403+
key: ${{ matrix.targetPlatform }}-Library-unity-sdk-sample-tester
404404
restore-keys: |
405-
${{ matrix.targetPlatform }}-Library-unity-sdk-packager
405+
${{ matrix.targetPlatform }}-Library-unity-sdk-sample-tester
406406
Library-
407-
- name: Compile and run all sample scenes ${{ matrix.unityVersion }} and validate SDK using asset store tools
408-
id: test-samples-and-validate
407+
- name: Compile and run all sample scenes ${{ matrix.unityVersion }}
408+
id: test-samples
409409
uses: game-ci/unity-test-runner@v4
410410
env:
411411
UNITY_LICENSE: ${{ SECRETS.UNITY_LICENSE }}
@@ -414,8 +414,84 @@ jobs:
414414
with:
415415
testMode: editmode
416416
checkName: Sample Scene ${{ matrix.unityVersion }} Test Results
417-
artifactsPath: test-samples-and-validate-${{ matrix.unityVersion }}-artifacts
418-
projectPath: unity-sdk-packager
417+
artifactsPath: test-samples-${{ matrix.unityVersion }}-artifacts
418+
projectPath: unity-sdk-sample-tester
419+
unityVersion: ${{ matrix.unityVersion }}
420+
githubToken: ${{ SECRETS.GITHUB_TOKEN }}
421+
validate-sdk:
422+
name: Validate SDK
423+
runs-on: [ubuntu-latest]
424+
#runs-on: [k8s]
425+
#container:
426+
# image: ubuntu-latest
427+
needs: [editor-smoke-test, linux-build-smoke-test]
428+
timeout-minutes: 20
429+
env:
430+
LL_USE_STAGE: false
431+
strategy:
432+
fail-fast: false
433+
matrix:
434+
unityVersion:
435+
- 2019.4.40f1
436+
- 2020.3.48f1
437+
- 2021.3.32f1
438+
- 2022.3.14f1
439+
- 2023.2.1f1
440+
steps:
441+
- name: Setup commandline dependencies (if on self-hosted runner)
442+
if: ${{ env.LL_USE_STAGE == 'true' }}
443+
run: |
444+
apt update
445+
apt-get install -y git
446+
git config --global --add safe.directory unity-sdk
447+
git config --global --add safe.directory unity-sdk-packager
448+
apt-get install -y jq
449+
apt-get install -y sed
450+
apt-get install -y docker
451+
apt-get install -y curl
452+
apt-get update
453+
apt-get install ca-certificates curl gnupg
454+
install -m 0755 -d /etc/apt/keyrings
455+
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
456+
chmod a+r /etc/apt/keyrings/docker.gpg
457+
echo \
458+
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
459+
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
460+
tee /etc/apt/sources.list.d/docker.list > /dev/null
461+
apt-get update
462+
apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
463+
- name: Checkout unity-sdk repository
464+
uses: actions/checkout@v3
465+
with:
466+
path: unity-sdk
467+
- name: Checkout unity-sdk-package-validator repository
468+
uses: actions/checkout@v3
469+
with:
470+
repository: lootlocker/unity-sdk-package-validator
471+
path: unity-sdk-package-validator
472+
token: ${{ SECRETS.LL_PERSONAL_ACCESS_TOKEN }}
473+
- name: Add LootLockerSDK as asset folder
474+
run: |
475+
cp -r unity-sdk unity-sdk-package-validator/Assets/LootLockerSDK
476+
- uses: actions/cache@v3
477+
with:
478+
path: unity-sdk-package-validator/Library
479+
key: ${{ matrix.targetPlatform }}-Library-unity-sdk-package-validator
480+
restore-keys: |
481+
${{ matrix.targetPlatform }}-Library-unity-sdk-package-validator
482+
Library-
483+
- name: Validate SDK using asset store tools
484+
id: validate-sdk
485+
uses: game-ci/unity-test-runner@v4
486+
env:
487+
UNITY_LICENSE: ${{ SECRETS.UNITY_LICENSE }}
488+
UNITY_EMAIL: ${{ SECRETS.UNITY_EMAIL }}
489+
UNITY_PASSWORD: ${{ SECRETS.UNITY_PASSWORD }}
490+
with:
491+
testMode: editmode
492+
checkName: Validate SDK ${{ matrix.unityVersion }} Test Results
493+
artifactsPath: validate-sdk-${{ matrix.unityVersion }}-artifacts
494+
projectPath: unity-sdk-package-validator
419495
unityVersion: ${{ matrix.unityVersion }}
420496
githubToken: ${{ SECRETS.GITHUB_TOKEN }}
421497
package-sdk:
@@ -424,7 +500,7 @@ jobs:
424500
#runs-on: [k8s]
425501
#container:
426502
# image: ubuntu-latest
427-
needs: [test-samples-and-validate-sdk]
503+
needs: [test-samples, validate-sdk]
428504
timeout-minutes: 10
429505
# if: (startsWith(github.ref, 'refs/pull') && endsWith(github.base_ref, 'main')) || (startsWith(github.ref, 'refs/heads') && endsWith(github.ref, 'main')) || startsWith(github.ref, 'refs/tags/v')
430506
env:

0 commit comments

Comments
 (0)