@@ -11,9 +11,9 @@ concurrency:
11
11
cancel-in-progress : true
12
12
13
13
jobs :
14
- windows :
14
+ build :
15
15
name : Build sample game for AltTester 🛠️
16
- runs-on : windows-2022
16
+ runs-on : macos-latest
17
17
steps :
18
18
- uses : actions/checkout@v3
19
19
with :
@@ -30,27 +30,38 @@ jobs:
30
30
UNITY_EMAIL : ${{ secrets.UNITY_EMAIL }}
31
31
UNITY_PASSWORD : ${{ secrets.UNITY_PASSWORD }}
32
32
UNITY_SERIAL : ${{ secrets.UNITY_SERIAL }}
33
- ALTSERVER_HOST : 54.66.58.33
34
- ALTSERVER_PORT : 13000
35
33
with :
36
- targetPlatform : StandaloneWindows64
34
+ targetPlatform : StandaloneOSX
37
35
projectPath : sample
38
- buildMethod : WindowsBuilder .BuildForAltTester
36
+ buildMethod : MacBuilder .BuildForAltTester
39
37
customParameters : -logFile logFile.log -quit -batchmode
38
+ - name : build permissions
39
+ run : |
40
+ chmod -R 755 sample/Builds/MacOS/SampleApp.app
41
+ xattr -d com.apple.quarantine sample/Builds/MacOS/SampleApp.app
40
42
- name : Upload artifact
41
43
uses : actions/upload-artifact@v4
42
- if : always()
43
44
with :
44
- name : Build-StandaloneWindows64
45
- path : sample/**
45
+ name : Build-StandaloneOSX
46
+ path : sample/Builds/MacOS
47
+ test :
48
+ name : Run UI tests on AltTester 🧪
49
+ runs-on : macos-latest
50
+ needs : build
51
+ steps :
52
+ - uses : actions/checkout@v3
53
+ with :
54
+ lfs : true
55
+ - uses : actions/download-artifact@v4
56
+ with :
57
+ name : Build-StandaloneOSX
46
58
- name : Open application
47
59
run : |
48
- pwd
49
- ls -la
50
60
export RUN_IN_BROWSERSTACK="false"
51
61
export ALTSERVER_HOST="54.66.58.33"
52
62
export ALTSERVER_PORT=13000
53
63
chmod -R 755 SampleApp.app
64
+ xattr -d com.apple.quarantine SampleApp.app
54
65
open SampleApp.app
55
66
- uses : actions/setup-python@v4
56
67
with :
59
70
run : pip install -r "sample/Tests/requirements.txt"
60
71
- name : Run UI tests
61
72
run : |
62
- pwd
63
- ls -la
64
73
export ALTSERVER_HOST="54.66.58.33"
65
74
export ALTSERVER_PORT=13000
66
75
pytest -s -v sample/Tests/test.py
67
- macos :
68
- name : Build sample game for AltTester 🛠️
69
- runs-on : macos-15
70
- steps :
71
- - uses : actions/checkout@v3
72
- with :
73
- lfs : true
74
- - uses : actions/cache@v3
75
- with :
76
- path : Library
77
- key : Library-${{ hashFiles('sample/Assets/**', 'sample/Packages/**', 'sample/ProjectSettings/**') }}
78
- restore-keys : |
79
- Library-
80
- - uses : buildalon/unity-setup@v1
81
- with :
82
- unity-version : 2021.3.26f1(a16dc32e0ff2)
83
- build-targets : StandaloneOSX
84
- modules : mac-server
85
-
86
- - run : |
87
- echo "UNITY_HUB_PATH: '${{ env.UNITY_HUB_PATH }}'"
88
- echo "UNITY_EDITORS: '${{ env.UNITY_EDITORS }}'"
89
- echo "UNITY_EDITOR_PATH: '${{ env.UNITY_EDITOR_PATH }}'"
90
- echo "UNITY_PROJECT_PATH: '${{ env.UNITY_PROJECT_PATH }}'"
91
- ${{ env.UNITY_EDITOR_PATH }} -quit -batchmode -projectPath ${{ env.UNITY_PROJECT_PATH }} -executeMethod MacBuilder.BuildForAltTester -logFile unity_build.log 2>&1
92
- continue-on-error: true
93
- - name : Upload Unity Build Log
94
- uses : actions/upload-artifact@v3
95
- with :
96
- name : Unity-Build-Log
97
- path : unity_build.log
98
- # build:
99
- # name: Build sample game for AltTester 🛠️
100
- # runs-on: macos-15
101
- # steps:
102
- # - uses: actions/checkout@v3
103
- # with:
104
- # lfs: true
105
- # - uses: actions/cache@v3
106
- # with:
107
- # path: Library
108
- # key: Library-${{ hashFiles('sample/Assets/**', 'sample/Packages/**', 'sample/ProjectSettings/**') }}
109
- # restore-keys: |
110
- # Library-
111
- # - uses: buildalon/unity-setup@v1
112
- # with:
113
- # unity-version: 2021.3.26f1
114
- # build-targets: StandaloneOSX
115
- # modules: mac-server
116
- #
117
- # - run: |
118
- # echo "UNITY_HUB_PATH: '${{ env.UNITY_HUB_PATH }}'"
119
- # echo "UNITY_EDITORS: '${{ env.UNITY_EDITORS }}'"
120
- # echo "UNITY_EDITOR_PATH: '${{ env.UNITY_EDITOR_PATH }}'"
121
- # echo "UNITY_PROJECT_PATH: '${{ env.UNITY_PROJECT_PATH }}'"
122
- # test:
123
- # name: Run UI tests on AltTester 🧪
124
- # runs-on: macos-latest
125
- # needs: build
126
- # steps:
127
- # - uses: actions/checkout@v3
128
- # with:
129
- # lfs: true
130
- # - uses: actions/download-artifact@v4
131
- # with:
132
- # name: Build-StandaloneWindows64
133
- # - name: Open application
134
- # run: |
135
- # pwd
136
- # ls -la
137
- # export RUN_IN_BROWSERSTACK="false"
138
- # export ALTSERVER_HOST="54.66.58.33"
139
- # export ALTSERVER_PORT=13000
140
- # chmod -R 755 SampleApp.app
141
- # open SampleApp.app
142
- # - uses: actions/setup-python@v4
143
- # with:
144
- # python-version: "3.10"
145
- # - name: Install dependencies
146
- # run: pip install -r "sample/Tests/requirements.txt"
147
- # - name: Run UI tests
148
- # run: |
149
- # export ALTSERVER_HOST="54.66.58.33"
150
- # export ALTSERVER_PORT=13000
151
- # pytest -s -v sample/Tests/test.py
152
76
0 commit comments