Merge branch 'march-fix' into 'main'

fix(ci): resolve submodule initialization failures in GitLab CI

See merge request citron/emulator!14
This commit is contained in:
Zephyron
2025-09-21 12:18:25 +10:00
3 changed files with 63 additions and 22 deletions

View File

@@ -38,7 +38,9 @@ build-linux:
- echo 'fi' >> /usr/local/bin/shasum
- chmod +x /usr/local/bin/shasum
script:
- git submodule update --init --recursive
# Clean and reset submodules to handle any inconsistencies
- git submodule deinit --all --force || true
- git submodule update --init --recursive --force
- mkdir -p build && cd build
- cmake .. -G Ninja -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_C_FLAGS="-O3 -ffast-math -funsafe-math-optimizations -fno-math-errno -fno-trapping-math -freciprocal-math -ffp-contract=fast -fassociative-math -fno-rounding-math -fno-signaling-nans -march=x86-64-v2 -mtune=native -fomit-frame-pointer -fstrict-aliasing -frename-registers -fno-plt -funroll-loops -floop-interchange -floop-strip-mine -floop-block -fprefetch-loop-arrays -fpredictive-commoning -ftree-vectorize -fsplit-paths -finline-functions -finline-limit=1000 -finline-functions-called-once -fgcse-sm -fgcse-las -freorder-blocks-and-partition -fipa-pta -fipa-cp-clone -fwhole-program -flto=auto -fuse-linker-plugin -fvisibility=hidden -fdata-sections -ffunction-sections -fno-semantic-interposition -fopenmp -fexceptions -frtti" -DCMAKE_CXX_FLAGS="-O3 -ffast-math -funsafe-math-optimizations -fno-math-errno -fno-trapping-math -freciprocal-math -ffp-contract=fast -fassociative-math -fno-rounding-math -fno-signaling-nans -march=x86-64-v2 -mtune=native -fomit-frame-pointer -fstrict-aliasing -frename-registers -fno-plt -funroll-loops -floop-interchange -floop-strip-mine -floop-block -fprefetch-loop-arrays -fpredictive-commoning -ftree-vectorize -fsplit-paths -finline-functions -finline-limit=1000 -finline-functions-called-once -fgcse-sm -fgcse-las -freorder-blocks-and-partition -fipa-pta -fipa-cp-clone -fwhole-program -flto=auto -fuse-linker-plugin -fvisibility=hidden -fdata-sections -ffunction-sections -fno-semantic-interposition -fopenmp -fexceptions -frtti -Wno-error -w" -DCMAKE_EXE_LINKER_FLAGS="-Wl,--gc-sections -Wl,-O2 -Wl,--as-needed" -DSDL_PIPEWIRE=OFF -DCITRON_USE_BUNDLED_VCPKG=OFF -DUSE_DISCORD_PRESENCE=OFF -DBUNDLE_SPEEX=ON -DCITRON_USE_BUNDLED_FFMPEG=OFF -DCITRON_USE_QT_MULTIMEDIA=OFF -DCITRON_USE_QT_WEB_ENGINE=OFF
- ninja
@@ -66,13 +68,18 @@ build-linux:
- echo "Total artifact size:"
- du -sh citron.AppImage build/bin/citron 2>/dev/null || echo "Cannot measure artifact sizes"
- echo "Compressing AppImage for upload..."
- xz -9 -c citron.AppImage > citron.AppImage.xz
- ls -la citron.AppImage.xz
- du -h citron.AppImage.xz
- echo "AppImage compressed with xz successfully"
- gzip -9 -c citron.AppImage > citron.AppImage.gz
- ls -la citron.AppImage.gz
- du -h citron.AppImage.gz
- echo "AppImage compressed with gzip successfully"
# Also create a smaller binary-only archive for fallback
- tar -czf citron-binary.tar.gz build/bin/
- ls -la citron-binary.tar.gz
- du -h citron-binary.tar.gz
artifacts:
paths:
- citron.AppImage.xz
- citron.AppImage.gz
- citron-binary.tar.gz
expire_in: 1 week
when: always
only:
@@ -102,9 +109,11 @@ build-linux-v3:
- echo 'fi' >> /usr/local/bin/shasum
- chmod +x /usr/local/bin/shasum
script:
- git submodule update --init --recursive
# Clean and reset submodules to handle any inconsistencies
- git submodule deinit --all --force || true
- git submodule update --init --recursive --force
- mkdir -p build && cd build
- cmake .. -G Ninja -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_C_FLAGS="-O3 -ffast-math -funsafe-math-optimizations -fno-math-errno -fno-trapping-math -freciprocal-math -ffp-contract=fast -fassociative-math -fno-rounding-math -fno-signaling-nans -march=v3 -mtune=native -fomit-frame-pointer -fstrict-aliasing -frename-registers -fno-plt -funroll-loops -floop-interchange -floop-strip-mine -floop-block -fprefetch-loop-arrays -fpredictive-commoning -ftree-vectorize -fsplit-paths -finline-functions -finline-limit=1000 -finline-functions-called-once -fgcse-sm -fgcse-las -freorder-blocks-and-partition -fipa-pta -fipa-cp-clone -fwhole-program -flto=auto -fuse-linker-plugin -fvisibility=hidden -fdata-sections -ffunction-sections -fno-semantic-interposition -fopenmp -fexceptions -frtti" -DCMAKE_CXX_FLAGS="-O3 -ffast-math -funsafe-math-optimizations -fno-math-errno -fno-trapping-math -freciprocal-math -ffp-contract=fast -fassociative-math -fno-rounding-math -fno-signaling-nans -march=v3 -mtune=native -fomit-frame-pointer -fstrict-aliasing -frename-registers -fno-plt -funroll-loops -floop-interchange -floop-strip-mine -floop-block -fprefetch-loop-arrays -fpredictive-commoning -ftree-vectorize -fsplit-paths -finline-functions -finline-limit=1000 -finline-functions-called-once -fgcse-sm -fgcse-las -freorder-blocks-and-partition -fipa-pta -fipa-cp-clone -fwhole-program -flto=auto -fuse-linker-plugin -fvisibility=hidden -fdata-sections -ffunction-sections -fno-semantic-interposition -fopenmp -fexceptions -frtti -Wno-error -w" -DCMAKE_EXE_LINKER_FLAGS="-Wl,--gc-sections -Wl,-O2 -Wl,--as-needed" -DSDL_PIPEWIRE=OFF -DCITRON_USE_BUNDLED_VCPKG=OFF -DUSE_DISCORD_PRESENCE=OFF -DBUNDLE_SPEEX=ON -DCITRON_USE_BUNDLED_FFMPEG=OFF -DCITRON_USE_QT_MULTIMEDIA=OFF -DCITRON_USE_QT_WEB_ENGINE=OFF
- cmake .. -G Ninja -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_C_FLAGS="-O3 -ffast-math -funsafe-math-optimizations -fno-math-errno -fno-trapping-math -freciprocal-math -ffp-contract=fast -fassociative-math -fno-rounding-math -fno-signaling-nans -march=x86-64-v3 -mtune=native -fomit-frame-pointer -fstrict-aliasing -frename-registers -fno-plt -funroll-loops -floop-interchange -floop-strip-mine -floop-block -fprefetch-loop-arrays -fpredictive-commoning -ftree-vectorize -fsplit-paths -finline-functions -finline-limit=1000 -finline-functions-called-once -fgcse-sm -fgcse-las -freorder-blocks-and-partition -fipa-pta -fipa-cp-clone -fwhole-program -flto=auto -fuse-linker-plugin -fvisibility=hidden -fdata-sections -ffunction-sections -fno-semantic-interposition -fopenmp -fexceptions -frtti" -DCMAKE_CXX_FLAGS="-O3 -ffast-math -funsafe-math-optimizations -fno-math-errno -fno-trapping-math -freciprocal-math -ffp-contract=fast -fassociative-math -fno-rounding-math -fno-signaling-nans -march=x86-64-v3 -mtune=native -fomit-frame-pointer -fstrict-aliasing -frename-registers -fno-plt -funroll-loops -floop-interchange -floop-strip-mine -floop-block -fprefetch-loop-arrays -fpredictive-commoning -ftree-vectorize -fsplit-paths -finline-functions -finline-limit=1000 -finline-functions-called-once -fgcse-sm -fgcse-las -freorder-blocks-and-partition -fipa-pta -fipa-cp-clone -fwhole-program -flto=auto -fuse-linker-plugin -fvisibility=hidden -fdata-sections -ffunction-sections -fno-semantic-interposition -fopenmp -fexceptions -frtti -Wno-error -w" -DCMAKE_EXE_LINKER_FLAGS="-Wl,--gc-sections -Wl,-O2 -Wl,--as-needed" -DSDL_PIPEWIRE=OFF -DCITRON_USE_BUNDLED_VCPKG=OFF -DUSE_DISCORD_PRESENCE=OFF -DBUNDLE_SPEEX=ON -DCITRON_USE_BUNDLED_FFMPEG=OFF -DCITRON_USE_QT_MULTIMEDIA=OFF -DCITRON_USE_QT_WEB_ENGINE=OFF
- ninja
- cd ..
- echo "Build completed, checking for executables..."
@@ -130,13 +139,18 @@ build-linux-v3:
- echo "Total artifact size:"
- du -sh citron.AppImage build/bin/citron 2>/dev/null || echo "Cannot measure artifact sizes"
- echo "Compressing AppImage for upload..."
- xz -9 -c citron.AppImage > citron.AppImage.xz
- ls -la citron.AppImage.xz
- du -h citron.AppImage.xz
- echo "AppImage compressed with xz successfully"
- gzip -9 -c citron.AppImage > citron.AppImage.gz
- ls -la citron.AppImage.gz
- du -h citron.AppImage.gz
- echo "AppImage compressed with gzip successfully"
# Also create a smaller binary-only archive for fallback
- tar -czf citron-binary.tar.gz build/bin/
- ls -la citron-binary.tar.gz
- du -h citron-binary.tar.gz
artifacts:
paths:
- citron.AppImage.xz
- citron.AppImage.gz
- citron-binary.tar.gz
expire_in: 1 week
when: always
only:
@@ -166,7 +180,9 @@ build-linux-steamdeck:
- echo 'fi' >> /usr/local/bin/shasum
- chmod +x /usr/local/bin/shasum
script:
- git submodule update --init --recursive
# Clean and reset submodules to handle any inconsistencies
- git submodule deinit --all --force || true
- git submodule update --init --recursive --force
- mkdir -p build && cd build
- cmake .. -G Ninja -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_C_FLAGS="-O3 -ffast-math -funsafe-math-optimizations -fno-math-errno -fno-trapping-math -freciprocal-math -ffp-contract=fast -fassociative-math -fno-rounding-math -fno-signaling-nans -march=znver2 -mtune=znver2 -fomit-frame-pointer -fstrict-aliasing -frename-registers -fno-plt -funroll-loops -floop-interchange -floop-strip-mine -floop-block -fprefetch-loop-arrays -fpredictive-commoning -ftree-vectorize -fsplit-paths -finline-functions -finline-limit=1000 -finline-functions-called-once -fgcse-sm -fgcse-las -freorder-blocks-and-partition -fipa-pta -fipa-cp-clone -fwhole-program -flto=auto -fuse-linker-plugin -fvisibility=hidden -fdata-sections -ffunction-sections -fno-semantic-interposition -fopenmp -fexceptions -frtti" -DCMAKE_CXX_FLAGS="-O3 -ffast-math -funsafe-math-optimizations -fno-math-errno -fno-trapping-math -freciprocal-math -ffp-contract=fast -fassociative-math -fno-rounding-math -fno-signaling-nans -march=znver2 -mtune=znver2 -fomit-frame-pointer -fstrict-aliasing -frename-registers -fno-plt -funroll-loops -floop-interchange -floop-strip-mine -floop-block -fprefetch-loop-arrays -fpredictive-commoning -ftree-vectorize -fsplit-paths -finline-functions -finline-limit=1000 -finline-functions-called-once -fgcse-sm -fgcse-las -freorder-blocks-and-partition -fipa-pta -fipa-cp-clone -fwhole-program -flto=auto -fuse-linker-plugin -fvisibility=hidden -fdata-sections -ffunction-sections -fno-semantic-interposition -fopenmp -fexceptions -frtti -Wno-error -w" -DCMAKE_EXE_LINKER_FLAGS="-Wl,--gc-sections -Wl,-O2 -Wl,--as-needed" -DSDL_PIPEWIRE=OFF -DCITRON_USE_BUNDLED_VCPKG=OFF -DUSE_DISCORD_PRESENCE=OFF -DBUNDLE_SPEEX=ON -DCITRON_USE_BUNDLED_FFMPEG=OFF -DCITRON_USE_QT_MULTIMEDIA=OFF -DCITRON_USE_QT_WEB_ENGINE=OFF
- ninja
@@ -194,13 +210,18 @@ build-linux-steamdeck:
- echo "Total artifact size:"
- du -sh citron.AppImage build/bin/citron 2>/dev/null || echo "Cannot measure artifact sizes"
- echo "Compressing AppImage for upload..."
- xz -9 -c citron.AppImage > citron.AppImage.xz
- ls -la citron.AppImage.xz
- du -h citron.AppImage.xz
- echo "AppImage compressed with xz successfully"
- gzip -9 -c citron.AppImage > citron.AppImage.gz
- ls -la citron.AppImage.gz
- du -h citron.AppImage.gz
- echo "AppImage compressed with gzip successfully"
# Also create a smaller binary-only archive for fallback
- tar -czf citron-binary.tar.gz build/bin/
- ls -la citron-binary.tar.gz
- du -h citron-binary.tar.gz
artifacts:
paths:
- citron.AppImage.xz
- citron.AppImage.gz
- citron-binary.tar.gz
expire_in: 1 week
when: always
only:
@@ -234,7 +255,9 @@ build-android:
- unzip -q android-ndk-r26b-linux.zip
- export ANDROID_NDK_HOME=$PWD/android-ndk-r26b
script:
- git submodule update --init --recursive
# Clean and reset submodules to handle any inconsistencies
- git submodule deinit --all --force || true
- git submodule update --init --recursive --force
- cmake -B build-android -S . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=android-30 -DENABLE_QT=OFF -DENABLE_SDL2=OFF -DENABLE_WEB_SERVICE=OFF -DCITRON_USE_BUNDLED_VCPKG=ON -DCITRON_USE_BUNDLED_FFMPEG=ON -DANDROID_ARM_NEON=ON -DCITRON_ENABLE_LTO=ON
- cmake --build build-android --config $BUILD_TYPE --parallel $CMAKE_BUILD_PARALLEL_LEVEL
- cd src/android
@@ -261,7 +284,9 @@ test-unit:
- apt-get update -qq
- apt-get install -y -qq build-essential cmake ninja-build git
script:
- git submodule update --init --recursive
# Clean and reset submodules to handle any inconsistencies
- git submodule deinit --all --force || true
- git submodule update --init --recursive --force
- cmake -B build-test -S . -DCMAKE_BUILD_TYPE=Debug -DCITRON_TESTS=ON -DENABLE_QT=OFF -DENABLE_SDL2=OFF -DENABLE_WEB_SERVICE=OFF
- cmake --build build-test --config Debug --parallel $CMAKE_BUILD_PARALLEL_LEVEL
- cd build-test

