Address review comments

This splits the Linux workflow and build script into linux and linux-arm64.
This commit is contained in:
TGP17 2023-10-02 16:30:53 +02:00 committed by GitHub
parent 6a06833ff1
commit aa681d2c0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 63 additions and 40 deletions

21
.ci/linux-arm64.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/sh -ex
mkdir build && cd build
cmake .. -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc-11 \
-DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++-11 \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DENABLE_ASM=OFF \
-DENABLE_QT_TRANSLATION=ON \
-DCITRA_ENABLE_COMPATIBILITY_REPORTING=ON \
-DCITRA_ENABLE_BUNDLE_TARGET=OFF \
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \
-DUSE_DISCORD_PRESENCE=ON
ninja
DESTDIR="$PWD/AppDir" ninja install
7z a AppDir.7z AppDir
mkdir bundle
mv AppDir.7z ./bundle

View File

@ -1,28 +1,5 @@
#!/bin/sh -ex
if [ "$TARGET" = "arm64-appimage" ]; then
mkdir build && cd build
CC=aarch64-linux-gnu-gcc-11 CXX=aarch64-linux-gnu-g++-11 cmake .. -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DENABLE_ASM=OFF \
-DENABLE_QT_TRANSLATION=ON \
-DCITRA_ENABLE_COMPATIBILITY_REPORTING=ON \
-DCITRA_ENABLE_BUNDLE_TARGET=OFF \
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \
-DUSE_DISCORD_PRESENCE=ON
ninja
DESTDIR="$PWD/AppDir" ninja install
mv ./AppDir/usr/local/* ./AppDir/usr
rm -rf ./AppDir/usr/local
sed -e s/PrefersNonDefaultGPU=true//g -i ./AppDir/usr/share/applications/citra-qt.desktop
7z a AppDir.7z AppDir
mkdir bundle
mv AppDir.7z ./bundle
else
mkdir build && cd build
cmake .. -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
@ -41,4 +18,3 @@ ninja
ccache -s
ctest -VV -C Release
fi

View File

@ -26,7 +26,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
target: ["appimage", "arm64-appimage", "fresh"]
target: ["appimage", "fresh"]
container:
image: citraemu/build-environments:linux-${{ matrix.target }}
options: -u 1001
@ -47,15 +47,6 @@ jobs:
${{ runner.os }}-${{ matrix.target }}-
- name: Build
run: ./.ci/linux.sh
- name: Prepare outputs for caching
run: mv ./build/bundle $OS-$TARGET
if: ${{ matrix.target == 'arm64-appimage' }}
- name: Cache outputs for ARM64 AppImage packaging
uses: actions/cache/save@v3
if: ${{ matrix.target == 'arm64-appimage' }}
with:
path: ${{ env.OS }}-${{ env.TARGET }}
key: ${{ runner.os }}-${{ matrix.target }}-${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }}
- name: Pack
run: ./.ci/pack.sh
if: ${{ matrix.target == 'appimage' }}
@ -65,12 +56,46 @@ jobs:
with:
name: ${{ env.OS }}-${{ env.TARGET }}
path: artifacts/
linux-arm64:
runs-on: ubuntu-latest
strategy:
matrix:
target: ["arm64-appimage"]
container:
image: citraemu/build-environments:linux-${{ matrix.target }}
options: -u 1001
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
OS: linux
TARGET: ${{ matrix.target }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up cache
uses: actions/cache@v3
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ runner.os }}-${{ matrix.target }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-${{ matrix.target }}-
- name: Build
run: ./.ci/linux-arm64.sh
- name: Prepare outputs for caching
run: mv ./build/bundle $OS-$TARGET
if: ${{ matrix.target == 'arm64-appimage' }}
- name: Cache outputs for ARM64 AppImage packaging
uses: actions/cache/save@v3
if: ${{ matrix.target == 'arm64-appimage' }}
with:
path: ${{ env.OS }}-${{ env.TARGET }}
key: ${{ runner.os }}-${{ matrix.target }}-${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }}
linux-arm64-appimage:
runs-on: ubuntu-20.04
strategy:
matrix:
target: ["arm64-appimage"]
needs: linux
needs: linux-arm64
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
OS: linux

View File

@ -37,7 +37,4 @@ if [ -n "$cxxpath" ] || [ -n "$gccpath" ]; then
fi
fi
#echo ">>>>> $LD_LIBRARY_PATH"
#echo ">>>>> $LD_PRELOAD"
exec "$binary" "$@"

View File

@ -1,5 +1,9 @@
# Prepare AppDir
mv ./linux-arm64-appimage/AppDir.7z ./AppDir.7z
7z x AppDir.7z
mv ./AppDir/usr/local/* ./AppDir/usr
rm -rf ./AppDir/usr/local
sed -e s/PrefersNonDefaultGPU=true//g -i ./AppDir/usr/share/applications/citra-qt.desktop
# Seperate AppDir for all Citra executables
cp -r AppDir AppDir-qt