From dc45248a1aa89979e482c6d05cfac54dc811c542 Mon Sep 17 00:00:00 2001 From: Andrew Kahr <22359829+AndrewKahr@users.noreply.github.com> Date: Sat, 28 Oct 2023 15:48:27 -0700 Subject: [PATCH] Update workflows, bump image version for docker --- .github/pull_request_template.md | 12 +++++-- .github/workflows/activation.yml | 2 +- .github/workflows/build-tests-mac.yml | 12 +++---- .github/workflows/build-tests-ubuntu.yml | 16 +++------ .github/workflows/build-tests-windows.yml | 13 ++++--- .github/workflows/cleanup.yml | 4 +-- .../workflows/cloud-runner-ci-pipeline.yml | 6 ++-- .github/workflows/integrity-check.yml | 4 +-- dist/index.js | Bin 22172464 -> 22172464 bytes dist/index.js.map | Bin 14641999 -> 14641999 bytes src/model/image-tag.test.ts | 33 ++++++++++++------ src/model/image-tag.ts | 8 +++-- 12 files changed, 61 insertions(+), 49 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index d7aa5408..9eb8d367 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -2,13 +2,21 @@ - ... +#### Related Issues + +- ... + +#### Related PRs + +- ... + #### Checklist - [x] Read the contribution [guide](https://github.com/game-ci/unity-builder/blob/main/CONTRIBUTING.md) and accept the [code](https://github.com/game-ci/unity-builder/blob/main/CODE_OF_CONDUCT.md) of conduct -- [ ] Docs (If new inputs or outputs have been added or changes to behavior that should be documented. Please make - a PR in the [documentation repo](https://github.com/game-ci/documentation)) +- [ ] Docs (If new inputs or outputs have been added or changes to behavior that should be documented. Please make a PR + in the [documentation repo](https://github.com/game-ci/documentation)) - [ ] Readme (updated or not needed) - [ ] Tests (added, updated or not needed) diff --git a/.github/workflows/activation.yml b/.github/workflows/activation.yml index 7299db23..2ceef255 100644 --- a/.github/workflows/activation.yml +++ b/.github/workflows/activation.yml @@ -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 }} diff --git a/.github/workflows/build-tests-mac.yml b/.github/workflows/build-tests-mac.yml index b3e1cf4d..860fb1ea 100644 --- a/.github/workflows/build-tests-mac.yml +++ b/.github/workflows/build-tests-mac.yml @@ -11,7 +11,7 @@ concurrency: cancel-in-progress: true jobs: - buildForAllPlatformsWindows: + buildForAllPlatformsMacOS: name: ${{ matrix.targetPlatform }} on ${{ matrix.unityVersion }} runs-on: macos-latest strategy: @@ -20,11 +20,9 @@ jobs: projectPath: - test-project unityVersion: - - 2021.3.29f1 - - 2022.1.24f1 - - 2022.2.21f1 - - 2022.3.7f1 - - 2023.1.8f1 + - 2021.3.31f1 + - 2022.3.11f1 + - 2023.1.17f1 targetPlatform: - StandaloneOSX # Build a MacOS executable @@ -32,7 +30,7 @@ jobs: ########################### # Checkout # ########################### - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: lfs: true diff --git a/.github/workflows/build-tests-ubuntu.yml b/.github/workflows/build-tests-ubuntu.yml index 265126cf..60ddfdcf 100644 --- a/.github/workflows/build-tests-ubuntu.yml +++ b/.github/workflows/build-tests-ubuntu.yml @@ -52,11 +52,9 @@ jobs: projectPath: - test-project unityVersion: - - 2021.3.29f1 - - 2022.1.24f1 - - 2022.2.21f1 - - 2022.3.7f1 - - 2023.1.8f1 + - 2021.3.31f1 + - 2022.3.11f1 + - 2023.1.17f1 targetPlatform: - StandaloneOSX # Build a macOS standalone (Intel 64-bit) with mono backend. - StandaloneWindows64 # Build a Windows 64-bit standalone with mono backend. @@ -64,17 +62,11 @@ jobs: - 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 diff --git a/.github/workflows/build-tests-windows.yml b/.github/workflows/build-tests-windows.yml index 02dae84b..8c0e6e3c 100644 --- a/.github/workflows/build-tests-windows.yml +++ b/.github/workflows/build-tests-windows.yml @@ -13,19 +13,18 @@ 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: - - 2021.3.29f1 - - 2022.1.24f1 - - 2022.2.21f1 - - 2022.3.7f1 - - 2023.1.8f1 + - 2021.3.31f1 + - 2022.3.11f1 + - 2023.1.17f1 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 @@ -35,7 +34,7 @@ jobs: ########################### # Checkout # ########################### - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: lfs: true diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml index 48f82d53..c62c2aee 100644 --- a/.github/workflows/cleanup.yml +++ b/.github/workflows/cleanup.yml @@ -15,11 +15,11 @@ 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: '18' - run: yarn diff --git a/.github/workflows/cloud-runner-ci-pipeline.yml b/.github/workflows/cloud-runner-ci-pipeline.yml index 4704defa..efe186b7 100644 --- a/.github/workflows/cloud-runner-ci-pipeline.yml +++ b/.github/workflows/cloud-runner-ci-pipeline.yml @@ -56,7 +56,7 @@ jobs: #- k8s steps: - name: Checkout (default) - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: lfs: false - name: Configure AWS Credentials @@ -116,7 +116,7 @@ jobs: #- 'cloud-runner-locking-get-locked' steps: - name: Checkout (default) - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: lfs: false - name: Configure AWS Credentials @@ -167,7 +167,7 @@ jobs: - Android # Build an Android .apk. steps: - name: Checkout (default) - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: lfs: false - run: yarn diff --git a/.github/workflows/integrity-check.yml b/.github/workflows/integrity-check.yml index 64e01b29..3c43650b 100644 --- a/.github/workflows/integrity-check.yml +++ b/.github/workflows/integrity-check.yml @@ -16,8 +16,8 @@ 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: '18' - run: yarn diff --git a/dist/index.js b/dist/index.js index b6f1c1bddce593d5fd09fdd2d6b3f44f48c29437..6003d75d1b23f3d720d0cbc13e0e12260182ce34 100644 GIT binary patch delta 1440 zcmWmEMN}0407TLAr9lJ?3>p+MKoKRS%K*gg7Q4GeMNv_)ySv5iPVDaP!fru*v$$_P ztI1lGZJCACG(%dxG^6dtxhV#}^t=>fn7|ZfFoy*!VTJs#MgiEs7Ir9zLMV(Put!l8 zLvfUV103N5XSl!>Zg7VON}?1zQ5s$-gR&@x^6-WaDxe~KQ3={#8CBqq00bfk!3aTB zgdz;#h(IKw5RDkbA`bDWhU%z+nn*w*l28lDsEsv=@tA-NOvEHiMkc0UDyCsNW?&{}VK(MqF6LoA7GNP3VKJ6qDVAY5R$wJo zVKvrZE!JT@Hee$*VKcI@1zWKV+pz;Xu?xGg2Yay(`*8pVaR`TT1V?cU$8iEDaSErA zjWallb2yI+xQI)*j4QZ`Yq*XZxQSc1jXSuDd$^AWc!)=Mj3;=CXLybmc!^hdjW>9U zcgVqee85M1!e@NJSA4^F{J>BA!f*URF7ogf|1$DY44F{!DMpI1VxpKTW{SCDp;#(b zN`A#!DWKRWwu+rnP${GoR*ES0N>QblQd}vaI4F*alj5wnD6Wc|;;wioC6!W&r&3z+ zQpzZ0m2ygX#ar=FDkv2dU!{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XLxE5*6bgkykx(?D z*q=yL&A60EF^W@yl9Zw}WhhHI%2R=gRH8Cfs7f`eQ-l9sEoxJTy40gS4QNOs8q~U?P*4%oL_Fjp@u_CbO8$9Og2Q`7B@|i&)GOmJ-V{ma~GuN>&laYSyrp zb*yIt8`;EWwy>3LY-a~M*~M=5u$O)8=Ku#e#9@wblw%y{1SdJgY0hw#bDZY_7m4Q* zm$|}K61c{761l-mZV}-&ceu+v?(=|$JmN7=c*--L^MaSW;x%u0OA_yR&j&v8iO(eS Tg|B?$J3sizuf&wd@0j?1bP*&5 diff --git a/src/model/image-tag.test.ts b/src/model/image-tag.test.ts index a80fe6bb..77934e5d 100644 --- a/src/model/image-tag.test.ts +++ b/src/model/image-tag.test.ts @@ -30,7 +30,11 @@ describe('ImageTag', () => { test.each(['2000.0.0f0', '2011.1.11f1'])('accepts %p version format', (version) => { expect( - () => new ImageTag({ editorVersion: version, targetPlatform: testImageParameters.targetPlatform }), + () => + new ImageTag({ + editorVersion: version, + targetPlatform: testImageParameters.targetPlatform, + }), ).not.toThrow(); }); @@ -46,13 +50,16 @@ describe('ImageTag', () => { describe('toString', () => { it('returns the correct version', () => { - const image = new ImageTag({ editorVersion: '2099.1.1111', targetPlatform: testImageParameters.targetPlatform }); + const image = new ImageTag({ + editorVersion: '2099.1.1111', + targetPlatform: testImageParameters.targetPlatform, + }); switch (process.platform) { case 'win32': - expect(image.toString()).toStrictEqual(`${defaults.image}:windows-2099.1.1111-2`); + expect(image.toString()).toStrictEqual(`${defaults.image}:windows-2099.1.1111-3`); break; case 'linux': - expect(image.toString()).toStrictEqual(`${defaults.image}:ubuntu-2099.1.1111-2`); + expect(image.toString()).toStrictEqual(`${defaults.image}:ubuntu-2099.1.1111-3`); break; } }); @@ -67,27 +74,33 @@ describe('ImageTag', () => { }); it('returns the specific build platform', () => { - const image = new ImageTag({ editorVersion: '2019.2.11f1', targetPlatform: 'WebGL' }); + const image = new ImageTag({ + editorVersion: '2019.2.11f1', + targetPlatform: 'WebGL', + }); switch (process.platform) { case 'win32': - expect(image.toString()).toStrictEqual(`${defaults.image}:windows-2019.2.11f1-webgl-2`); + expect(image.toString()).toStrictEqual(`${defaults.image}:windows-2019.2.11f1-webgl-3`); break; case 'linux': - expect(image.toString()).toStrictEqual(`${defaults.image}:ubuntu-2019.2.11f1-webgl-2`); + expect(image.toString()).toStrictEqual(`${defaults.image}:ubuntu-2019.2.11f1-webgl-3`); break; } }); it('returns no specific build platform for generic targetPlatforms', () => { - const image = new ImageTag({ editorVersion: '2019.2.11f1', targetPlatform: 'NoTarget' }); + const image = new ImageTag({ + editorVersion: '2019.2.11f1', + targetPlatform: 'NoTarget', + }); switch (process.platform) { case 'win32': - expect(image.toString()).toStrictEqual(`${defaults.image}:windows-2019.2.11f1-2`); + expect(image.toString()).toStrictEqual(`${defaults.image}:windows-2019.2.11f1-3`); break; case 'linux': - expect(image.toString()).toStrictEqual(`${defaults.image}:ubuntu-2019.2.11f1-2`); + expect(image.toString()).toStrictEqual(`${defaults.image}:ubuntu-2019.2.11f1-3`); break; } }); diff --git a/src/model/image-tag.ts b/src/model/image-tag.ts index 693b84b7..35b4bbeb 100644 --- a/src/model/image-tag.ts +++ b/src/model/image-tag.ts @@ -33,7 +33,7 @@ class ImageTag { this.imagePlatformPrefix = ImageTag.getImagePlatformPrefixes( isCloudRunnerLocal ? process.platform : cloudRunnerBuilderPlatform, ); - this.imageRollingVersion = 2; // Will automatically roll to the latest non-breaking version. + this.imageRollingVersion = 3; // Will automatically roll to the latest non-breaking version. } static get versionPattern(): RegExp { @@ -86,8 +86,10 @@ class ImageTag { if (major >= 2020 || (major === 2019 && minor >= 3)) { return windowsIl2cpp; } else { - throw new Error(`Windows-based builds are only supported on 2019.3.X+ versions of Unity. - If you are trying to build for windows-mono, please use a Linux based OS.`); + throw new Error( + `Windows-based builds are only supported on 2019.3.X+ versions of Unity. + If you are trying to build for windows-mono, please use a Linux based OS.`, + ); } }