free disk space in ci #48
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For ci we just need testing, as that would check compilation also | |
# Need to create a test suit and change this workflow | |
name: Build | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build For ${{ matrix.build.target }} | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
build: | |
- { target: Android, method: CodeBlaze.Editor.Build.Builder.BuildAndroidRelease } | |
- { target: StandaloneWindows64, method: CodeBlaze.Editor.Build.Builder.BuildWindowsRelease } | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
lfs: true | |
- uses: actions/cache@v3 | |
with: | |
path: Library | |
key: | |
Library-${{ matrix.build.target }}-${{ hashFiles('.') }} | |
restore-keys: | | |
Library-${{ matrix.build.target }}- | |
Library- | |
- 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: true | |
haskell: true | |
large-packages: true | |
docker-images: true | |
swap-storage: true | |
- uses: game-ci/unity-builder@v4 | |
env: | |
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | |
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} | |
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} | |
with: | |
targetPlatform: ${{ matrix.build.target }} | |
buildMethod: ${{ matrix.build.method }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Build-${{ matrix.build.target }} | |
path: | | |
Build | |
!**/*DoNotShip*/** | |
!**/*ButDontShipItWithYourGame*/** |