Skip to content

Commit f77696e

Browse files
authored
Cloud runner develop v0.1 (#395)
* Correct aws logs link * Correct aws logs link * better aws cli commands and better cleanup for aws * better aws cli commands and better cleanup for aws * improved garbage collection cli options * Only allow ephemeral runners when using cloud runner integration tests flag to avoid unexpected hangup * Only allow ephemeral runners when using cloud runner integration tests flag to avoid unexpected hangup * fix issue #393 * Extract follow log stream service * consolidate into one pipeline file * consolidate into one pipeline file
1 parent 4556fc4 commit f77696e

File tree

13 files changed

+438
-259
lines changed

13 files changed

+438
-259
lines changed

.github/workflows/cleanup.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ jobs:
2323
with:
2424
node-version: 12.x
2525
- run: yarn
26-
- run: yarn run cli -m aws-list-tasks
26+
- run: yarn run cli --help
2727
env:
2828
AWS_REGION: eu-west-2
2929
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
3030
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
3131
AWS_DEFAULT_REGION: eu-west-2
32-
- run: yarn run cli -m aws-list-stacks
32+
- run: yarn run cli -m aws-list-all
3333
env:
3434
AWS_REGION: eu-west-2
3535
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}

.github/workflows/cloud-runner-aws-pipeline.yml

Lines changed: 0 additions & 114 deletions
This file was deleted.

.github/workflows/cloud-runner-k8s-pipeline.yml renamed to .github/workflows/cloud-runner-pipeline.yml

Lines changed: 93 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
name: Cloud Runner - K8s Tests
1+
name: Cloud Runner
22

33
on:
4-
push: { branches: [cloud-runner-develop] }
4+
push: { branches: [cloud-runner-develop, main] }
55
# push: { branches: [main] }
66
# pull_request:
77
# paths-ignore:
@@ -26,6 +26,97 @@ env:
2626
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
2727

2828
jobs:
29+
awsBuild:
30+
name: AWS Fargate Build
31+
if: github.event.pull_request.draft == false
32+
runs-on: ubuntu-latest
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
projectPath:
37+
- test-project
38+
unityVersion:
39+
# - 2019.2.11f1
40+
- 2019.3.15f1
41+
targetPlatform:
42+
#- StandaloneOSX # Build a macOS standalone (Intel 64-bit).
43+
- StandaloneWindows64 # Build a Windows 64-bit standalone.
44+
- StandaloneLinux64 # Build a Linux 64-bit standalone.
45+
- WebGL # WebGL.
46+
#- iOS # Build an iOS player.
47+
#- Android # Build an Android .apk.
48+
# - StandaloneWindows # Build a Windows standalone.
49+
# - WSAPlayer # Build an Windows Store Apps player.
50+
# - PS4 # Build a PS4 Standalone.
51+
# - XboxOne # Build a Xbox One Standalone.
52+
# - tvOS # Build to Apple's tvOS platform.
53+
# - Switch # Build a Nintendo Switch player
54+
# steps
55+
steps:
56+
- name: Checkout (default)
57+
uses: actions/checkout@v2
58+
if: github.event.event_type != 'pull_request_target'
59+
with:
60+
lfs: true
61+
- name: Configure AWS Credentials
62+
uses: aws-actions/configure-aws-credentials@v1
63+
with:
64+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
65+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
66+
aws-region: eu-west-2
67+
- run: yarn
68+
- run: yarn run cli --help
69+
- run: yarn run test "caching"
70+
- run: yarn run test-i-aws
71+
env:
72+
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
73+
PROJECT_PATH: ${{ matrix.projectPath }}
74+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75+
TARGET_PLATFORM: ${{ matrix.targetPlatform }}
76+
cloudRunnerTests: true
77+
versioning: None
78+
- uses: ./
79+
id: aws-fargate-unity-build
80+
timeout-minutes: 25
81+
with:
82+
cloudRunnerCluster: aws
83+
versioning: None
84+
projectPath: ${{ matrix.projectPath }}
85+
unityVersion: ${{ matrix.unityVersion }}
86+
targetPlatform: ${{ matrix.targetPlatform }}
87+
githubToken: ${{ secrets.GITHUB_TOKEN }}
88+
postBuildSteps: |
89+
- name: upload
90+
image: amazon/aws-cli
91+
commands: |
92+
aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID --profile default
93+
aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY --profile default
94+
aws configure set region $AWS_DEFAULT_REGION --profile default
95+
aws s3 ls
96+
aws s3 ls game-ci-test-storage
97+
ls /data/cache/$CACHE_KEY
98+
ls /data/cache/$CACHE_KEY/build
99+
aws s3 cp /data/cache/$CACHE_KEY/build/build-$BUILD_GUID.tar s3://game-ci-test-storage/$CACHE_KEY/build-$BUILD_GUID.tar
100+
secrets:
101+
- name: awsAccessKeyId
102+
value: ${{ secrets.AWS_ACCESS_KEY_ID }}
103+
- name: awsSecretAccessKey
104+
value: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
105+
- name: awsDefaultRegion
106+
value: eu-west-2
107+
- run: |
108+
aws s3 cp s3://game-ci-test-storage/${{ steps.aws-fargate-unity-build.outputs.CACHE_KEY }}/build-${{ steps.aws-fargate-unity-build.outputs.BUILD_GUID }}.tar build-${{ steps.aws-fargate-unity-build.outputs.BUILD_GUID }}.tar
109+
ls
110+
- run: yarn run cli -m aws-garbage-collect
111+
###########################
112+
# Upload #
113+
###########################
114+
# download from cloud storage
115+
- uses: actions/upload-artifact@v2
116+
with:
117+
name: AWS Build (${{ matrix.targetPlatform }})
118+
path: build-${{ steps.aws-fargate-unity-build.outputs.BUILD_GUID }}.tar
119+
retention-days: 14
29120
k8sBuilds:
30121
name: K8s (GKE Autopilot) build for ${{ matrix.targetPlatform }} on version ${{ matrix.unityVersion }}
31122
runs-on: ubuntu-latest
@@ -105,7 +196,6 @@ jobs:
105196
aws s3 ls
106197
aws s3 ls game-ci-test-storage
107198
ls /data/cache/$CACHE_KEY
108-
echo "/data/cache/$CACHE_KEY/build/build-$BUILD_GUID.tar s3://game-ci-test-storage/$CACHE_KEY/$BUILD_FILE"
109199
aws s3 cp /data/cache/$CACHE_KEY/build/build-$BUILD_GUID.tar s3://game-ci-test-storage/$CACHE_KEY/build-$BUILD_GUID.tar
110200
secrets:
111201
- name: awsAccessKeyId

0 commit comments

Comments
 (0)