From e7ae23670d9c9ab789321735cfd557e04567485c Mon Sep 17 00:00:00 2001 From: Andrew Kahr <22359829+AndrewKahr@users.noreply.github.com> Date: Tue, 25 Jan 2022 13:03:14 -0800 Subject: [PATCH] Make windows build tests only run on push to main --- .github/workflows/build-tests.yml | 67 -------------------- .github/workflows/windows-build-tests.yml | 77 +++++++++++++++++++++++ 2 files changed, 77 insertions(+), 67 deletions(-) create mode 100644 .github/workflows/windows-build-tests.yml diff --git a/.github/workflows/build-tests.yml b/.github/workflows/build-tests.yml index e45e2e7f..239f2b0f 100644 --- a/.github/workflows/build-tests.yml +++ b/.github/workflows/build-tests.yml @@ -71,70 +71,3 @@ jobs: name: Build Ubuntu (${{ matrix.unityVersion }}) path: build retention-days: 14 - - buildForAllPlatformsWindows: - name: Build for ${{ matrix.targetPlatform }} on version ${{ matrix.unityVersion }} - runs-on: windows-2019 - strategy: - fail-fast: false - matrix: - projectPath: - - test-project - unityVersion: - - 2020.3.24f1 - targetPlatform: - - 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@v2 - with: - lfs: true - - ########################### - # Cache # - ########################### - - uses: actions/cache@v2 - with: - path: ${{ matrix.projectPath }}/Library - key: Library-${{ matrix.projectPath }}-windows-${{ matrix.targetPlatform }} - restore-keys: | - Library-${{ matrix.projectPath }}-windows- - Library- - - ########################### - # Set Scripting Backend # - ########################### - - name: Set Scripting Backend To il2cpp - run: | - Move-Item -Path "./test-project/ProjectSettings/ProjectSettingsWindows.asset" -Destination "./test-project/ProjectSettings/ProjectSettings.asset" -Force - - ########################### - # Build # - ########################### - - uses: ./ - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - with: - projectPath: ${{ matrix.projectPath }} - unityVersion: ${{ matrix.unityVersion }} - targetPlatform: ${{ matrix.targetPlatform }} - customParameters: -profile SomeProfile -someBoolean -someValue exampleValue - allowDirtyBuild: true - # We use dirty build because we are replacing the default project settings file above - - ########################### - # Upload # - ########################### - - uses: actions/upload-artifact@v2 - with: - name: Build Windows (${{ matrix.unityVersion }}) - path: build - retention-days: 14 diff --git a/.github/workflows/windows-build-tests.yml b/.github/workflows/windows-build-tests.yml new file mode 100644 index 00000000..e9f264df --- /dev/null +++ b/.github/workflows/windows-build-tests.yml @@ -0,0 +1,77 @@ +name: Windows Builds + +on: + push: + branches: + - main + +env: + UNITY_LICENSE: "\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \nm0Db8UK+ktnOLJBtHybkfetpcKo=o/pUbSQAukz7+ZYAWhnA0AJbIlyyCPL7bKVEM2lVqbrXt7cyey+umkCXamuOgsWPVUKBMkXtMH8L\n5etLmD0getWIhTGhzOnDCk+gtIPfL4jMo9tkEuOCROQAXCci23VFscKcrkB+3X6h4wEOtA2APhOY\nB+wvC794o8/82ffjP79aVAi57rp3Wmzx+9pe9yMwoJuljAy2sc2tIMgdQGWVmOGBpQm3JqsidyzI\nJWG2kjnc7pDXK9pwYzXoKiqUqqrut90d+kQqRyv7MSZXR50HFqD/LI69h68b7P8Bjo3bPXOhNXGR\n9YCoemH6EkfCJxp2gIjzjWW+l2Hj2EsFQi8YXw==" + +jobs: + buildForAllPlatformsWindows: + name: Build for ${{ matrix.targetPlatform }} on version ${{ matrix.unityVersion }} + runs-on: windows-2019 + strategy: + fail-fast: false + matrix: + projectPath: + - test-project + unityVersion: + - 2020.3.24f1 + targetPlatform: + - 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@v2 + with: + lfs: true + + ########################### + # Cache # + ########################### + - uses: actions/cache@v2 + with: + path: ${{ matrix.projectPath }}/Library + key: Library-${{ matrix.projectPath }}-windows-${{ matrix.targetPlatform }} + restore-keys: | + Library-${{ matrix.projectPath }}-windows- + Library- + + ########################### + # Set Scripting Backend # + ########################### + - name: Set Scripting Backend To il2cpp + run: | + Move-Item -Path "./test-project/ProjectSettings/ProjectSettingsWindows.asset" -Destination "./test-project/ProjectSettings/ProjectSettings.asset" -Force + + ########################### + # Build # + ########################### + - uses: ./ + env: + UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} + UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} + UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} + with: + projectPath: ${{ matrix.projectPath }} + unityVersion: ${{ matrix.unityVersion }} + targetPlatform: ${{ matrix.targetPlatform }} + customParameters: -profile SomeProfile -someBoolean -someValue exampleValue + allowDirtyBuild: true + # We use dirty build because we are replacing the default project settings file above + + ########################### + # Upload # + ########################### + - uses: actions/upload-artifact@v2 + with: + name: Build Windows (${{ matrix.unityVersion }}) + path: build + retention-days: 14