mirror of
https://github.com/stenzek/duckstation.git
synced 2026-04-05 21:50:48 +00:00
CI: Only build Qt frontend for cross jobs
This commit is contained in:
@@ -84,14 +84,13 @@ jobs:
|
||||
- name: Generate CMake
|
||||
shell: bash
|
||||
run: |
|
||||
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_TOOLCHAIN_FILE="$HOME/toolchain.cmake" -DHOST_MIN_PAGE_SIZE=4096 -DHOST_MAX_PAGE_SIZE=16384 -DHOST_CACHE_LINE_SIZE=64 -DBUILD_QT_FRONTEND=ON -DBUILD_MINI_FRONTEND=ON
|
||||
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_TOOLCHAIN_FILE="$HOME/toolchain.cmake" -DHOST_MIN_PAGE_SIZE=4096 -DHOST_MAX_PAGE_SIZE=16384 -DHOST_CACHE_LINE_SIZE=64
|
||||
|
||||
- name: Compile Build
|
||||
shell: bash
|
||||
run: |
|
||||
cmake --build build --parallel
|
||||
scripts/appimage/make-cross-appimage.sh duckstation-qt ${{ matrix.arch }} "$(realpath build)" "/${{ matrix.arch }}-chroot"
|
||||
scripts/appimage/make-cross-appimage.sh duckstation-mini ${{ matrix.arch }} "$(realpath build)" "/${{ matrix.arch }}-chroot"
|
||||
scripts/appimage/make-cross-appimage.sh "${{ matrix.arch }}" "$(realpath build)" "/${{ matrix.arch }}-chroot"
|
||||
|
||||
- name: Upload AppImages
|
||||
uses: actions/upload-artifact@v6
|
||||
|
||||
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
@@ -71,9 +71,7 @@ jobs:
|
||||
./artifacts/DuckStation-x64.AppImage
|
||||
./artifacts/DuckStation-x64-SSE2.AppImage
|
||||
./artifacts/DuckStation-arm64.AppImage
|
||||
./artifacts/DuckStation-Mini-arm64.AppImage
|
||||
./artifacts/DuckStation-armhf.AppImage
|
||||
./artifacts/DuckStation-Mini-armhf.AppImage
|
||||
./artifacts/duckstation-mac-release.zip
|
||||
|
||||
- name: Create Rolling Release
|
||||
@@ -97,7 +95,5 @@ jobs:
|
||||
./artifacts/DuckStation-x64.AppImage
|
||||
./artifacts/DuckStation-x64-SSE2.AppImage
|
||||
./artifacts/DuckStation-arm64.AppImage
|
||||
./artifacts/DuckStation-Mini-arm64.AppImage
|
||||
./artifacts/DuckStation-armhf.AppImage
|
||||
./artifacts/DuckStation-Mini-armhf.AppImage
|
||||
./artifacts/duckstation-mac-release.zip
|
||||
|
||||
@@ -19,15 +19,14 @@ function retry_command {
|
||||
done
|
||||
}
|
||||
|
||||
if [ "$#" -ne 4 ]; then
|
||||
echo "Syntax: $0 <duckstation-qt|duckstation-mini> <target arch> <path to build directory> <chroot dir>"
|
||||
if [ "$#" -ne 3 ]; then
|
||||
echo "Syntax: $0 <target arch> <path to build directory> <chroot dir>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
BINARY=$1
|
||||
ARCH=$2
|
||||
BUILDDIR=$3
|
||||
CHROOTDIR=$4
|
||||
ARCH=$1
|
||||
BUILDDIR=$2
|
||||
CHROOTDIR=$3
|
||||
|
||||
STRIP=llvm-strip
|
||||
|
||||
@@ -44,19 +43,7 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$BINARY" == "duckstation-qt" ]; then
|
||||
echo "Building Qt AppImage."
|
||||
ADD_QT_LIBS=true
|
||||
APPIMAGENAME="DuckStation-${ARCH}"
|
||||
elif [ "$BINARY" == "duckstation-mini" ]; then
|
||||
echo "Building Mini AppImage."
|
||||
ADD_QT_LIBS=false
|
||||
APPIMAGENAME="DuckStation-Mini-${ARCH}"
|
||||
else
|
||||
echo "Unknown binary $BINARY"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
APPDIRNAME="${APPIMAGENAME}.AppDir"
|
||||
|
||||
declare -a SYSLIBS=(
|
||||
@@ -120,7 +107,6 @@ declare -a DEPLIBS=(
|
||||
#"libva.so.2"
|
||||
)
|
||||
|
||||
if [ "${ADD_QT_LIBS}" == true ]; then
|
||||
SYSLIBS+=(
|
||||
"libatk-1.0.so.0"
|
||||
"libatk-bridge-2.0.so.0"
|
||||
@@ -208,7 +194,6 @@ if [ "${ADD_QT_LIBS}" == true ]; then
|
||||
"plugins/wayland-shell-integration"
|
||||
"plugins/xcbglintegrations"
|
||||
)
|
||||
fi
|
||||
|
||||
set -e
|
||||
IFS="
|
||||
@@ -234,11 +219,11 @@ mkdir "$OUTDIR"
|
||||
mkdir -p "$OUTDIR/usr/bin" "$OUTDIR/usr/lib"
|
||||
|
||||
echo "Copying binary and resources..."
|
||||
cp -a "$BUILDDIR/bin/$BINARY" "$BUILDDIR/bin/resources" "$BUILDDIR/bin/translations" "$OUTDIR/usr/bin"
|
||||
cp -a "$BUILDDIR/bin/duckstation-qt" "$BUILDDIR/bin/resources" "$BUILDDIR/bin/translations" "$OUTDIR/usr/bin"
|
||||
|
||||
# Patch RPATH so the binary goes hunting for shared libraries in the AppDir instead of system.
|
||||
echo "Patching RPATH in ${BINARY}..."
|
||||
patchelf --set-rpath '$ORIGIN/../lib' "$OUTDIR/usr/bin/$BINARY"
|
||||
echo "Patching RPATH in duckstation-qt..."
|
||||
patchelf --set-rpath '$ORIGIN/../lib' "$OUTDIR/usr/bin/duckstation-qt"
|
||||
|
||||
# Libraries we pull in from the system.
|
||||
echo "Copying system libraries..."
|
||||
@@ -275,7 +260,6 @@ for lib in "${DEPLIBS[@]}"; do
|
||||
"$STRIP" "$OUTDIR/usr/lib/$blib"
|
||||
done
|
||||
|
||||
if [ "${ADD_QT_LIBS}" == true ]; then
|
||||
echo "Copying Qt libraries..."
|
||||
for lib in "${QTLIBS[@]}"; do
|
||||
cp -avL "$DEPSDIR/lib/$lib" "$OUTDIR/usr/lib"
|
||||
@@ -302,7 +286,6 @@ cat > "$OUTDIR/usr/bin/qt.conf" << EOF
|
||||
Plugins = ../lib/plugins
|
||||
EOF
|
||||
|
||||
fi
|
||||
|
||||
for so in $(find $OUTDIR/usr/lib -maxdepth 1); do
|
||||
if [ -f "$so" ]; then
|
||||
@@ -326,7 +309,7 @@ mkdir -p "$OUTDIR/usr/share/metainfo"
|
||||
"$SCRIPTDIR/generate-metainfo.sh" "$OUTDIR/usr/share/metainfo"
|
||||
|
||||
# Link AppRun to main binary.
|
||||
ln -s "usr/bin/$BINARY" "$OUTDIR/AppRun"
|
||||
ln -s "usr/bin/duckstation-qt" "$OUTDIR/AppRun"
|
||||
|
||||
echo "Generating AppImage..."
|
||||
rm -f "$APPIMAGENAME.AppImage"
|
||||
|
||||
Reference in New Issue
Block a user