2023-06-17 19:07:24 +00:00
|
|
|
name: Build Heaven Studio
|
2022-02-24 00:36:36 +00:00
|
|
|
|
2023-06-08 21:17:40 +00:00
|
|
|
on:
|
|
|
|
push:
|
2024-01-16 00:44:04 +00:00
|
|
|
branches: [ "master", "release_1_patches" ]
|
2023-07-20 16:42:21 +00:00
|
|
|
workflow_dispatch: {}
|
2022-02-24 00:36:36 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build for ${{ matrix.targetPlatform }}
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
targetPlatform:
|
2023-06-17 19:07:24 +00:00
|
|
|
- StandaloneWindows64
|
2022-02-24 00:36:36 +00:00
|
|
|
- StandaloneOSX
|
2023-06-17 19:34:42 +00:00
|
|
|
- StandaloneLinux64
|
2022-02-24 00:36:36 +00:00
|
|
|
|
|
|
|
steps:
|
2023-07-31 01:48:39 +00:00
|
|
|
- name: Free Disk Space (Ubuntu)
|
|
|
|
uses: jlumbroso/free-disk-space@main
|
|
|
|
with:
|
|
|
|
# this might remove tools that are actually needed,
|
|
|
|
# if set to "true" but frees about 6 GB
|
|
|
|
tool-cache: false
|
|
|
|
|
|
|
|
# all of these default to true, but feel free to set to
|
|
|
|
# "false" if necessary for your workflow
|
|
|
|
android: true
|
|
|
|
dotnet: false
|
|
|
|
haskell: true
|
2023-08-13 08:10:42 +00:00
|
|
|
large-packages: false
|
2023-07-31 01:48:39 +00:00
|
|
|
docker-images: false
|
2023-07-31 02:10:16 +00:00
|
|
|
swap-storage: false
|
2023-07-31 01:48:39 +00:00
|
|
|
|
2022-02-24 00:36:36 +00:00
|
|
|
- name: Checkout repository
|
2024-01-25 21:15:45 +00:00
|
|
|
uses: actions/checkout@v4
|
2022-02-24 00:36:36 +00:00
|
|
|
# with:
|
|
|
|
# lfs: true
|
|
|
|
|
2023-06-17 19:07:24 +00:00
|
|
|
# Cache reused Library files to speed up compilation
|
2024-01-25 21:15:45 +00:00
|
|
|
- uses: actions/cache@v4.0.0
|
2022-02-24 00:36:36 +00:00
|
|
|
with:
|
|
|
|
path: Library
|
|
|
|
key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
|
|
|
|
restore-keys: |
|
|
|
|
Library-
|
|
|
|
|
|
|
|
# Test (No tests yet, leaving this here for future.)
|
|
|
|
# - name: Run tests
|
|
|
|
# uses: game-ci/unity-test-runner@v2
|
|
|
|
# env:
|
|
|
|
# UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
|
|
|
# with:
|
|
|
|
# githubToken: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Build project
|
2024-01-25 21:15:45 +00:00
|
|
|
uses: game-ci/unity-builder@v4
|
2022-02-24 00:36:36 +00:00
|
|
|
env:
|
|
|
|
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
|
|
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
|
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
|
|
with:
|
|
|
|
unityVersion: auto
|
|
|
|
buildName: Heaven Studio
|
|
|
|
buildsPath: build
|
2023-06-18 21:49:14 +00:00
|
|
|
buildMethod: UnityBuilderAction.BuildScript.Build
|
2022-02-24 00:36:36 +00:00
|
|
|
targetPlatform: ${{ matrix.targetPlatform }}
|
2023-07-31 01:07:53 +00:00
|
|
|
|
|
|
|
# clean up stuff we no longer need
|
|
|
|
- name: Clean up
|
|
|
|
run: |
|
|
|
|
rm -rf ./Assets
|
|
|
|
rm -rf ./Packages
|
|
|
|
rm -rf ./ProjectSettings
|
2023-06-17 19:07:24 +00:00
|
|
|
|
2023-06-17 19:49:49 +00:00
|
|
|
# Required on Mac/Linux to keep executable permissions
|
2023-01-23 14:58:58 +00:00
|
|
|
- name: Tar files
|
2023-06-17 19:49:49 +00:00
|
|
|
if: matrix.targetPlatform != 'StandaloneWindows64'
|
2023-01-23 14:58:58 +00:00
|
|
|
run: tar -cvf ${{ matrix.targetPlatform }}.tar ./build/${{ matrix.targetPlatform }}
|
2023-06-17 19:07:24 +00:00
|
|
|
|
2023-06-17 19:49:49 +00:00
|
|
|
- name: Upload Artifact (Windows)
|
|
|
|
if: matrix.targetPlatform == 'StandaloneWindows64'
|
2023-06-17 19:07:24 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: ${{ matrix.targetPlatform }}-build
|
|
|
|
path: ./build/${{ matrix.targetPlatform }}/
|
|
|
|
|
2023-06-17 19:49:49 +00:00
|
|
|
- name: Upload Artifact (macOS / Linux)
|
|
|
|
if: matrix.targetPlatform != 'StandaloneWindows64'
|
2023-01-23 14:58:58 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-02-24 00:36:36 +00:00
|
|
|
with:
|
|
|
|
name: ${{ matrix.targetPlatform }}-build
|
2023-01-23 14:58:58 +00:00
|
|
|
path: ${{ matrix.targetPlatform }}.tar
|
|
|
|
|
2023-06-17 19:07:24 +00:00
|
|
|
- name: debug thing
|
|
|
|
run: tree .
|
|
|
|
|