Skip to content

Commit

Permalink
Merge branch 'release/2.5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Eyap53 committed Sep 24, 2024
2 parents 28ef263 + c6665f0 commit 98f4bba
Show file tree
Hide file tree
Showing 17 changed files with 114 additions and 142 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
name: Actions 😎
name: Builds

on: [push, pull_request]
on:
push:
tags:
- v*
workflow_dispatch:
inputs:
tags:
description: "Test scenario tags"
required: true
type: string

jobs:
buildForAllSupportedPlatforms:
name: Build for ${{ matrix.targetPlatform }}
runs-on: ubuntu-latest
permissions:
contents: write
permissions: write-all
strategy:
fail-fast: false
matrix:
projectPath:
- Unity_ExperimentLibrary
targetPlatform:
- StandaloneOSX # Build a macOS standalone (Intel 64-bit).
- StandaloneWindows # Build a Windows standalone.
Expand Down Expand Up @@ -41,38 +51,17 @@ jobs:
# Cache
- uses: actions/cache@v3
with:
path: Library
path: ${{ matrix.projectPath }}/Library
key:
Library-${{ matrix.targetPlatform }}-${{ hashFiles('Assets/**', 'Packages/**',
'ProjectSettings/**') }}
restore-keys: |
Library-${{ matrix.targetPlatform }}-
Library-
# Test
- name: Run tests
id: myTestStep
uses: game-ci/unity-test-runner@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
projectPath: Unity_ExperimentLibrary
githubToken: ${{ secrets.GITHUB_TOKEN }}

- name: Upload test results
uses: actions/upload-artifact@v3
if: always()
with:
name: Test results ${{ matrix.targetPlatform }}
path: ${{ steps.myTestStep.outputs.artifactsPath }}

- uses: actions/upload-artifact@v3
if: always()
with:
name: Coverage results
path: ${{ steps.myTestStep.outputs.coveragePath }}
# Android specific : Free disk space
- if: matrix.targetPlatform == 'Android'
uses: jlumbroso/[email protected]

# Build
- name: Build project
Expand All @@ -83,8 +72,7 @@ jobs:
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: ${{ matrix.targetPlatform }}
versioning: Semantic
projectPath: Unity_ExperimentLibrary
projectPath: ${{ matrix.projectPath }}

# Output
- uses: actions/upload-artifact@v3
Expand Down
78 changes: 78 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Tests

on: [push, pull_request]

jobs:
test:
name: Test in ${{ matrix.testMode }}
runs-on: ubuntu-latest
permissions: write-all
strategy:
fail-fast: false
matrix:
projectPath:
- Unity_ExperimentLibrary
testMode:
- editmode
# - playmode
# - standalone
steps:
# Checkout (without LFS)
- name: Checkout repository
uses: actions/checkout@v4

# Git LFS
- name: Create LFS file list
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id

- name: Restore LFS cache
uses: actions/cache@v3
id: lfs-cache
with:
path: .git/lfs
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}

- name: Git LFS Pull
run: |
git lfs pull
git add .
git reset --hard
# Cache
- uses: actions/cache@v3
with:
path: ${{ matrix.projectPath }}/Library
key:
Library-${{ matrix.projectPath }}-${{ hashFiles('Assets/**', 'Packages/**',
'ProjectSettings/**') }}
restore-keys: |
Library-
# Test
- name: Run tests
id: tests
uses: game-ci/unity-test-runner@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
projectPath: ${{ matrix.projectPath }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
testMode: ${{ matrix.testMode }}
artifactsPath: ${{ matrix.testMode }}-artifacts
checkName: ${{ matrix.testMode }} Test Results
coverageOptions: "generateAdditionalMetrics;generateHtmlReport;generateBadgeReport;assemblyFilters:+my.assembly.*"

- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
with:
name: Test results for ${{ matrix.testMode }}
path: ${{ steps.tests.outputs.artifactsPath }}

- uses: actions/upload-artifact@v3
if: always()
with:
name: Coverage results for ${{ matrix.testMode }}
path: ${{ steps.tests.outputs.coveragePath }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ crashlytics-build.properties
**/[Aa]ssets/[Ss]treamingAssets/aa.meta
**/[Aa]ssets/[Ss]treamingAssets/aa/*

# Ignore temporaries from GameCI
/[Aa]rtifacts/
/[Cc]odeCoverage/

# Projet specific
Outputs/
Outputs.meta
2 changes: 1 addition & 1 deletion Unity_ExperimentLibrary/Assets/Scripts/Input/GameInput.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
// version 1.6.1
// version 1.7.0
// from Assets/Settings/Input/GameInput.inputactions
//
// Changes to this file may cause incorrect behavior and will be lost if
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### Changed

- **Breaking change**: Refactor file paths for ExperimentLibrary - Use inputs and outputs

## [2.4.1] - 2024-09-18

### Fixed
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class ExperimentInputs
/// <returns>The path to the inputs folder.</returns>
public static string GetInputsFolder()
{
return Path.Combine(@"" + Application.dataPath, "Inputs");
return Path.Combine(@"" + Application.streamingAssetsPath, "Inputs");
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class ExperimentOutputs
public static string GetOutputsFolder()
{
//'@' : prevent the escaping of characters with \. Really useful for paths.
return Path.Combine(@"" + Application.dataPath, "Outputs");
return Path.Combine(@"" + Application.streamingAssetsPath, "Outputs");
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.maellacour.experiment-library",
"version": "2.4.1",
"version": "2.5.0",
"displayName": "Experiment Library",
"description": "A library to easily build experiment applications, and manage the inputs and outputs files in a standardized and clever way",
"unity": "2021.1",
Expand Down Expand Up @@ -33,4 +33,4 @@
"path": "Samples~/OutputEveryFrame"
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ PlayerSettings:
vulkanEnableLateAcquireNextImage: 0
vulkanEnableCommandBufferRecycling: 1
loadStoreDebugModeEnabled: 0
bundleVersion: 2.4.1
bundleVersion: 2.5.0
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0
Expand Down

0 comments on commit 98f4bba

Please sign in to comment.