CI: Update CI workflows to use Citron-specific naming and paths

This commit is contained in:
Zephyron 2025-04-30 16:50:39 +10:00
parent 257aad2431
commit eec0f34204
65 changed files with 2596 additions and 10 deletions

9
.ci/scripts/format/docker.sh Executable file
View file

@ -0,0 +1,9 @@
#!/bin/bash -ex
# SPDX-FileCopyrightText: 2019 citron Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
# Run clang-format
cd /citron
chmod a+x ./.ci/scripts/format/script.sh
./.ci/scripts/format/script.sh

10
.ci/scripts/format/exec.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/bash -ex
# SPDX-FileCopyrightText: 2019 citron Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
chmod a+x ./.ci/scripts/format/docker.sh
# the UID for the container citron user is 1027
sudo chown -R 1027 ./
docker run -v "$(pwd):/citron" -w /citron yuzu-emu-mirror/build-environments:linux-clang-format /bin/bash -ex /citron/.ci/scripts/format/docker.sh
sudo chown -R $UID ./

37
.ci/scripts/format/script.sh Executable file
View file

@ -0,0 +1,37 @@
#!/bin/bash -ex
# SPDX-FileCopyrightText: 2019 citron Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
shopt -s nullglob globstar
if git grep -nrI '\s$' src **/*.yml **/*.txt **/*.md Doxyfile .gitignore .gitmodules .ci* dist/*.desktop dist/*.svg dist/*.xml; then
echo Trailing whitespace found, aborting
exit 1
fi
# Default clang-format points to default 3.5 version one
CLANG_FORMAT="${CLANG_FORMAT:-clang-format-15}"
"$CLANG_FORMAT" --version
# Turn off tracing for this because it's too verbose
set +x
# Check everything for branch pushes
FILES_TO_LINT="$(find src/ -name '*.cpp' -or -name '*.h')"
for f in $FILES_TO_LINT; do
echo "$f"
"$CLANG_FORMAT" -i "$f"
done
DIFF=$(git -c core.fileMode=false diff)
if [ ! -z "$DIFF" ]; then
echo "!!! Not compliant to coding style, here is the fix:"
echo "$DIFF"
exit 1
fi
cd src/android
./gradlew ktlintCheck