Skip to content

Added define ZENJECT_DISABLE_DEFAULT_UI_ELEMENTS_INJECTION to disable… #11

Added define ZENJECT_DISABLE_DEFAULT_UI_ELEMENTS_INJECTION to disable…

Added define ZENJECT_DISABLE_DEFAULT_UI_ELEMENTS_INJECTION to disable… #11

Workflow file for this run

name: CI
on:
push:
branches:
- master
paths-ignore:
- '*.md'
- 'README.md'
workflow_dispatch: {}
jobs:
buildAndTestForSupportedPlatforms:
name: Build for ${{ matrix.targetPlatform }} on version ${{ matrix.unityVersion }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
projectPath:
- UnityProject
assetsPath:
- UnityProject
unityVersion:
- 2019.4.1f1
targetPlatform:
- Android # Build a Android standalone.
- iOS # Build an iOS player.
- StandaloneLinux64 # Build a Linux 64-bit standalone.
- StandaloneOSX # Build a macOS standalone (Intel 64-bit).
- StandaloneWindows64 # Build a Windows 64-bit standalone.
- WebGL # WebGL.
# Not supported platforms by GitHub actions:
# - Windows Store # Build a standalone for Windows Store devices.
# - PS4 # Build a Playstation 4 standalone.
testMode:
# - playmode
- editmode
steps:
# Need to be rootless to have write access for checkout and clone repo
- name: Use container in rootless mode
uses: ScribeMD/rootless-docker@0.1.7
# Checkout
- name: Checkout repository
uses: actions/checkout@v2
with:
lfs: true
# Create Empty Unity project
- name: Create Unity Project
uses: jbltx/unity-create@v1.1
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
unityVersion: ${{ matrix.unityVersion }}
projectPath: ${{ matrix.projectPath }}
# Checkout and clone UniDi into Assets
# There's no need to do complicated stuff like managing the project manifest
# We just clone to the Assets folder as tests will run from here.
# If there's another way in the future (like automating the process with a cmd for
# Unity's Package Manager) then that would be cool to implement in the Ci workflow.
- name: Checkout and Clone Repository
uses: actions/checkout@v2
with:
repository: Mathijs-Bakker/Extenject
path: ${{ matrix.projectPath }}
# Cache
- name: Caching Unity Project Library
uses: actions/cache@v2
with:
path: ${{ matrix.projectPath }}/Library
key: Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}-${{ hashFiles(matrix.projectPath) }}
restore-keys: |
Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}-
Library-${{ matrix.projectPath }}-
Library-
# Test Runner
- name: Run Tests
uses: game-ci/unity-test-runner@v2
id: testRunner
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
testMode: ${{ matrix.testMode }}
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
checkName: ${{ matrix.testMode }} Test Results
# Upload Test Artifacts
- name: Upload Test Results Artifacts
uses: actions/upload-artifact@v2
if: always()
with:
name: Test results for ${{ matrix.testMode }}
path: ${{ steps.testRunner.outputs.artifactsPath }}
# Build
- name: Build
uses: game-ci/unity-builder@v2
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
targetPlatform: ${{ matrix.targetPlatform }}
# Allow Dirty Build as the semantic versioning is doing unsuspecting things
# this could be something to look further into
allowDirtyBuild: true
build-Zenject-Usage:
runs-on: ubuntu-latest
name: Build Zenject-Usage
env:
DOTNET_NOLOGO: true
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- name: Build
run: dotnet build AssemblyBuild\Zenject-usage.sln
- name: Upload dll
uses: actions/upload-artifact@v1
with:
name: Zenject-Usage
path: AssemblyBuild/Zenject-Usage/Zenject-Usage/bin/Debug/netcoreapp3.1/Zenject-Usage.dll
deployBuild:
name: Deploy Build Zenject-Usage
runs-on: ubuntu-latest
needs: build-Zenject-Usage
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Download Zenject-Usage
uses: actions/download-artifact@v1
with:
name: UniDi-Usage
- name: Install Zenject-Usage
run: |
ls -l Zenject-Usage
cp Zeenject-Usage/Zenject-Usage.dll Source/Usage
ls -l Source/Usage