mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-22 19:40:05 +00:00
Address review comments
This splits the Linux workflow and build script into linux and linux-arm64.
This commit is contained in:
parent
6a06833ff1
commit
aa681d2c0f
21
.ci/linux-arm64.sh
Executable file
21
.ci/linux-arm64.sh
Executable 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
|
24
.ci/linux.sh
24
.ci/linux.sh
@ -1,28 +1,5 @@
|
|||||||
#!/bin/sh -ex
|
#!/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
|
mkdir build && cd build
|
||||||
cmake .. -G Ninja \
|
cmake .. -G Ninja \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
@ -41,4 +18,3 @@ ninja
|
|||||||
ccache -s
|
ccache -s
|
||||||
|
|
||||||
ctest -VV -C Release
|
ctest -VV -C Release
|
||||||
fi
|
|
||||||
|
47
.github/workflows/build.yml
vendored
47
.github/workflows/build.yml
vendored
@ -26,7 +26,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
target: ["appimage", "arm64-appimage", "fresh"]
|
target: ["appimage", "fresh"]
|
||||||
container:
|
container:
|
||||||
image: citraemu/build-environments:linux-${{ matrix.target }}
|
image: citraemu/build-environments:linux-${{ matrix.target }}
|
||||||
options: -u 1001
|
options: -u 1001
|
||||||
@ -47,15 +47,6 @@ jobs:
|
|||||||
${{ runner.os }}-${{ matrix.target }}-
|
${{ runner.os }}-${{ matrix.target }}-
|
||||||
- name: Build
|
- name: Build
|
||||||
run: ./.ci/linux.sh
|
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
|
- name: Pack
|
||||||
run: ./.ci/pack.sh
|
run: ./.ci/pack.sh
|
||||||
if: ${{ matrix.target == 'appimage' }}
|
if: ${{ matrix.target == 'appimage' }}
|
||||||
@ -65,12 +56,46 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: ${{ env.OS }}-${{ env.TARGET }}
|
name: ${{ env.OS }}-${{ env.TARGET }}
|
||||||
path: artifacts/
|
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:
|
linux-arm64-appimage:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
target: ["arm64-appimage"]
|
target: ["arm64-appimage"]
|
||||||
needs: linux
|
needs: linux-arm64
|
||||||
env:
|
env:
|
||||||
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
||||||
OS: linux
|
OS: linux
|
||||||
|
3
dist/appimage/AppRun.wrapped.sh
vendored
3
dist/appimage/AppRun.wrapped.sh
vendored
@ -37,7 +37,4 @@ if [ -n "$cxxpath" ] || [ -n "$gccpath" ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#echo ">>>>> $LD_LIBRARY_PATH"
|
|
||||||
#echo ">>>>> $LD_PRELOAD"
|
|
||||||
|
|
||||||
exec "$binary" "$@"
|
exec "$binary" "$@"
|
||||||
|
4
dist/appimage/package-appimage-arm64.sh
vendored
4
dist/appimage/package-appimage-arm64.sh
vendored
@ -1,5 +1,9 @@
|
|||||||
|
# Prepare AppDir
|
||||||
mv ./linux-arm64-appimage/AppDir.7z ./AppDir.7z
|
mv ./linux-arm64-appimage/AppDir.7z ./AppDir.7z
|
||||||
7z x 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
|
# Seperate AppDir for all Citra executables
|
||||||
cp -r AppDir AppDir-qt
|
cp -r AppDir AppDir-qt
|
||||||
|
Loading…
Reference in New Issue
Block a user