From 1026292a67e32c3728419642d17059e26c0d629b Mon Sep 17 00:00:00 2001 From: John Murwin Date: Sat, 20 Nov 2021 13:21:35 -0500 Subject: [PATCH 01/15] New CI step for automated build tests --- .github/workflows/CI.yml | 43 +++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 743a235..cf2cf01 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -145,24 +145,35 @@ jobs: BuildProject: needs: TestProject - name: Build for 'matrix.platform' + name: Build for ${{ matrix.targetPlatform }} runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + targetPlatform: + - StandaloneOSX # Build a macOS standalone (Intel 64-bit). + - StandaloneWindows64 # Build a Windows 64-bit standalone. + - StandaloneLinux64 # Build a Linux 64-bit standalone. + - WebGL # WebGL. steps: - - name: Build- test status message - run: | - echo here is where we build the project - - UploadProject: - needs: BuildProject - name: Upload for 'matrix.platform' - runs-on: ubuntu-latest + # First we checkout the project with LFS support (don't need fetch depth here) + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + lfs: true - steps: - - name: Tag Build Version - run: | - echo here is where we tag and release a version for the build + # Cache library for future speed for Analysis + - uses: actions/cache@v2 + with: + path: Library + key: Library-${{ matrix.targetPlatform }} + restore-keys: Library- - - name: Upload- test status message - run: | - echo here is where we upload the dev-build of the project \ No newline at end of file + # Then use GameCI to build the project on the Matrix TargetPlatform from above (here we are just testing that each TargetPlatform actually builds as a metric of the CI process, so dont need to upload) + - uses: game-ci/unity-builder@v2 + env: + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + with: + targetPlatform: ${{ matrix.targetPlatform }} + versioning: Semantic \ No newline at end of file From 9882b40a99c14adc6a432acdc9d30223d77d3d98 Mon Sep 17 00:00:00 2001 From: John Murwin Date: Sat, 20 Nov 2021 13:32:12 -0500 Subject: [PATCH 02/15] Potential fix for new Build step syntax issue --- .github/workflows/CI.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index cf2cf01..3569779 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -157,23 +157,24 @@ jobs: - WebGL # WebGL. steps: - # First we checkout the project with LFS support (don't need fetch depth here) - uses: actions/checkout@v2 with: fetch-depth: 0 lfs: true - # Cache library for future speed for Analysis - uses: actions/cache@v2 with: path: Library key: Library-${{ matrix.targetPlatform }} restore-keys: Library- - # Then use GameCI to build the project on the Matrix TargetPlatform from above (here we are just testing that each TargetPlatform actually builds as a metric of the CI process, so dont need to upload) - uses: game-ci/unity-builder@v2 env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} with: targetPlatform: ${{ matrix.targetPlatform }} - versioning: Semantic \ No newline at end of file + + - uses: actions/upload-artifact@v2 + with: + name: Build-${{ matrix.targetPlatform }} + path: build/${{ matrix.targetPlatform }} \ No newline at end of file From 64f7ccc6a16f4fd64f1b6f0c8dbb8945ca7e9e98 Mon Sep 17 00:00:00 2001 From: John Murwin Date: Sat, 20 Nov 2021 13:33:02 -0500 Subject: [PATCH 03/15] Really not sure why this is failing --- .github/workflows/CI.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3569779..59470b9 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -161,19 +161,16 @@ jobs: with: fetch-depth: 0 lfs: true - - uses: actions/cache@v2 with: path: Library key: Library-${{ matrix.targetPlatform }} restore-keys: Library- - - uses: game-ci/unity-builder@v2 env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} with: targetPlatform: ${{ matrix.targetPlatform }} - - uses: actions/upload-artifact@v2 with: name: Build-${{ matrix.targetPlatform }} From d892a62c1a50c91186d47397848a73fd205622d3 Mon Sep 17 00:00:00 2001 From: John Murwin Date: Sat, 20 Nov 2021 13:42:55 -0500 Subject: [PATCH 04/15] Minor updates for syntax --- .github/workflows/CI.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 59470b9..906b664 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -155,13 +155,14 @@ jobs: - StandaloneWindows64 # Build a Windows 64-bit standalone. - StandaloneLinux64 # Build a Linux 64-bit standalone. - WebGL # WebGL. - steps: - - uses: actions/checkout@v2 + - name: Checkout Repo + uses: actions/checkout@v2 with: fetch-depth: 0 lfs: true - - uses: actions/cache@v2 + - name: Cache Project Library for next Build + uses: actions/cache@v2 with: path: Library key: Library-${{ matrix.targetPlatform }} @@ -171,7 +172,4 @@ jobs: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} with: targetPlatform: ${{ matrix.targetPlatform }} - - uses: actions/upload-artifact@v2 - with: - name: Build-${{ matrix.targetPlatform }} - path: build/${{ matrix.targetPlatform }} \ No newline at end of file + versioning: Semantic From 4717264dacc295cfed0caa5e559c2d589cba10e3 Mon Sep 17 00:00:00 2001 From: John Murwin Date: Sat, 20 Nov 2021 13:47:41 -0500 Subject: [PATCH 05/15] Automated Builds Action --- .github/workflows/Builds | 46 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/Builds diff --git a/.github/workflows/Builds b/.github/workflows/Builds new file mode 100644 index 0000000..0583780 --- /dev/null +++ b/.github/workflows/Builds @@ -0,0 +1,46 @@ +# Automated Build Pipeline +# Uses: GameCI, +# From: GameCI, and Fathom7 + +name: Automated Builds +on: + push: + branches: + - main + paths-ignore: + - 'docs/**' + - '*.md' + pull_request: + types: [opened, synchronize, reopened, edited] + +jobs: + +BuildProject: + name: Build for ${{ matrix.targetPlatform }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + targetPlatform: + - StandaloneOSX # Build a macOS standalone (Intel 64-bit). + - StandaloneWindows64 # Build a Windows 64-bit standalone. + - StandaloneLinux64 # Build a Linux 64-bit standalone. + - WebGL # WebGL. + steps: + - name: Checkout Repo + uses: actions/checkout@v2 + with: + fetch-depth: 0 + lfs: true + - name: Cache Project Library for next Build + uses: actions/cache@v2 + with: + path: Library + key: Library-${{ matrix.targetPlatform }} + restore-keys: Library- + - uses: game-ci/unity-builder@v2 + env: + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + with: + targetPlatform: ${{ matrix.targetPlatform }} + versioning: Semantic \ No newline at end of file From e8c514ae6af80989b958adaf4b5ae81c76f9b93c Mon Sep 17 00:00:00 2001 From: John Murwin Date: Sat, 20 Nov 2021 13:48:39 -0500 Subject: [PATCH 06/15] Removal of Build Step for CI Action --- .github/workflows/CI.yml | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 906b664..9efe5de 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -140,36 +140,3 @@ jobs: with: name: Test results for ${{ matrix.testMode }} path: ${{ steps.tests.outputs.artifactsPath }} - - - - BuildProject: - needs: TestProject - name: Build for ${{ matrix.targetPlatform }} - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - targetPlatform: - - StandaloneOSX # Build a macOS standalone (Intel 64-bit). - - StandaloneWindows64 # Build a Windows 64-bit standalone. - - StandaloneLinux64 # Build a Linux 64-bit standalone. - - WebGL # WebGL. - steps: - - name: Checkout Repo - uses: actions/checkout@v2 - with: - fetch-depth: 0 - lfs: true - - name: Cache Project Library for next Build - uses: actions/cache@v2 - with: - path: Library - key: Library-${{ matrix.targetPlatform }} - restore-keys: Library- - - uses: game-ci/unity-builder@v2 - env: - UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} - with: - targetPlatform: ${{ matrix.targetPlatform }} - versioning: Semantic From 19b87ae1a633a5886c105f4f770020482ef99a3c Mon Sep 17 00:00:00 2001 From: John Murwin Date: Sat, 20 Nov 2021 13:50:49 -0500 Subject: [PATCH 07/15] Syntax update for Build Action --- .github/workflows/Builds | 59 ++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/.github/workflows/Builds b/.github/workflows/Builds index 0583780..d42c515 100644 --- a/.github/workflows/Builds +++ b/.github/workflows/Builds @@ -14,33 +14,32 @@ on: types: [opened, synchronize, reopened, edited] jobs: - -BuildProject: - name: Build for ${{ matrix.targetPlatform }} - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - targetPlatform: - - StandaloneOSX # Build a macOS standalone (Intel 64-bit). - - StandaloneWindows64 # Build a Windows 64-bit standalone. - - StandaloneLinux64 # Build a Linux 64-bit standalone. - - WebGL # WebGL. - steps: - - name: Checkout Repo - uses: actions/checkout@v2 - with: - fetch-depth: 0 - lfs: true - - name: Cache Project Library for next Build - uses: actions/cache@v2 - with: - path: Library - key: Library-${{ matrix.targetPlatform }} - restore-keys: Library- - - uses: game-ci/unity-builder@v2 - env: - UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} - with: - targetPlatform: ${{ matrix.targetPlatform }} - versioning: Semantic \ No newline at end of file + BuildProject: + name: Build for ${{ matrix.targetPlatform }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + targetPlatform: + - StandaloneOSX # Build a macOS standalone (Intel 64-bit). + - StandaloneWindows64 # Build a Windows 64-bit standalone. + - StandaloneLinux64 # Build a Linux 64-bit standalone. + - WebGL # WebGL. + steps: + - name: Checkout Repo + uses: actions/checkout@v2 + with: + fetch-depth: 0 + lfs: true + - name: Cache Project Library for next Build + uses: actions/cache@v2 + with: + path: Library + key: Library-${{ matrix.targetPlatform }} + restore-keys: Library- + - uses: game-ci/unity-builder@v2 + env: + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + with: + targetPlatform: ${{ matrix.targetPlatform }} + versioning: Semantic \ No newline at end of file From 957484d44ede13dd2a9af0e533907d81607e7b32 Mon Sep 17 00:00:00 2001 From: John Murwin Date: Sat, 20 Nov 2021 13:52:24 -0500 Subject: [PATCH 08/15] Fix for bad filename for workflow action --- .github/workflows/{Builds => Builds.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{Builds => Builds.yml} (100%) diff --git a/.github/workflows/Builds b/.github/workflows/Builds.yml similarity index 100% rename from .github/workflows/Builds rename to .github/workflows/Builds.yml From 1a7b2932b5afeee1cd017404d29d2626951f02b4 Mon Sep 17 00:00:00 2001 From: John Murwin Date: Sat, 20 Nov 2021 14:24:01 -0500 Subject: [PATCH 09/15] Update to project Path --- .github/workflows/Builds.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Builds.yml b/.github/workflows/Builds.yml index d42c515..62dc902 100644 --- a/.github/workflows/Builds.yml +++ b/.github/workflows/Builds.yml @@ -34,7 +34,7 @@ jobs: - name: Cache Project Library for next Build uses: actions/cache@v2 with: - path: Library + path: NQueensSimulation key: Library-${{ matrix.targetPlatform }} restore-keys: Library- - uses: game-ci/unity-builder@v2 From dfc5d2bd364d04d28f3a7cf2e1f3f2e5753fafc8 Mon Sep 17 00:00:00 2001 From: John Murwin Date: Sat, 20 Nov 2021 14:33:31 -0500 Subject: [PATCH 10/15] Added projectPath location to Build Step --- .github/workflows/Builds.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Builds.yml b/.github/workflows/Builds.yml index 62dc902..c9cdce6 100644 --- a/.github/workflows/Builds.yml +++ b/.github/workflows/Builds.yml @@ -34,12 +34,13 @@ jobs: - name: Cache Project Library for next Build uses: actions/cache@v2 with: - path: NQueensSimulation + path: NQueensSimulation/Library key: Library-${{ matrix.targetPlatform }} restore-keys: Library- - uses: game-ci/unity-builder@v2 env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} with: + projectPath: NQueensSimulation targetPlatform: ${{ matrix.targetPlatform }} versioning: Semantic \ No newline at end of file From 7712f57378898cd33ed3550300d7002bf983d396 Mon Sep 17 00:00:00 2001 From: John Murwin Date: Sat, 20 Nov 2021 15:04:13 -0500 Subject: [PATCH 11/15] Update to Builds.yml for Upload Action --- .github/workflows/Builds.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Builds.yml b/.github/workflows/Builds.yml index c9cdce6..387a7fd 100644 --- a/.github/workflows/Builds.yml +++ b/.github/workflows/Builds.yml @@ -43,4 +43,8 @@ jobs: with: projectPath: NQueensSimulation targetPlatform: ${{ matrix.targetPlatform }} - versioning: Semantic \ No newline at end of file + versioning: Semantic + - uses: actions/upload-artifact@v2 + with: + name: Build-${{ matrix.targetPlatform }} + path: build/${{ matrix.targetPlatform }} \ No newline at end of file From 3c77109e38e77dd272382e9ce0f5ae8455c9d48e Mon Sep 17 00:00:00 2001 From: John Murwin Date: Sat, 20 Nov 2021 15:04:23 -0500 Subject: [PATCH 12/15] Include BuildTest as part of CI --- .github/workflows/CI.yml | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 9efe5de..9fb0698 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -81,7 +81,6 @@ jobs: TestProject: - needs: LintProject name: Run Tests in ${{ matrix.testMode }} runs-on: ubuntu-latest strategy: @@ -140,3 +139,34 @@ jobs: with: name: Test results for ${{ matrix.testMode }} path: ${{ steps.tests.outputs.artifactsPath }} + + BuildProject: + name: Build for ${{ matrix.targetPlatform }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + targetPlatform: + - StandaloneOSX # Build a macOS standalone (Intel 64-bit). + - StandaloneWindows64 # Build a Windows 64-bit standalone. + - StandaloneLinux64 # Build a Linux 64-bit standalone. + - WebGL # WebGL. + steps: + - name: Checkout Repo + uses: actions/checkout@v2 + with: + fetch-depth: 0 + lfs: true + - name: Cache Project Library for next Build + uses: actions/cache@v2 + with: + path: NQueensSimulation/Library + key: Library-${{ matrix.targetPlatform }} + restore-keys: Library- + - uses: game-ci/unity-builder@v2 + env: + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + with: + projectPath: NQueensSimulation + targetPlatform: ${{ matrix.targetPlatform }} + versioning: Semantic \ No newline at end of file From d394235dee7eaef1e990c83e22fcabbedbcb264c Mon Sep 17 00:00:00 2001 From: John Murwin Date: Sat, 20 Nov 2021 15:07:13 -0500 Subject: [PATCH 13/15] Add CI comments --- .github/workflows/CI.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 9fb0698..2505f24 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -152,17 +152,20 @@ jobs: - StandaloneLinux64 # Build a Linux 64-bit standalone. - WebGL # WebGL. steps: + # First we checkout the project with LFS support & fetch depth - name: Checkout Repo uses: actions/checkout@v2 with: fetch-depth: 0 lfs: true + # Then cache for future speed - name: Cache Project Library for next Build uses: actions/cache@v2 with: path: NQueensSimulation/Library key: Library-${{ matrix.targetPlatform }} restore-keys: Library- + # Then Build - uses: game-ci/unity-builder@v2 env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} From 50d1dd0860e920ac7aed29979dc988d1d405c159 Mon Sep 17 00:00:00 2001 From: John Murwin Date: Sat, 20 Nov 2021 15:08:22 -0500 Subject: [PATCH 14/15] Removal of Build Steps for CI Workflow --- .github/workflows/CI.yml | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2505f24..d54a309 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -138,38 +138,4 @@ jobs: if: always() with: name: Test results for ${{ matrix.testMode }} - path: ${{ steps.tests.outputs.artifactsPath }} - - BuildProject: - name: Build for ${{ matrix.targetPlatform }} - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - targetPlatform: - - StandaloneOSX # Build a macOS standalone (Intel 64-bit). - - StandaloneWindows64 # Build a Windows 64-bit standalone. - - StandaloneLinux64 # Build a Linux 64-bit standalone. - - WebGL # WebGL. - steps: - # First we checkout the project with LFS support & fetch depth - - name: Checkout Repo - uses: actions/checkout@v2 - with: - fetch-depth: 0 - lfs: true - # Then cache for future speed - - name: Cache Project Library for next Build - uses: actions/cache@v2 - with: - path: NQueensSimulation/Library - key: Library-${{ matrix.targetPlatform }} - restore-keys: Library- - # Then Build - - uses: game-ci/unity-builder@v2 - env: - UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} - with: - projectPath: NQueensSimulation - targetPlatform: ${{ matrix.targetPlatform }} - versioning: Semantic \ No newline at end of file + path: ${{ steps.tests.outputs.artifactsPath }} \ No newline at end of file From 5bad922c178c19961b8d43952ebbf34aa8b137eb Mon Sep 17 00:00:00 2001 From: John Murwin Date: Sat, 20 Nov 2021 15:36:28 -0500 Subject: [PATCH 15/15] Update to trigger conditions and comments --- .github/workflows/Builds.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/Builds.yml b/.github/workflows/Builds.yml index 387a7fd..050d3b5 100644 --- a/.github/workflows/Builds.yml +++ b/.github/workflows/Builds.yml @@ -4,12 +4,8 @@ name: Automated Builds on: - push: - branches: - - main - paths-ignore: - - 'docs/**' - - '*.md' + release: + types: [published] pull_request: types: [opened, synchronize, reopened, edited] @@ -26,17 +22,22 @@ jobs: - StandaloneLinux64 # Build a Linux 64-bit standalone. - WebGL # WebGL. steps: + # First checkout the repo with both LFS and FetchDepth 0 for full commit - name: Checkout Repo uses: actions/checkout@v2 with: fetch-depth: 0 lfs: true + + # Cache project for future speed - name: Cache Project Library for next Build uses: actions/cache@v2 with: path: NQueensSimulation/Library key: Library-${{ matrix.targetPlatform }} restore-keys: Library- + + # Use GameCI to build project with TargetPlatform Matrix - uses: game-ci/unity-builder@v2 env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} @@ -44,6 +45,8 @@ jobs: projectPath: NQueensSimulation targetPlatform: ${{ matrix.targetPlatform }} versioning: Semantic + + # Upload Build Artifacts *for PR's* - uses: actions/upload-artifact@v2 with: name: Build-${{ matrix.targetPlatform }}