diff --git a/.github/workflows/cloud-runner-ci-pipeline.yml b/.github/workflows/cloud-runner-ci-pipeline.yml deleted file mode 100644 index 5a7a4da0..00000000 --- a/.github/workflows/cloud-runner-ci-pipeline.yml +++ /dev/null @@ -1,195 +0,0 @@ -name: Cloud Runner CI - -on: - push: { branches: [main] } -# push: { branches: [main] } -# pull_request: -# paths-ignore: -# - '.github/**' - -env: - GKE_ZONE: 'us-central1' - GKE_REGION: 'us-central1' - GKE_PROJECT: 'unitykubernetesbuilder' - GKE_CLUSTER: 'game-ci-github-pipelines' - GCP_LOGGING: true - GCP_PROJECT: unitykubernetesbuilder - GCP_LOG_FILE: ${{ github.workspace }}/cloud-runner-logs.txt - AWS_REGION: eu-west-2 - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_DEFAULT_REGION: eu-west-2 - AWS_BASE_STACK_NAME: game-ci-github-pipelines - CLOUD_RUNNER_BRANCH: ${{ github.ref }} - CLOUD_RUNNER_DEBUG: true - CLOUD_RUNNER_DEBUG_TREE: true - DEBUG: true - UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} - PROJECT_PATH: test-project - UNITY_VERSION: 2019.3.15f1 - USE_IL2CPP: false - -jobs: - localCiPipeline: - name: CI Pipeline - Local Stage - Smoke Test - if: github.event.event_type != 'pull_request_target' - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - cloudRunnerCluster: - #- aws - - local-docker - #- k8s - targetPlatform: - #- StandaloneOSX # Build a macOS standalone (Intel 64-bit). - - StandaloneWindows64 # Build a Windows 64-bit standalone. - - StandaloneLinux64 # Build a Linux 64-bit standalone. - - WebGL # WebGL. - #- iOS # Build an iOS player. - #- Android # Build an Android .apk. - # - StandaloneWindows # Build a Windows standalone. - # - WSAPlayer # Build an Windows Store Apps player. - # - PS4 # Build a PS4 Standalone. - # - XboxOne # Build a Xbox One Standalone. - # - tvOS # Build to Apple's tvOS platform. - # - Switch # Build a Nintendo Switch player - # steps - steps: - - name: Checkout (default) - uses: actions/checkout@v2 - with: - lfs: true - - run: yarn - - run: yarn run cli --help - - uses: ./ - id: unity-build - timeout-minutes: 25 - env: - UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} - with: - cloudRunnerTests: true - versioning: None - projectPath: ${{ matrix.projectPath }} - gitPrivateToken: ${{ secrets.GITHUB_TOKEN }} - targetPlatform: ${{ matrix.targetPlatform }} - cloudRunnerCluster: ${{ matrix.cloudRunnerCluster }} - - run: | - ls $GITHUB_WORKSPACE/cloud-runner-cache/ - cp $GITHUB_WORKSPACE/cloud-runner-cache/cache/${{ steps.unity-build.outputs.CACHE_KEY }}/build/build-${{ steps.unity-build.outputs.BUILD_GUID }}.tar.lz4 build-${{ steps.unity-build.outputs.BUILD_GUID }}.tar.lz4 - - run: yarn run cli -m list-resources - ########################### - # Upload # - ########################### - # download from cloud storage - - uses: actions/upload-artifact@v2 - with: - name: AWS Build (${{ matrix.targetPlatform }}) - path: build-${{ steps.unity-build.outputs.BUILD_GUID }}.tar.lz4 - retention-days: 14 - - run: yarn run test-i --detectOpenHandles --forceExit --runInBand - if: github.ref != 'refs/heads/cloud-runner-develop' && github.ref != 'refs/heads/cloud-runner-preview' - timeout-minutes: 180 - env: - UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} - PROJECT_PATH: ${{ matrix.projectPath }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - TARGET_PLATFORM: ${{ matrix.targetPlatform }} - cloudRunnerTests: true - versioning: None - CLOUD_RUNNER_CLUSTER: ${{ matrix.cloudRunnerCluster }} - ########################### - # Upload # - ########################### - # download from cloud storage - # - uses: actions/upload-artifact@v2 - # if: ${{ matrix.cloudRunnerCluster != 'k8s' }} - # with: - # name: AWS Build (${{ matrix.targetPlatform }}) - # path: build-${{ steps.aws-fargate-unity-build.outputs.BUILD_GUID }}.tar.lz4 - # retention-days: 14 - cloudCiPipeline: - needs: localCiPipeline - name: CI Pipeline - Cloud Stage - if: github.event.event_type != 'pull_request_target' - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - cloudRunnerCluster: - - aws - #- local-docker - - k8s - targetPlatform: - #- StandaloneOSX # Build a macOS standalone (Intel 64-bit). - - StandaloneWindows64 # Build a Windows 64-bit standalone. - - StandaloneLinux64 # Build a Linux 64-bit standalone. - - WebGL # WebGL. - #- iOS # Build an iOS player. - #- Android # Build an Android .apk. - # - StandaloneWindows # Build a Windows standalone. - # - WSAPlayer # Build an Windows Store Apps player. - # - PS4 # Build a PS4 Standalone. - # - XboxOne # Build a Xbox One Standalone. - # - tvOS # Build to Apple's tvOS platform. - # - Switch # Build a Nintendo Switch player - # steps - steps: - - name: Checkout (default) - uses: actions/checkout@v2 - with: - lfs: true - - - uses: google-github-actions/setup-gcloud@v0 - with: - version: '288.0.0' - service_account_email: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_EMAIL }} - service_account_key: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY }} - - name: Get GKE cluster credentials - run: gcloud container clusters get-credentials $GKE_CLUSTER --zone $GKE_ZONE --project $GKE_PROJECT - - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: eu-west-2 - - run: yarn - - run: yarn run cli --help - - uses: ./ - id: unity-build - timeout-minutes: 90 - env: - UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} - with: - cloudRunnerTests: true - versioning: None - projectPath: ${{ matrix.projectPath }} - gitPrivateToken: ${{ secrets.GITHUB_TOKEN }} - targetPlatform: ${{ matrix.targetPlatform }} - cloudRunnerCluster: ${{ matrix.cloudRunnerCluster }} - customStepFiles: aws-s3-upload-build,aws-s3-pull-cache,aws-s3-upload-cache - - run: | - aws s3 cp s3://game-ci-test-storage/cloud-runner-cache/${{ steps.unity-build.outputs.CACHE_KEY }}/build/build-${{ steps.unity-build.outputs.BUILD_GUID }}.tar.lz4 build-${{ steps.unity-build.outputs.BUILD_GUID }}.tar.lz4 - ls - - run: yarn run cli -m list-resources - ########################### - # Upload # - ########################### - # download from cloud storage - - uses: actions/upload-artifact@v2 - with: - name: AWS Build (${{ matrix.targetPlatform }}) - path: build-${{ steps.unity-build.outputs.BUILD_GUID }}.tar.lz4 - retention-days: 14 - - run: yarn run test-i --detectOpenHandles --forceExit --runInBand - if: ${{ matrix.targetPlatform == 'StandaloneWindows64' }} - timeout-minutes: 180 - env: - UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} - PROJECT_PATH: ${{ matrix.projectPath }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - TARGET_PLATFORM: ${{ matrix.targetPlatform }} - cloudRunnerTests: true - versioning: None - CLOUD_RUNNER_CLUSTER: ${{ matrix.cloudRunnerCluster }} diff --git a/.github/workflows/cloud-runner-dev-pipeline.yml b/.github/workflows/cloud-runner-pipeline.yml similarity index 90% rename from .github/workflows/cloud-runner-dev-pipeline.yml rename to .github/workflows/cloud-runner-pipeline.yml index e519d034..28534094 100644 --- a/.github/workflows/cloud-runner-dev-pipeline.yml +++ b/.github/workflows/cloud-runner-pipeline.yml @@ -1,4 +1,4 @@ -name: Cloud Runner Dev +name: Cloud Runner CI Pipeline on: push: { branches: [cloud-runner-develop, cloud-runner-preview] } @@ -31,7 +31,7 @@ env: jobs: integrationTests: - name: Dev Pipeline - Integration Tests + name: Integration Tests (Local Only) if: github.event.event_type != 'pull_request_target' runs-on: ubuntu-latest steps: @@ -59,7 +59,7 @@ jobs: CLOUD_RUNNER_CLUSTER: local-docker buildTargetTests: - name: Dev Pipeline - Build Target Tests + name: Build Target Tests (Local Only) if: github.event.event_type != 'pull_request_target' runs-on: ubuntu-latest strategy: @@ -126,7 +126,7 @@ jobs: path: build-${{ steps.unity-build.outputs.BUILD_GUID }}.tar.lz4 retention-days: 14 buildTests: - name: Dev Pipeline - Builds + name: Cloud Provider Build Tests if: github.event.event_type != 'pull_request_target' runs-on: ubuntu-latest strategy: @@ -194,3 +194,14 @@ jobs: name: ${{ matrix.cloudRunnerCluster }} Build (${{ matrix.targetPlatform }}) path: build-${{ steps.unity-build.outputs.BUILD_GUID }}.tar.lz4 retention-days: 14 + - run: yarn run test-i --detectOpenHandles --forceExit --runInBand + if: ${{ matrix.targetPlatform == 'StandaloneWindows64' && startsWith(github.ref, 'refs/tags/v') && matrix.cloudRunnerCluster != 'local-docker' }} + timeout-minutes: 180 + env: + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + PROJECT_PATH: ${{ matrix.projectPath }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TARGET_PLATFORM: ${{ matrix.targetPlatform }} + cloudRunnerTests: true + versioning: None + CLOUD_RUNNER_CLUSTER: ${{ matrix.cloudRunnerCluster }}