View File

@@ -374,7 +374,11 @@ void UpdaterDialog::ShowUpdateChecking() {}
void UpdaterDialog::OnUpdateCheckCompleted(bool, const Updater::UpdateInfo&) {}
void UpdaterDialog::OnUpdateDownloadProgress(int, qint64, qint64) {}
void UpdaterDialog::OnUpdateInstallProgress(int, const QString&) {}
#ifdef _WIN32
void UpdaterDialog::OnUpdateCompleted(Updater::UpdaterService::UpdateResult, const QString&) {}
#else
void UpdaterDialog::OnUpdateCompleted(int, const QString&) {}
#endif
void UpdaterDialog::OnUpdateError(const QString&) {}
void UpdaterDialog::OnDownloadButtonClicked() {}
void UpdaterDialog::OnCancelButtonClicked() {}
@@ -391,7 +395,11 @@ void UpdaterDialog::ShowErrorState() {}
void UpdaterDialog::UpdateDownloadProgress(int, qint64, qint64) {}
void UpdaterDialog::UpdateInstallProgress(int, const QString&) {}
QString UpdaterDialog::FormatBytes(qint64) const { return QString(); }
#ifdef _WIN32
QString UpdaterDialog::GetUpdateMessage(Updater::UpdaterService::UpdateResult) const { return QString(); }
#else
QString UpdaterDialog::GetUpdateMessage(int) const { return QString(); }
#endif
#include "updater_dialog.moc"

