Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
frostebite committed Nov 18, 2023
2 parents 4b07216 + 8da77ac commit df4cc41
Show file tree
Hide file tree
Showing 70 changed files with 98,979 additions and 75,707 deletions.
60 changes: 50 additions & 10 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
{
"plugins": ["jest", "@typescript-eslint", "prettier", "unicorn"],
"extends": ["plugin:unicorn/recommended", "plugin:github/recommended", "plugin:prettier/recommended"],
"plugins": [
"jest",
"@typescript-eslint",
"prettier",
"unicorn"
],
"extends": [
"plugin:unicorn/recommended",
"plugin:github/recommended",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"extraFileExtensions": [".mjs"],
"extraFileExtensions": [
".mjs"
],
"ecmaFeatures": {
"impliedStrict": true
},
Expand All @@ -22,7 +33,10 @@
// Namespaces or sometimes needed
"import/no-namespace": "off",
// Properly format comments
"spaced-comment": ["error", "always"],
"spaced-comment": [
"error",
"always"
],
"lines-around-comment": [
"error",
{
Expand All @@ -38,23 +52,49 @@
// Mandatory spacing
"padding-line-between-statements": [
"error",
{ "blankLine": "always", "prev": "*", "next": "return" },
{ "blankLine": "always", "prev": "directive", "next": "*" },
{ "blankLine": "any", "prev": "directive", "next": "directive" }
{
"blankLine": "always",
"prev": "*",
"next": "return"
},
{
"blankLine": "always",
"prev": "directive",
"next": "*"
},
{
"blankLine": "any",
"prev": "directive",
"next": "directive"
}
],
// Enforce camelCase
"camelcase": "error",
// Allow forOfStatements
"no-restricted-syntax": ["error", "ForInStatement", "LabeledStatement", "WithStatement"],
"no-restricted-syntax": [
"error",
"ForInStatement",
"LabeledStatement",
"WithStatement"
],
// Continue is viable in forOf loops in generators
"no-continue": "off",
// From experience, named exports are almost always desired. I got tired of this rule
"import/prefer-default-export": "off",
// Unused vars are useful to keep method signatures consistent and documented
"@typescript-eslint/no-unused-vars": "off",
// For this project only use kebab-case
"unicorn/filename-case": ["error", { "cases": { "kebabCase": true } }],
"unicorn/filename-case": [
"error",
{
"cases": {
"kebabCase": true
}
}
],
// Allow Array.from(set) mitigate TS2569 which would require '--downlevelIteration'
"unicorn/prefer-spread": "off"
"unicorn/prefer-spread": "off",
// Temp disable to prevent mixing changes with other PRs
"i18n-text/no-en": "off"
}
}
12 changes: 12 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

- ...

#### Related Issues

- ...

#### Related PRs

- ...

#### Successful Workflow Run Link

- ...

#### Checklist

<!-- please check all items and add your own -->
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/activation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
id: requestActivationFile
uses: game-ci/unity-request-activation-file@v2.0-alpha-1
- name: Upload activation file
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ${{ steps.requestActivationFile.outputs.filePath }}
path: ${{ steps.requestActivationFile.outputs.filePath }}
Expand Down
19 changes: 6 additions & 13 deletions .github/workflows/build-tests-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ name: Builds - MacOS
on:
workflow_dispatch:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
buildForAllPlatformsWindows:
buildForAllPlatformsMacOS:
name: ${{ matrix.targetPlatform }} on ${{ matrix.unityVersion }}
runs-on: macos-latest
strategy:
Expand All @@ -20,23 +18,18 @@ jobs:
projectPath:
- test-project
unityVersion:
- 2019.4.40f1 # Minimum version for IL2CPP
- 2020.1.17f1
- 2020.2.7f1
- 2020.3.44f1
- 2021.1.28f1
- 2021.2.19f1
- 2021.3.18f1
- 2022.1.24f1
- 2022.2.6f1
- 2021.3.32f1
- 2022.3.13f1
- 2023.1.19f1
targetPlatform:
- StandaloneOSX # Build a MacOS executable
- iOS # Build an iOS executable

steps:
###########################
# Checkout #
###########################
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: true

Expand Down
81 changes: 52 additions & 29 deletions .github/workflows/build-tests-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ name: Builds - Ubuntu
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
paths-ignore:
- '.github/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down Expand Up @@ -46,46 +41,27 @@ jobs:
strategy:
fail-fast: false
matrix:
exclude:
- targetPlatform: Android
unityVersion: 2022.2.7f1
providerStrategy:
# - local-docker
- local
projectPath:
- test-project
unityVersion:
- 2018.3.14f1
- 2018.4.36f1
- 2019.1.14f1
- 2019.2.21f1
- 2019.3.15f1
- 2019.4.40f1
- 2020.2.7f1
- 2020.3.45f1
- 2021.1.28f1
- 2021.2.19f1
- 2021.3.19f1
- 2022.1.24f1
- 2022.2.7f1
- 2021.3.32f1
- 2022.3.13f1
- 2023.1.19f1
targetPlatform:
- StandaloneOSX # Build a macOS standalone (Intel 64-bit) with mono backend.
- StandaloneWindows64 # Build a Windows 64-bit standalone with mono backend.
- StandaloneLinux64 # Build a Linux 64-bit standalone with mono backend.
- iOS # Build an iOS player.
- Android # Build an Android .apk.
- WebGL # WebGL.
# - StandaloneWindows # Build a Windows standalone.
# - WSAPlayer # Build an Windows Store Apps player.
# - PS4 # Build a PS4 Standalone.
# - XboxOne # Build a Xbox One Standalone.
# - tvOS # Build to Apple's tvOS platform.
# - Switch # Build a Nintendo Switch player
steps:
###########################
# Checkout #
###########################
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: true

Expand All @@ -103,14 +79,61 @@ jobs:
###########################
# Build #
###########################
- uses: ./
- name: Build
uses: ./
id: build-1
continue-on-error: true
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
targetPlatform: ${{ matrix.targetPlatform }}
customParameters: -profile SomeProfile -someBoolean -someValue exampleValue
providerStrategy: ${{ matrix.providerStrategy }}

- name: Sleep for Retry
if: ${{ steps.build-1.outcome == 'failure' }}
run: |
sleep 60
- name: Build (Retry 1)
uses: ./
id: build-2
if: ${{ steps.build-1.outcome == 'failure' }}
continue-on-error: true
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
targetPlatform: ${{ matrix.targetPlatform }}
customParameters: -profile SomeProfile -someBoolean -someValue exampleValue
providerStrategy: ${{ matrix.providerStrategy }}
allowDirtyBuild: true

- name: Sleep for Retry
if: ${{ steps.build-2.outcome == 'failure' }}
run: |
sleep 240
- name: Build (Retry 2)
uses: ./
id: build-3
if: ${{ steps.build-2.outcome == 'failure' }}
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
targetPlatform: ${{ matrix.targetPlatform }}
customParameters: -profile SomeProfile -someBoolean -someValue exampleValue
providerStrategy: ${{ matrix.providerStrategy }}
allowDirtyBuild: true

###########################
# Upload #
###########################
Expand Down
19 changes: 6 additions & 13 deletions .github/workflows/build-tests-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: Builds - Windows
on:
workflow_dispatch:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -13,32 +11,27 @@ concurrency:
jobs:
buildForAllPlatformsWindows:
name: ${{ matrix.targetPlatform }} on ${{ matrix.unityVersion }}
runs-on: windows-2019
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
projectPath:
- test-project
unityVersion:
- 2019.3.15f1 # Minimum version for IL2CPP
- 2019.4.40f1
- 2020.1.17f1
- 2020.2.7f1
- 2020.3.44f1
- 2021.3.18f1 # 2021.1 and 2021.2 seem to have IL2CPP issues
- 2022.1.24f1
- 2022.2.6f1
- 2021.3.32f1
- 2022.3.13f1
- 2023.1.19f1
targetPlatform:
- Android # Build an Android apk.
- StandaloneWindows64 # Build a Windows 64-bit standalone.
- StandaloneWindows # Build a Windows 32-bit standalone.
- WSAPlayer # Build a UWP App
- tvOS # Build an Apple TV XCode project

steps:
###########################
# Checkout #
###########################
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: true

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:
cleanupCloudRunner:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
if: github.event.event_type != 'pull_request_target'
with:
lfs: true
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: '18'
- run: yarn
- run: yarn run cli --help
env:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/cloud-runner-ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- 'cloud-runner-locking-get-locked'
steps:
- name: Checkout (default)
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
lfs: false
- run: yarn
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
- 'cloud-runner-remote-client'
steps:
- name: Checkout (default)
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
lfs: false
- name: Configure AWS Credentials
Expand Down Expand Up @@ -201,7 +201,7 @@ jobs:
- Android # Build an Android .apk.
steps:
- name: Checkout (default)
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
lfs: false
- run: yarn
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/integrity-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '18'
- run: yarn
- run: yarn lint
- run: yarn test --coverage
Expand Down
Loading

0 comments on commit df4cc41

Please sign in to comment.