summaryrefslogtreecommitdiffstats
path: root/.ci
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-x.ci/scripts/android/build.sh15
-rwxr-xr-x.ci/scripts/android/upload.sh27
-rwxr-xr-x.ci/scripts/format/script.sh2
-rwxr-xr-x.ci/scripts/linux/docker.sh1
-rw-r--r--.ci/scripts/merge/apply-patches-by-label.py20
-rw-r--r--.ci/scripts/windows/scan_dll.py2
-rw-r--r--.ci/scripts/windows/upload.ps16
-rw-r--r--.ci/templates/build-msvc.yml2
8 files changed, 60 insertions, 15 deletions
diff --git a/.ci/scripts/android/build.sh b/.ci/scripts/android/build.sh
new file mode 100755
index 000000000..a5fd1ee18
--- /dev/null
+++ b/.ci/scripts/android/build.sh
@@ -0,0 +1,15 @@
+#!/bin/bash -ex
+
+# SPDX-FileCopyrightText: 2023 yuzu Emulator Project
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+export NDK_CCACHE="$(which ccache)"
+ccache -s
+
+BUILD_FLAVOR=mainline
+
+cd src/android
+chmod +x ./gradlew
+./gradlew "assemble${BUILD_FLAVOR}Release" "bundle${BUILD_FLAVOR}Release"
+
+ccache -s
diff --git a/.ci/scripts/android/upload.sh b/.ci/scripts/android/upload.sh
new file mode 100755
index 000000000..cfaeff328
--- /dev/null
+++ b/.ci/scripts/android/upload.sh
@@ -0,0 +1,27 @@
+#!/bin/bash -ex
+
+# SPDX-FileCopyrightText: 2023 yuzu Emulator Project
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+. ./.ci/scripts/common/pre-upload.sh
+
+REV_NAME="yuzu-${GITDATE}-${GITREV}"
+
+BUILD_FLAVOR=mainline
+
+cp src/android/app/build/outputs/apk/"${BUILD_FLAVOR}/release/app-${BUILD_FLAVOR}-release.apk" \
+ "artifacts/${REV_NAME}.apk"
+cp src/android/app/build/outputs/bundle/"${BUILD_FLAVOR}Release"/"app-${BUILD_FLAVOR}-release.aab" \
+ "artifacts/${REV_NAME}.aab"
+
+if [ -n "${ANDROID_KEYSTORE_B64}" ]
+then
+ echo "Signing apk..."
+ base64 --decode <<< "${ANDROID_KEYSTORE_B64}" > ks.jks
+
+ apksigner sign --ks ks.jks \
+ --ks-key-alias "${ANDROID_KEY_ALIAS}" \
+ --ks-pass env:ANDROID_KEYSTORE_PASS "artifacts/${REV_NAME}.apk"
+else
+ echo "No keystore specified, not signing the APK files."
+fi
diff --git a/.ci/scripts/format/script.sh b/.ci/scripts/format/script.sh
index 225bbc972..25b0718f0 100755
--- a/.ci/scripts/format/script.sh
+++ b/.ci/scripts/format/script.sh
@@ -10,7 +10,7 @@ if grep -nrI '\s$' src *.yml *.txt *.md Doxyfile .gitignore .gitmodules .ci* dis
fi
# Default clang-format points to default 3.5 version one
-CLANG_FORMAT=${CLANG_FORMAT:-clang-format-12}
+CLANG_FORMAT=${CLANG_FORMAT:-clang-format-15}
$CLANG_FORMAT --version
if [ "$TRAVIS_EVENT_TYPE" = "pull_request" ]; then
diff --git a/.ci/scripts/linux/docker.sh b/.ci/scripts/linux/docker.sh
index c8bc56c9a..7f6d2ad1b 100755
--- a/.ci/scripts/linux/docker.sh
+++ b/.ci/scripts/linux/docker.sh
@@ -22,6 +22,7 @@ cmake .. \
-DUSE_DISCORD_PRESENCE=ON \
-DYUZU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} \
-DYUZU_USE_BUNDLED_FFMPEG=ON \
+ -DYUZU_ENABLE_LTO=ON \
-GNinja
ninja
diff --git a/.ci/scripts/merge/apply-patches-by-label.py b/.ci/scripts/merge/apply-patches-by-label.py
index 8ddc8ff34..17bb7dc13 100644
--- a/.ci/scripts/merge/apply-patches-by-label.py
+++ b/.ci/scripts/merge/apply-patches-by-label.py
@@ -2,15 +2,12 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Download all pull requests as patches that match a specific label
-# Usage: python download-patches-by-label.py <Label to Match> <Root Path Folder to DL to>
+# Usage: python apply-patches-by-label.py <Label to Match>
-import requests, sys, json, urllib3.request, shutil, subprocess, os, traceback
+import json, requests, subprocess, sys, traceback
tagline = sys.argv[2]
-http = urllib3.PoolManager()
-dl_list = {}
-
def check_individual(labels):
for label in labels:
if (label["name"] == sys.argv[1]):
@@ -18,8 +15,9 @@ def check_individual(labels):
return False
def do_page(page):
- url = 'https://api.github.com/repos/yuzu-emu/yuzu/pulls?page=%s' % page
+ url = f"https://api.github.com/repos/yuzu-emu/yuzu/pulls?page={page}"
response = requests.get(url)
+ response.raise_for_status()
if (response.ok):
j = json.loads(response.content)
if j == []:
@@ -27,13 +25,13 @@ def do_page(page):
for pr in j:
if (check_individual(pr["labels"])):
pn = pr["number"]
- print("Matched PR# %s" % pn)
- print(subprocess.check_output(["git", "fetch", "https://github.com/yuzu-emu/yuzu.git", "pull/%s/head:pr-%s" % (pn, pn), "-f", "--no-recurse-submodules"]))
- print(subprocess.check_output(["git", "merge", "--squash", "pr-%s" % pn]))
- print(subprocess.check_output(["git", "commit", "-m\"Merge %s PR %s\"" % (tagline, pn)]))
+ print(f"Matched PR# {pn}")
+ print(subprocess.check_output(["git", "fetch", "https://github.com/yuzu-emu/yuzu.git", f"pull/{pn}/head:pr-{pn}", "-f", "--no-recurse-submodules"]))
+ print(subprocess.check_output(["git", "merge", "--squash", f"pr-{pn}"]))
+ print(subprocess.check_output(["git", "commit", f"-m\"Merge {tagline} PR {pn}\""]))
try:
- for i in range(1,30):
+ for i in range(1,10):
do_page(i)
except:
traceback.print_exc(file=sys.stdout)
diff --git a/.ci/scripts/windows/scan_dll.py b/.ci/scripts/windows/scan_dll.py
index f374e0d78..a536f7375 100644
--- a/.ci/scripts/windows/scan_dll.py
+++ b/.ci/scripts/windows/scan_dll.py
@@ -40,7 +40,7 @@ def parse_imports(file_name):
def parse_imports_recursive(file_name, path_list=[]):
q = queue.Queue() # create a FIFO queue
- # file_name can be a string or a list for the convience
+ # file_name can be a string or a list for the convenience
if isinstance(file_name, str):
q.put(file_name)
elif isinstance(file_name, list):
diff --git a/.ci/scripts/windows/upload.ps1 b/.ci/scripts/windows/upload.ps1
index 21abcd752..492763420 100644
--- a/.ci/scripts/windows/upload.ps1
+++ b/.ci/scripts/windows/upload.ps1
@@ -26,7 +26,11 @@ $env:BUILD_ZIP = $MSVC_BUILD_ZIP
$env:BUILD_SYMBOLS = $MSVC_BUILD_PDB
$env:BUILD_UPDATE = $MSVC_SEVENZIP
-$BUILD_DIR = ".\build\bin\Release"
+if (Test-Path -Path ".\build\bin\Release") {
+ $BUILD_DIR = ".\build\bin\Release"
+} else {
+ $BUILD_DIR = ".\build\bin\"
+}
# Cleanup unneeded data in submodules
git submodule foreach git clean -fxd
diff --git a/.ci/templates/build-msvc.yml b/.ci/templates/build-msvc.yml
index c379dd757..ceb7e0c32 100644
--- a/.ci/templates/build-msvc.yml
+++ b/.ci/templates/build-msvc.yml
@@ -9,7 +9,7 @@ parameters:
steps:
- script: choco install vulkan-sdk
displayName: 'Install vulkan-sdk'
-- script: refreshenv && mkdir build && cd build && cmake -E env CXXFLAGS="/Gw /GA /Gr /Ob2" cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_POLICY_DEFAULT_CMP0069=NEW -DYUZU_USE_BUNDLED_QT=1 -DYUZU_USE_BUNDLED_SDL2=1 -DYUZU_USE_QT_WEB_ENGINE=ON -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DYUZU_ENABLE_COMPATIBILITY_REPORTING=${COMPAT} -DYUZU_TESTS=OFF -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DDISPLAY_VERSION=${{ parameters['version'] }} -DCMAKE_BUILD_TYPE=Release -DYUZU_CRASH_DUMPS=ON .. && cd ..
+- script: refreshenv && mkdir build && cd build && cmake -E env CXXFLAGS="/Gw /GA /Gr /Ob2" cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_POLICY_DEFAULT_CMP0069=NEW -DYUZU_ENABLE_LTO=ON -DYUZU_USE_BUNDLED_QT=1 -DYUZU_USE_BUNDLED_SDL2=1 -DYUZU_USE_QT_WEB_ENGINE=ON -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DYUZU_ENABLE_COMPATIBILITY_REPORTING=${COMPAT} -DYUZU_TESTS=OFF -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DDISPLAY_VERSION=${{ parameters['version'] }} -DCMAKE_BUILD_TYPE=Release -DYUZU_CRASH_DUMPS=ON .. && cd ..
displayName: 'Configure CMake'
- task: MSBuild@1
displayName: 'Build'