diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml new file mode 100644 index 00000000..f1fbc751 --- /dev/null +++ b/.github/workflows/test-build.yml @@ -0,0 +1,78 @@ +--- +name: Test & Build + +on: + push: + branches: [main] + pull_request: + +jobs: + test: + if: github.event.pull_request.head.repo.fork == false + name: Test sample game 🧪 + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + lfs: true + - run: git lfs pull + + - uses: game-ci/unity-test-runner@v4 + id: passportTest + env: + UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} + UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} + UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} + with: + unityVersion: 2021.3.26f1 + projectPath: './sample' + githubToken: ${{ secrets.GITHUB_TOKEN }} + testMode: 'EditMode' + - uses: actions/upload-artifact@v4 + if: always() + with: + name: Test results + path: ${{ steps.passportTest.outputs.artifactsPath }} + + - uses: actions/upload-artifact@v4 + if: always() + with: + name: Coverage results + path: ${{ steps.passportTest.outputs.coveragePath }} + build: + name: Build for ${{ matrix.targetPlatform }} + runs-on: ubuntu-latest-8-cores + strategy: + fail-fast: false + matrix: + targetPlatform: + - iOS + - Android + - WebGL + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + lfs: true + - uses: actions/cache@v3 + with: + path: Library + key: + Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}-${{ matrix.targetPlatform }} + restore-keys: | + Library-${{ matrix.targetPlatform }} + Library- + - uses: game-ci/unity-builder@v4 + env: + UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} + UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} + UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} + with: + unityVersion: 2021.3.26f1 + targetPlatform: ${{ matrix.targetPlatform }} + projectPath: './sample' + - uses: actions/upload-artifact@v3 + with: + name: Build + path: build \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 56991855..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: Test - -on: [pull_request] - -jobs: - test: - if: github.event.pull_request.head.repo.fork == false - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - lfs: true - - run: git lfs pull - - - uses: game-ci/unity-test-runner@v3 - id: passportTest - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - with: - unityVersion: 2021.3.26f1 - projectPath: './sample' - githubToken: ${{ secrets.GITHUB_TOKEN }} - testMode: 'EditMode' - - uses: actions/upload-artifact@v4 - if: always() - with: - name: Test results - path: ${{ steps.passportTest.outputs.artifactsPath }} - - - uses: actions/upload-artifact@v4 - if: always() - with: - name: Coverage results - path: ${{ steps.passportTest.outputs.coveragePath }} diff --git a/src/Packages/Passport/Runtime/ThirdParty/Gree/Assets/Plugins/WebViewObject.cs b/src/Packages/Passport/Runtime/ThirdParty/Gree/Assets/Plugins/WebViewObject.cs index 417e4581..6de2f4bd 100644 --- a/src/Packages/Passport/Runtime/ThirdParty/Gree/Assets/Plugins/WebViewObject.cs +++ b/src/Packages/Passport/Runtime/ThirdParty/Gree/Assets/Plugins/WebViewObject.cs @@ -315,7 +315,7 @@ public void LaunchAuthURL(string url, string redirectUri) if (webView == IntPtr.Zero) return; _CImmutableWebViewPlugin_LaunchAuthURL(webView, url, redirectUri != null ? redirectUri : ""); -#elif UNITY_IPHONE && !UNITY_EDITOR_WIN +#elif UNITY_IPHONE && !UNITY_EDITOR if (webView == IntPtr.Zero) return; _CImmutableWebViewPlugin_LaunchAuthURL(webView, url);