View File

@@ -6,13 +6,13 @@
#include <memory>
#include <QDialog>
#ifdef _WIN32
#include <QProgressBar>
#include <QLabel>
#include <QPushButton>
#include <QTextBrowser>
#include <QTimer>
#ifdef _WIN32
#include "citron/updater/updater_service.h"
#else
// Forward declarations for non-Windows platforms
@@ -46,7 +46,11 @@ private slots:
void OnUpdateCheckCompleted(bool has_update, const Updater::UpdateInfo& update_info);
void OnUpdateDownloadProgress(int percentage, qint64 bytes_received, qint64 bytes_total);
void OnUpdateInstallProgress(int percentage, const QString& current_file);
#ifdef _WIN32
void OnUpdateCompleted(Updater::UpdaterService::UpdateResult result, const QString& message);
#else
void OnUpdateCompleted(int result, const QString& message);
#endif
void OnUpdateError(const QString& error_message);
void OnDownloadButtonClicked();
@@ -68,7 +72,11 @@ private:
void UpdateInstallProgress(int percentage, const QString& current_file);
QString FormatBytes(qint64 bytes) const;
#ifdef _WIN32
QString GetUpdateMessage(Updater::UpdaterService::UpdateResult result) const;
#else
QString GetUpdateMessage(int result) const;
#endif
private:
#ifdef _WIN32