Skip to content

Commit c746c19

Browse files
authored
Merge pull request #304 from immutable/feature/dx-3336-game-ci
[DX-3336] add build to pipeline
2 parents a9909c4 + afd221b commit c746c19

File tree

4 files changed

+87
-40
lines changed

4 files changed

+87
-40
lines changed

.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|.*sample|.*src/Packages/Passport/WebGLTemplates~)
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|.*sample|.*src/Packages/Passport/WebGLTemplates~|.*.github/workflows)
6161
VALIDATE_MARKDOWN: false
6262
VALIDATE_GITLEAKS: false
6363
VALIDATE_JSCPD: false

.github/workflows/test-build.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
name: Test & Build
3+
4+
on:
5+
push:
6+
branches: [main]
7+
pull_request:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
test:
15+
if: github.event.pull_request.head.repo.fork == false
16+
name: Test sample game 🧪
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v3
21+
with:
22+
lfs: true
23+
- run: git lfs pull
24+
25+
- uses: game-ci/unity-test-runner@v4
26+
id: passportTest
27+
env:
28+
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
29+
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
30+
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
31+
with:
32+
unityVersion: 2021.3.26f1
33+
projectPath: './src/Packages/Passport/Samples~/sample'
34+
githubToken: ${{ secrets.GITHUB_TOKEN }}
35+
testMode: 'EditMode'
36+
- uses: actions/upload-artifact@v4
37+
if: always()
38+
with:
39+
name: Test results
40+
path: ${{ steps.passportTest.outputs.artifactsPath }}
41+
42+
- uses: actions/upload-artifact@v4
43+
if: always()
44+
with:
45+
name: Coverage results
46+
path: ${{ steps.passportTest.outputs.coveragePath }}
47+
build:
48+
name: Build for ${{ matrix.targetPlatform }}
49+
runs-on: ubuntu-latest-8-cores
50+
strategy:
51+
fail-fast: false
52+
matrix:
53+
targetPlatform:
54+
- iOS
55+
- Android
56+
- WebGL
57+
# - StandaloneOSX
58+
- StandaloneWindows64
59+
steps:
60+
- uses: actions/checkout@v4
61+
with:
62+
fetch-depth: 0
63+
lfs: true
64+
- uses: actions/cache@v3
65+
with:
66+
path: Library
67+
key:
68+
Library-${{ matrix.targetPlatform }}-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
69+
restore-keys: |
70+
Library-${{ matrix.targetPlatform }}
71+
Library-
72+
- uses: game-ci/unity-builder@v4
73+
env:
74+
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
75+
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
76+
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
77+
with:
78+
unityVersion: 2021.3.26f1
79+
targetPlatform: ${{ matrix.targetPlatform }}
80+
projectPath: './src/Packages/Passport/Samples~/sample'
81+
- uses: actions/upload-artifact@v3
82+
if: always()
83+
with:
84+
name: Build-${{ matrix.targetPlatform }}
85+
path: build

.github/workflows/test.yml

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +0,0 @@
1-
---
2-
name: Test
3-
4-
on: [pull_request]
5-
6-
jobs:
7-
test:
8-
if: github.event.pull_request.head.repo.fork == false
9-
runs-on: ubuntu-latest
10-
11-
steps:
12-
- uses: actions/checkout@v3
13-
with:
14-
lfs: true
15-
- run: git lfs pull
16-
17-
- uses: game-ci/unity-test-runner@v3
18-
id: passportTest
19-
env:
20-
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
21-
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
22-
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
23-
with:
24-
unityVersion: 2021.3.26f1
25-
projectPath: './src/Packages/Passport/Samples~/sample'
26-
githubToken: ${{ secrets.GITHUB_TOKEN }}
27-
testMode: 'EditMode'
28-
- uses: actions/upload-artifact@v4
29-
if: always()
30-
with:
31-
name: Test results
32-
path: ${{ steps.passportTest.outputs.artifactsPath }}
33-
34-
- uses: actions/upload-artifact@v4
35-
if: always()
36-
with:
37-
name: Coverage results
38-
path: ${{ steps.passportTest.outputs.coveragePath }}

src/Packages/Passport/Runtime/ThirdParty/Gree/Assets/Plugins/WebViewObject.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ public void LaunchAuthURL(string url, string redirectUri)
315315
if (webView == IntPtr.Zero)
316316
return;
317317
_CImmutableWebViewPlugin_LaunchAuthURL(webView, url, redirectUri != null ? redirectUri : "");
318-
#elif UNITY_IPHONE && !UNITY_EDITOR_WIN
318+
#elif UNITY_IPHONE && !UNITY_EDITOR
319319
if (webView == IntPtr.Zero)
320320
return;
321321
_CImmutableWebViewPlugin_LaunchAuthURL(webView, url);

0 commit comments

Comments
 (0)