Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert runtime from NodeJS to Deno (TS as runtime) #413

Closed
wants to merge 42 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
8966e49
chore: rewrite imports to deno style
webbertakken Jun 7, 2022
b624078
chore: rewrite more imports to deno style
webbertakken Jun 8, 2022
f360ad6
chore: rewrite core and exec imports to deno style
webbertakken Jun 8, 2022
8346abf
chore: internalise waitUntil
webbertakken Jun 23, 2022
bee47ea
chore: fix imports
webbertakken Jun 23, 2022
3c0dd0f
chore: disable audit and build step
webbertakken Jun 23, 2022
f2868f8
chore: fix formatting
webbertakken Jun 23, 2022
931dff7
chore: load input from user and yaml
webbertakken Jun 23, 2022
9772480
chore: reinstate exec signature
webbertakken Jun 23, 2022
5242e7e
chore: use ported unity-changeset (deno) package
webbertakken Jun 27, 2022
0440a33
chore: add global logger
webbertakken Aug 6, 2022
38285d0
chore: convert core logger to global logger
webbertakken Aug 6, 2022
4d8b198
chore: oneliner output for command debug logs
webbertakken Aug 6, 2022
45b043c
chore: fix all linting issues with updated linting configs
webbertakken Aug 6, 2022
6ac9e78
fix: broken run command that was reading from input buffer
webbertakken Aug 7, 2022
5bb32a6
feat: introduce deno cli entrypoint
webbertakken Aug 7, 2022
cd31281
chore: make Versioning.branch compatible with local
webbertakken Aug 9, 2022
18af761
feat: per-command parameters parsing
webbertakken Aug 12, 2022
cae5ffa
feat: engine-specific commands and better organised environment
webbertakken Aug 13, 2022
a0372d1
feat: add verbosity and split parameters per command
webbertakken Aug 20, 2022
649a0ca
chore: upgrade test project to 2019.4 for local testability on windows
webbertakken Aug 20, 2022
16c4948
feat: add String.dedent polyfill
webbertakken Aug 20, 2022
0379bce
chore: debug build process for windows
webbertakken Aug 20, 2022
2574cad
chore: sanitise more parameters
webbertakken Aug 20, 2022
bee44a3
Merge branch 'main' into deno-as-runtime
webbertakken Aug 20, 2022
52f57c5
feat: create .game-ci folder in user folder.
webbertakken Aug 21, 2022
f4f7aba
fix: missing setOutput and simplify os setup
webbertakken Aug 21, 2022
bd30a3c
chore: remove all previous run/exec commands in favour of one cleaned…
webbertakken Aug 21, 2022
bfb847d
chore: wrap up single run command
webbertakken Aug 21, 2022
fa479f5
feat: cleanup parameters part 1/*
webbertakken Aug 23, 2022
48598c1
chore: cleanup parameters part 2/*
webbertakken Aug 23, 2022
bb844bc
refactor: folder structure in preparation of command based cli
webbertakken Aug 27, 2022
6b32132
feat: introduce yargs architecture
webbertakken Aug 27, 2022
ccf0047
refactor: parameters into cli structure
webbertakken Aug 29, 2022
4cf1810
refactor: vcs detector over branch detector
webbertakken Aug 29, 2022
6e4ce26
feat: add run configuration
webbertakken Aug 31, 2022
44eb07a
feat: log to config folder
webbertakken Aug 31, 2022
d915ae2
feat: much better error handling
webbertakken Aug 31, 2022
56d0646
feat: setup deno testing and coverage
webbertakken Aug 31, 2022
ffc5104
feat: cross platform coverage (dependent on perl)
webbertakken Aug 31, 2022
0ac9b80
chore: lock version for tool script
webbertakken Aug 31, 2022
f188ecf
feat: add "config open" command
webbertakken Sep 1, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
"es6": true,
"jest/globals": true
},
"globals": {
"Deno": true,
"log": true,
"window": true
},
"rules": {
// Error out for code formatting errors
"prettier/prettier": "error",
Expand Down Expand Up @@ -50,11 +55,34 @@
"no-continue": "off",
// From experience, named exports are almost always desired. I got tired of this rule
"import/prefer-default-export": "off",
// Disable in favour of TS equivalent
"no-unused-vars": "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 } }],
"filenames/match-regex": ["error", "^[a-z-]+(\\.(d|integration|test|setup))*$"],
// Allow Array.from(set) mitigate TS2569 which would require '--downlevelIteration'
"unicorn/prefer-spread": "off"
"unicorn/prefer-spread": "off",
// Deno has dependencies file, this rule enforces it's named re-exports
"unicorn/prevent-abbreviations": "off",
// Allow disabling eslint per file
"eslint-comments/no-use": "off",
// Deno import style not supported (enable after upgrading)
"import/extensions": "off",
// Deno import style not supported (enable after upgrading)
"import/no-unresolved": "off",
// App it not yet internationalised
"i18n-text/no-en": "off",
// Showing false positives (enable after upgrading)
"no-shadow": "off",
// (enable to add improvements)
"unicorn/no-static-only-class": "off",
// Null is useful when explicit value is passed
"unicorn/no-null": "off",
// (enable to add improvements)
"unicorn/prefer-export-from": "off",
// Deno uses const a=new Buffer(new TextEncoder().encode('Hello World'));
"unicorn/no-new-buffer": "off"
}
}
4 changes: 1 addition & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ assignees: ''

<!--Steps to reproduce the behavior:-->

-

**Expected behavior**
- **Expected behavior**

<!--A clear and concise description of what you expected to happen.-->

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ env:

jobs:
buildForAllPlatformsUbuntu:
name: Build for ${{ matrix.targetPlatform }} on version ${{ matrix.unityVersion }}
name: Build for ${{ matrix.targetPlatform }} on version ${{ matrix.engineVersion }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
projectPath:
- test-project
unityVersion:
engineVersion:
- 2019.2.11f1
- 2019.3.15f1
targetPlatform:
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
- uses: ./
with:
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
engineVersion: ${{ matrix.engineVersion }}
targetPlatform: ${{ matrix.targetPlatform }}
customParameters: -profile SomeProfile -someBoolean -someValue exampleValue

Expand All @@ -68,6 +68,6 @@ jobs:
###########################
- uses: actions/upload-artifact@v2
with:
name: Build Ubuntu (${{ matrix.unityVersion }})
name: Build Ubuntu (${{ matrix.engineVersion }})
path: build
retention-days: 14
12 changes: 6 additions & 6 deletions .github/workflows/cloud-runner-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
matrix:
projectPath:
- test-project
unityVersion:
engineVersion:
# - 2019.2.11f1
- 2019.3.15f1
targetPlatform:
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
cloudRunnerCluster: aws
versioning: None
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
engineVersion: ${{ matrix.engineVersion }}
targetPlatform: ${{ matrix.targetPlatform }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
postBuildSteps: |
Expand Down Expand Up @@ -118,12 +118,12 @@ jobs:
path: build-${{ steps.aws-fargate-unity-build.outputs.BUILD_GUID }}.tar
retention-days: 14
k8sBuilds:
name: K8s (GKE Autopilot) build for ${{ matrix.targetPlatform }} on version ${{ matrix.unityVersion }}
name: K8s (GKE Autopilot) build for ${{ matrix.targetPlatform }} on version ${{ matrix.engineVersion }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
unityVersion:
engineVersion:
# - 2019.2.11f1
- 2019.3.15f1
targetPlatform:
Expand Down Expand Up @@ -166,7 +166,7 @@ jobs:
TARGET_PLATFORM: ${{ matrix.targetPlatform }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
KUBE_CONFIG: ${{ steps.read-base64.outputs.base64 }}
unityVersion: ${{ matrix.unityVersion }}
engineVersion: ${{ matrix.engineVersion }}
cloudRunnerTests: true
versioning: None

Expand All @@ -184,7 +184,7 @@ jobs:
kubeConfig: ${{ steps.read-base64.outputs.base64 }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
projectPath: test-project
unityVersion: ${{ matrix.unityVersion }}
engineVersion: ${{ matrix.engineVersion }}
versioning: None
postBuildSteps: |
- name: upload
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/mac-build-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ env:

jobs:
buildForAllPlatformsWindows:
name: Build for ${{ matrix.targetPlatform }} on version ${{ matrix.unityVersion }}
name: Build for ${{ matrix.targetPlatform }} on version ${{ matrix.engineVersion }}
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
projectPath:
- test-project
unityVersion:
engineVersion:
- 2020.3.24f1
targetPlatform:
- StandaloneOSX # Build a MacOS executable
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
with:
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
engineVersion: ${{ matrix.engineVersion }}
targetPlatform: ${{ matrix.targetPlatform }}
customParameters: -profile SomeProfile -someBoolean -someValue exampleValue
# We use dirty build because we are replacing the default project settings file above
Expand All @@ -69,6 +69,6 @@ jobs:
###########################
- uses: actions/upload-artifact@v2
with:
name: Build MacOS (${{ matrix.unityVersion }})
name: Build MacOS (${{ matrix.engineVersion }})
path: build
retention-days: 14
8 changes: 4 additions & 4 deletions .github/workflows/windows-build-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ env:

jobs:
buildForAllPlatformsWindows:
name: Build for ${{ matrix.targetPlatform }} on version ${{ matrix.unityVersion }}
name: Build for ${{ matrix.targetPlatform }} on version ${{ matrix.engineVersion }}
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
projectPath:
- test-project
unityVersion:
engineVersion:
- 2020.3.24f1
targetPlatform:
- StandaloneWindows64 # Build a Windows 64-bit standalone.
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
with:
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
engineVersion: ${{ matrix.engineVersion }}
targetPlatform: ${{ matrix.targetPlatform }}
customParameters: -profile SomeProfile -someBoolean -someValue exampleValue
allowDirtyBuild: true
Expand All @@ -72,6 +72,6 @@ jobs:
###########################
- uses: actions/upload-artifact@v2
with:
name: Build Windows (${{ matrix.unityVersion }})
name: Build Windows (${{ matrix.engineVersion }})
path: build
retention-days: 14
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
.idea
node_modules
coverage/
.coverage/
lib/
.vsconfig
yarn-error.log
.orig
*.log
logs/*
!**/.gitkeep
.env*
!.env*.dist
6 changes: 6 additions & 0 deletions .run/GameCI build ._test-project.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="GameCI build ./test-project" type="DenoConfigurationType" inputPath="$PROJECT_DIR$/src/index.ts" programParameters=" run --allow-all" workingDirectory="$PROJECT_DIR$/src">
<option name="applicationArguments" value="build ../test-project" />
<method v="2" />
</configuration>
</component>
7 changes: 7 additions & 0 deletions .run/Reamde.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# .run

This folder contains development script for the project.

WebStorm allows running it directly from the IDE.

<img src="./example-run-interface.png" alt="Webstorm interface example with play button"/>
Binary file added .run/example-run-interface.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading