Skip to content

Commit e9fcff6

Browse files
authored
Add Quest to the build system (#54)
* Update Unity version in CI * Add Q2+ build to CI (not pushed to Oculus yet) * Re-enable "free extra space" for Android builds * Move -define:STEAMVRBUILD from mcs.rsp to csc.rsp
1 parent 8a6395d commit e9fcff6

File tree

4 files changed

+27
-21
lines changed

4 files changed

+27
-21
lines changed

.github/workflows/build.yml

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on: # yamllint disable-line rule:truthy
1212
- "v*"
1313

1414
env:
15-
UNITY_VERSION: "2019.4.25f1"
15+
UNITY_VERSION: "2022.3.42f1"
1616
jobs:
1717
configuration:
1818
if: |
@@ -176,39 +176,46 @@ jobs:
176176
fail-fast: false
177177
matrix:
178178
flavors: ${{ fromJson(needs.configuration.outputs.flavors) }}
179-
name: [Windows] # These will all be overwritten, but because we have the flavors matrix as well, we can't just add configurations via include; they'll overwrite each other. This way ensures that we get each one
179+
name: [Windows, Oculus Quest (2+)] # These will all be overwritten, but because we have the flavors matrix as well, we can't just add configurations via include; they'll overwrite each other. This way ensures that we get each one
180180
include:
181181
- name: Windows
182182
targetPlatform: StandaloneWindows64
183183
cache: Windows
184184

185+
- name: Oculus Quest (2+)
186+
targetPlatform: Android
187+
vrsdk: Oculus
188+
cache: Android_Vulkan
189+
extraoptions: -btb-il2cpp
190+
versionSuffix: 1
191+
extra_defines: OCULUS_SUPPORTED
192+
185193
steps:
186194
- name: Set masking
187195
run: echo "::add-mask::DoNotStealThis1"
188196
- name: Free extra space
189-
# This takes several minutes, so we only do it where required. As of 12/10/2023, this increases free space from 18GB to 41GB
190-
if: false
191-
# if: matrix.targetPlatform == 'Android' || matrix.targetPlatform == 'StandaloneWindows64' || matrix.targetPlatform == 'StandaloneLinux64'
197+
# As of 02/08/2024, this increases free space from 21GB to 47GB
198+
if: matrix.targetPlatform == 'Android'
192199
run: |
193200
echo "Initial free space"
194201
df -h /
195202
echo "Removing all pre-loaded docker images"
196-
docker rmi $(docker image ls -aq) # Removes ~6GB
203+
docker rmi $(docker image ls -aq) # Removes ~3GB
197204
df -h /
198205
echo "Listing 100 largest packages"
199206
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -rn | head -n 100
200207
echo "Removing unneeded large packages"
201208
sudo apt update
202-
sudo apt remove -y '^ghc-.*' '^dotnet-.*' azure-cli powershell google-chrome-stable firefox microsoft-edge-stable 'mongodb-*' 'mysql-*' 'mariadb-*' 'temurin-*' 'openjdk-*' default-jre-headless # Removes ~7GB # Adding 'google-cloud-*' removes another 750MB but takes about a minute; not worth it
209+
sudo apt remove -y '^ghc-.*' '^dotnet-.*' azure-cli powershell google-chrome-stable firefox microsoft-edge-stable 'mongodb-*' 'mysql-*' 'mariadb-*' 'temurin-*' 'openjdk-*' default-jre-headless mono-devel libgl1-mesa-dri # Removes ~6GB
203210
sudo apt autoremove -y
204211
sudo apt clean
205212
df -h /
206-
echo "Listing 100 largest remaining packages"
207-
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -rn | head -n 100
208-
echo "Removing remaining large directories"
213+
echo "Removing Android"
214+
sudo rm -rf /usr/local/lib/android # Removes ~9GB
209215
df -h /
216+
echo "Removing remaining large directories"
210217
rm -rf /usr/share/dotnet/ # Removes ~1GB
211-
rm -rf "$AGENT_TOOLSDIRECTORY" # Removes ~6GB
218+
rm -rf "$AGENT_TOOLSDIRECTORY" # Removes ~7GB
212219
echo "Disk space after cleanup"
213220
df -h /
214221
@@ -288,7 +295,7 @@ jobs:
288295
elif [[ "${{ matrix.targetPlatform}}" == "StandaloneOSX" ]]; then
289296
echo "filename=$BASENAME.app" >> $GITHUB_ENV
290297
elif [[ "${{ matrix.targetPlatform}}" == "Android" ]]; then
291-
echo "filename=com.Icosa.$BASENAME.apk" >> $GITHUB_ENV
298+
echo "filename=foundation.Icosa.$BASENAME.apk" >> $GITHUB_ENV
292299
fi
293300
294301
- name: Enable Development Mode
@@ -463,15 +470,22 @@ jobs:
463470
with:
464471
name: Windows
465472
path: build_windows
473+
- name: Download Build Artifacts (Oculus Quest 2+)
474+
uses: actions/download-artifact@v4
475+
with:
476+
name: Oculus Quest (2+)
477+
path: build_oculus_quest
466478

467479
- name: Package Artifacts for release
468480
env:
469481
VERSION: ${{ needs.configuration.outputs.version }}
470482
run: |
471483
mkdir releases
472484
mv build_windows/StandaloneWindows64/ releases/OpenBlocks_Desktop_$VERSION/
485+
mv build_oculus_quest/*/foundation.Icosa.OpenBLocks*apk releases/OpenBlocks_Quest_$VERSION.apk
473486
cd releases
474487
zip -r OpenBlocks_Desktop_$VERSION.zip OpenBlocks_Desktop_$VERSION/
488+
rm -rf OpenBlocks_Desktop_$VERSION
475489
476490
- name: Publish
477491
uses: softprops/action-gh-release@v2

Assets/csc.rsp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
-unsafe
2+
-define:STEAMVRBUILD

Assets/mcs.rsp

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

Assets/mcs.rsp.meta

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

0 commit comments

Comments
 (0)