diff options
Diffstat (limited to '.ci/scripts/windows/upload.ps1')
| -rw-r--r-- | .ci/scripts/windows/upload.ps1 | 56 |
1 files changed, 55 insertions, 1 deletions
diff --git a/.ci/scripts/windows/upload.ps1 b/.ci/scripts/windows/upload.ps1 index 62483607b..f2368be6f 100644 --- a/.ci/scripts/windows/upload.ps1 +++ b/.ci/scripts/windows/upload.ps1 | |||
| @@ -1,3 +1,6 @@ | |||
| 1 | # SPDX-FileCopyrightText: 2019 yuzu Emulator Project | ||
| 2 | # SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 1 | param($BUILD_NAME) | 4 | param($BUILD_NAME) |
| 2 | 5 | ||
| 3 | $GITDATE = $(git show -s --date=short --format='%ad') -replace "-", "" | 6 | $GITDATE = $(git show -s --date=short --format='%ad') -replace "-", "" |
| @@ -25,6 +28,9 @@ $env:BUILD_UPDATE = $MSVC_SEVENZIP | |||
| 25 | 28 | ||
| 26 | $BUILD_DIR = ".\build\bin\Release" | 29 | $BUILD_DIR = ".\build\bin\Release" |
| 27 | 30 | ||
| 31 | # Cleanup unneeded data in submodules | ||
| 32 | git submodule foreach git clean -fxd | ||
| 33 | |||
| 28 | # Upload debugging symbols | 34 | # Upload debugging symbols |
| 29 | mkdir pdb | 35 | mkdir pdb |
| 30 | Get-ChildItem "$BUILD_DIR\" -Recurse -Filter "*.pdb" | Copy-Item -destination .\pdb | 36 | Get-ChildItem "$BUILD_DIR\" -Recurse -Filter "*.pdb" | Copy-Item -destination .\pdb |
| @@ -37,7 +43,7 @@ mkdir $MSVC_SOURCE | |||
| 37 | mkdir "artifacts" | 43 | mkdir "artifacts" |
| 38 | 44 | ||
| 39 | # Build a tar.xz for the source of the release | 45 | # Build a tar.xz for the source of the release |
| 40 | Copy-Item .\license.txt -Destination $MSVC_SOURCE | 46 | Copy-Item .\LICENSE.txt -Destination $MSVC_SOURCE |
| 41 | Copy-Item .\README.md -Destination $MSVC_SOURCE | 47 | Copy-Item .\README.md -Destination $MSVC_SOURCE |
| 42 | Copy-Item .\CMakeLists.txt -Destination $MSVC_SOURCE | 48 | Copy-Item .\CMakeLists.txt -Destination $MSVC_SOURCE |
| 43 | Copy-Item .\src -Recurse -Destination $MSVC_SOURCE | 49 | Copy-Item .\src -Recurse -Destination $MSVC_SOURCE |
| @@ -47,6 +53,53 @@ Copy-Item .\CMakeModules -Recurse -Destination $MSVC_SOURCE | |||
| 47 | 7z a -r -ttar $MSVC_SOURCE_TAR $MSVC_SOURCE | 53 | 7z a -r -ttar $MSVC_SOURCE_TAR $MSVC_SOURCE |
| 48 | 7z a -r -txz $MSVC_SOURCE_TARXZ $MSVC_SOURCE_TAR | 54 | 7z a -r -txz $MSVC_SOURCE_TARXZ $MSVC_SOURCE_TAR |
| 49 | 55 | ||
| 56 | # Following section is quick hack to package artifacts differently for GitHub Actions | ||
| 57 | if ("$env:GITHUB_ACTIONS" -eq "true") { | ||
| 58 | echo "Hello GitHub Actions" | ||
| 59 | |||
| 60 | # With vcpkg we now have a few more dll files | ||
| 61 | ls .\build\bin\*.dll | ||
| 62 | cp .\build\bin\*.dll .\artifacts\ | ||
| 63 | |||
| 64 | # Hopefully there is an exe in either .\build\bin or .\build\bin\Release | ||
| 65 | cp .\build\bin\yuzu*.exe .\artifacts\ | ||
| 66 | Copy-Item "$BUILD_DIR\*" -Destination "artifacts" -Recurse | ||
| 67 | Remove-Item .\artifacts\tests.exe -ErrorAction ignore | ||
| 68 | |||
| 69 | # None of the other GHA builds are including source, so commenting out today | ||
| 70 | #Copy-Item $MSVC_SOURCE_TARXZ -Destination "artifacts" | ||
| 71 | |||
| 72 | # Are debug symbols important? | ||
| 73 | # cp .\build\bin\yuzu*.pdb .\pdb\ | ||
| 74 | |||
| 75 | # Write out a tag BUILD_TAG to environment for the Upload step | ||
| 76 | # We're getting ${{ github.event.number }} as $env:PR_NUMBER" | ||
| 77 | echo "env:PR_NUMBER: $env:PR_NUMBER" | ||
| 78 | if (Test-Path env:PR_NUMBER) { | ||
| 79 | $PR_NUMBER = $env:PR_NUMBER.Substring(2) -as [int] | ||
| 80 | $PR_NUMBER_TAG = "pr"+([string]$PR_NUMBER).PadLeft(5,'0') | ||
| 81 | if ($PR_NUMBER -gt 1){ | ||
| 82 | $BUILD_TAG="verify-$PR_NUMBER_TAG-$GITDATE-$GITREV" | ||
| 83 | } else { | ||
| 84 | $BUILD_TAG = "verify-$GITDATE-$GITREV" | ||
| 85 | } | ||
| 86 | } else { | ||
| 87 | # If env:PR_NUMBER isn't set, we should still write out a variable | ||
| 88 | $BUILD_TAG = "verify-$GITDATE-$GITREV" | ||
| 89 | } | ||
| 90 | echo "BUILD_TAG=$BUILD_TAG" | ||
| 91 | echo "BUILD_TAG=$BUILD_TAG" >> $env:GITHUB_ENV | ||
| 92 | |||
| 93 | # For extra job, just the exe | ||
| 94 | $INDIVIDUAL_EXE = "yuzu-msvc-$BUILD_TAG.exe" | ||
| 95 | echo "INDIVIDUAL_EXE=$INDIVIDUAL_EXE" | ||
| 96 | echo "INDIVIDUAL_EXE=$INDIVIDUAL_EXE" >> $env:GITHUB_ENV | ||
| 97 | echo "Just the exe: $INDIVIDUAL_EXE" | ||
| 98 | cp .\artifacts\yuzu.exe .\$INDIVIDUAL_EXE | ||
| 99 | |||
| 100 | |||
| 101 | } else { | ||
| 102 | |||
| 50 | # Build the final release artifacts | 103 | # Build the final release artifacts |
| 51 | Copy-Item $MSVC_SOURCE_TARXZ -Destination $RELEASE_DIST | 104 | Copy-Item $MSVC_SOURCE_TARXZ -Destination $RELEASE_DIST |
| 52 | Copy-Item "$BUILD_DIR\*" -Destination $RELEASE_DIST -Recurse | 105 | Copy-Item "$BUILD_DIR\*" -Destination $RELEASE_DIST -Recurse |
| @@ -62,3 +115,4 @@ Get-ChildItem "$BUILD_DIR" -Recurse -Filter "QtWebEngineProcess*.exe" | Copy-Ite | |||
| 62 | Get-ChildItem . -Filter "*.zip" | Copy-Item -destination "artifacts" | 115 | Get-ChildItem . -Filter "*.zip" | Copy-Item -destination "artifacts" |
| 63 | Get-ChildItem . -Filter "*.7z" | Copy-Item -destination "artifacts" | 116 | Get-ChildItem . -Filter "*.7z" | Copy-Item -destination "artifacts" |
| 64 | Get-ChildItem . -Filter "*.tar.xz" | Copy-Item -destination "artifacts" | 117 | Get-ChildItem . -Filter "*.tar.xz" | Copy-Item -destination "artifacts" |
| 118 | } | ||