diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4a15f2b1..e397acf8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,8 +7,8 @@ on: types: [opened, synchronize] jobs: - buildAndTestForLinuxAndWebGLPlatforms: - name: Build and Test ${{ matrix.targetPlatform }} + buildAndTestForLinuxBasedPlatforms: + name: Build and Test for ${{ matrix.targetPlatform }} runs-on: ubuntu-latest strategy: fail-fast: false @@ -19,79 +19,13 @@ jobs: - 2022.3.17f1 targetPlatform: - StandaloneLinux64 # Build a Linux 64-bit standalone. - - WebGL # WebGL. - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - lfs: false - - uses: actions/cache@v3 - with: - path: ${{ matrix.projectPath }}/Library - key: - Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}-${{ - hashFiles(matrix.projectPath) }} - restore-keys: | - Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}- - Library-${{ matrix.projectPath }}- - Library- - - name: Setup config.json - env: - CLIENT_ID: ${{ secrets.CLIENT_ID }} - run: | - mkdir -p Assets/Tests/Resources - echo '{"clientId": "${{ secrets.CLIENT_ID }}"}' > Assets/Tests/Resources/config.json - shell: bash - - uses: game-ci/unity-test-runner@v4 - id: testRunner - env: - UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - with: - projectPath: ${{ matrix.projectPath }} - unityVersion: ${{ matrix.unityVersion }} - githubToken: ${{ secrets.GITHUB_TOKEN }} - testMode: PlayMode # Run PlayMode tests. - - uses: actions/upload-artifact@v3 - if: always() - with: - name: Test results (all modes) - path: ${{ steps.testRunner.outputs.artifactsPath }} - - if: matrix.targetPlatform == 'Android' - uses: jlumbroso/free-disk-space@v1.2.0 - - uses: game-ci/unity-builder@v4 - env: - UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - with: - projectPath: ${{ matrix.projectPath }} - unityVersion: ${{ matrix.unityVersion }} - targetPlatform: ${{ matrix.targetPlatform }} - allowDirtyBuild: true - - uses: actions/upload-artifact@v3 - with: - name: Build - path: build - - buildAndTestForMobilePlatforms: - name: Build and Test For ${{ matrix.targetPlatform }} - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - projectPath: - - "" - unityVersion: - - 2022.3.17f1 - targetPlatform: - iOS # Build an iOS player. - Android # Build an Android player. + - WebGL # WebGL. steps: - uses: actions/checkout@v4 with: - fetch-depth: 0 + # fetch-depth: 0 lfs: false - uses: actions/cache@v3 with: @@ -144,7 +78,7 @@ jobs: path: build buildForWindowsBasedPlatforms: - name: Build ${{ matrix.targetPlatform }} + name: Build for ${{ matrix.targetPlatform }} runs-on: windows-2022 strategy: fail-fast: false @@ -159,7 +93,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - fetch-depth: 0 + # fetch-depth: 0 lfs: false - uses: actions/cache@v3 with: @@ -187,7 +121,7 @@ jobs: path: build buildForMacOSBasedPlatforms: - name: Build ${{ matrix.targetPlatform }} + name: Build for ${{ matrix.targetPlatform }} runs-on: macos-latest strategy: fail-fast: false @@ -202,7 +136,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - fetch-depth: 0 + # fetch-depth: 0 lfs: false - uses: actions/cache@v3