summaryrefslogtreecommitdiff
path: root/.ci/scripts/windows/upload.ps1
diff options
context:
space:
mode:
Diffstat (limited to '.ci/scripts/windows/upload.ps1')
-rw-r--r--.ci/scripts/windows/upload.ps156
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
1param($BUILD_NAME) 4param($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
32git submodule foreach git clean -fxd
33
28# Upload debugging symbols 34# Upload debugging symbols
29mkdir pdb 35mkdir pdb
30Get-ChildItem "$BUILD_DIR\" -Recurse -Filter "*.pdb" | Copy-Item -destination .\pdb 36Get-ChildItem "$BUILD_DIR\" -Recurse -Filter "*.pdb" | Copy-Item -destination .\pdb
@@ -37,7 +43,7 @@ mkdir $MSVC_SOURCE
37mkdir "artifacts" 43mkdir "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
40Copy-Item .\license.txt -Destination $MSVC_SOURCE 46Copy-Item .\LICENSE.txt -Destination $MSVC_SOURCE
41Copy-Item .\README.md -Destination $MSVC_SOURCE 47Copy-Item .\README.md -Destination $MSVC_SOURCE
42Copy-Item .\CMakeLists.txt -Destination $MSVC_SOURCE 48Copy-Item .\CMakeLists.txt -Destination $MSVC_SOURCE
43Copy-Item .\src -Recurse -Destination $MSVC_SOURCE 49Copy-Item .\src -Recurse -Destination $MSVC_SOURCE
@@ -47,6 +53,53 @@ Copy-Item .\CMakeModules -Recurse -Destination $MSVC_SOURCE
477z a -r -ttar $MSVC_SOURCE_TAR $MSVC_SOURCE 537z a -r -ttar $MSVC_SOURCE_TAR $MSVC_SOURCE
487z a -r -txz $MSVC_SOURCE_TARXZ $MSVC_SOURCE_TAR 547z a -r -txz $MSVC_SOURCE_TARXZ $MSVC_SOURCE_TAR
49 55
56# Following section is quick hack to package artifacts differently for GitHub Actions
57if ("$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
51Copy-Item $MSVC_SOURCE_TARXZ -Destination $RELEASE_DIST 104Copy-Item $MSVC_SOURCE_TARXZ -Destination $RELEASE_DIST
52Copy-Item "$BUILD_DIR\*" -Destination $RELEASE_DIST -Recurse 105Copy-Item "$BUILD_DIR\*" -Destination $RELEASE_DIST -Recurse
@@ -62,3 +115,4 @@ Get-ChildItem "$BUILD_DIR" -Recurse -Filter "QtWebEngineProcess*.exe" | Copy-Ite
62Get-ChildItem . -Filter "*.zip" | Copy-Item -destination "artifacts" 115Get-ChildItem . -Filter "*.zip" | Copy-Item -destination "artifacts"
63Get-ChildItem . -Filter "*.7z" | Copy-Item -destination "artifacts" 116Get-ChildItem . -Filter "*.7z" | Copy-Item -destination "artifacts"
64Get-ChildItem . -Filter "*.tar.xz" | Copy-Item -destination "artifacts" 117Get-ChildItem . -Filter "*.tar.xz" | Copy-Item -destination "artifacts"
118}