actions: Linux & Source builds (#26)
Reviewed-on: #26 Co-authored-by: swurl <swurl@swurl.xyz> Co-committed-by: swurl <swurl@swurl.xyz> android build, fix appimage Signed-off-by: swurl <swurl@swurl.xyz>
This commit is contained in:
parent
b86644eae9
commit
52d851500c
8 changed files with 65 additions and 88 deletions
|
@ -2,18 +2,16 @@
|
||||||
|
|
||||||
export NDK_CCACHE=$(which ccache)
|
export NDK_CCACHE=$(which ccache)
|
||||||
|
|
||||||
if [ ! -z "${ANDROID_KEYSTORE_B64}" ]; then
|
# keystore & pass are stored locally
|
||||||
export ANDROID_KEYSTORE_FILE="${GITHUB_WORKSPACE}/ks.jks"
|
export ANDROID_KEYSTORE_FILE=~/android.keystore
|
||||||
base64 --decode <<< "${ANDROID_KEYSTORE_B64}" > "${ANDROID_KEYSTORE_FILE}"
|
export ANDROID_KEYSTORE_PASS=`cat ~/android.pass`
|
||||||
fi
|
export ANDROID_KEY_ALIAS=`cat ~/android.alias`
|
||||||
|
export ANDROID_HOME=/opt/android-sdk/
|
||||||
|
|
||||||
cd src/android
|
cd src/android
|
||||||
chmod +x ./gradlew
|
chmod +x ./gradlew
|
||||||
|
|
||||||
./gradlew assembleRelease
|
./gradlew assembleRelease
|
||||||
./gradlew bundleRelease
|
./gradlew bundleRelease
|
||||||
|
|
||||||
ccache -s -v
|
ccache -s -v
|
||||||
|
|
||||||
if [ ! -z "${ANDROID_KEYSTORE_B64}" ]; then
|
|
||||||
rm "${ANDROID_KEYSTORE_FILE}"
|
|
||||||
fi
|
|
||||||
|
|
|
@ -22,8 +22,9 @@ cmake .. -G Ninja \
|
||||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||||
-DENABLE_QT_TRANSLATION=ON \
|
-DENABLE_QT_TRANSLATION=ON \
|
||||||
-DUSE_DISCORD_PRESENCE=ON \
|
-DUSE_DISCORD_PRESENCE=ON \
|
||||||
-DYUZU_USE_BUNDLED_VCPKG=ON \
|
-DUSE_CCACHE=ON \
|
||||||
"${EXTRA_CMAKE_FLAGS[@]}"
|
"${EXTRA_CMAKE_FLAGS[@]}"
|
||||||
|
|
||||||
ninja -j4
|
ninja -j4
|
||||||
if [ -d "bin/Release" ]; then
|
if [ -d "bin/Release" ]; then
|
||||||
strip -s bin/Release/*
|
strip -s bin/Release/*
|
||||||
|
@ -37,4 +38,4 @@ else
|
||||||
ccache -s -v
|
ccache -s -v
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ctest -VV -C Release
|
#ctest -VV -C Release
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
#!/bin/bash -ex
|
#!/bin/bash -ex
|
||||||
|
|
||||||
|
# git-archive-all
|
||||||
|
export PATH="$PATH:/home/$USER/.local/bin"
|
||||||
|
|
||||||
GITDATE="`git show -s --date=short --format='%ad' | sed 's/-//g'`"
|
GITDATE="`git show -s --date=short --format='%ad' | sed 's/-//g'`"
|
||||||
GITREV="`git show -s --format='%h'`"
|
GITREV="`git show -s --format='%h'`"
|
||||||
REV_NAME="eden-unified-source-${GITDATE}-${GITREV}"
|
REV_NAME="eden-unified-source-${GITDATE}-${GITREV}"
|
||||||
|
@ -8,11 +11,10 @@ COMPAT_LIST='dist/compatibility_list/compatibility_list.json'
|
||||||
|
|
||||||
mkdir artifacts
|
mkdir artifacts
|
||||||
|
|
||||||
pip3 install git-archive-all
|
|
||||||
touch "${COMPAT_LIST}"
|
touch "${COMPAT_LIST}"
|
||||||
git describe --abbrev=0 --always HEAD > GIT-COMMIT
|
git describe --abbrev=0 --always HEAD > GIT-COMMIT
|
||||||
git describe --tags HEAD > GIT-TAG || echo 'unknown' > GIT-TAG
|
git describe --tags HEAD > GIT-TAG || echo 'unknown' > GIT-TAG
|
||||||
git archive-all --include "${COMPAT_LIST}" --include GIT-COMMIT --include GIT-TAG --force-submodules artifacts/"${REV_NAME}.tar"
|
git-archive-all --include "${COMPAT_LIST}" --include GIT-COMMIT --include GIT-TAG --force-submodules artifacts/"${REV_NAME}.tar"
|
||||||
|
|
||||||
cd artifacts/
|
cd artifacts/
|
||||||
xz -T0 -9 "${REV_NAME}.tar"
|
xz -T0 -9 "${REV_NAME}.tar"
|
||||||
|
|
74
.github/workflows/build.yml
vendored
74
.github/workflows/build.yml
vendored
|
@ -1,3 +1,6 @@
|
||||||
|
# TODO: This document needs to be formatted,
|
||||||
|
# appimage should use linuxdeploy probably
|
||||||
|
# some stuff needs cleaned up etc
|
||||||
name: eden-build
|
name: eden-build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
@ -20,7 +23,7 @@ jobs:
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: forgejo/upload-artifact@v4
|
uses: forgejo/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: source
|
name: source.zip
|
||||||
path: artifacts/
|
path: artifacts/
|
||||||
windows:
|
windows:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
@ -31,7 +34,7 @@ jobs:
|
||||||
run:
|
run:
|
||||||
shell: ${{ (matrix.target == 'msys2' && 'msys2') || 'bash' }} {0}
|
shell: ${{ (matrix.target == 'msys2' && 'msys2') || 'bash' }} {0}
|
||||||
env:
|
env:
|
||||||
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
CCACHE_DIR: ${{ runner.workspace }}/.cache/.ccache
|
||||||
CCACHE_COMPILERCHECK: content
|
CCACHE_COMPILERCHECK: content
|
||||||
CCACHE_SLOPPINESS: time_macros
|
CCACHE_SLOPPINESS: time_macros
|
||||||
OS: windows
|
OS: windows
|
||||||
|
@ -40,14 +43,9 @@ jobs:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
fetch-depth: 0
|
fetch-depth: 1
|
||||||
- name: Set up ccache
|
fetch-tags: true
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: ${{ env.CCACHE_DIR }}
|
|
||||||
key: ${{ runner.os }}-${{ matrix.target }}-ccache-${{ github.sha }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-${{ matrix.target }}-ccache-
|
|
||||||
- name: Set up vcpkg cache
|
- name: Set up vcpkg cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
|
@ -58,6 +56,7 @@ jobs:
|
||||||
key: ${{ runner.os }}-${{ matrix.target }}-vcpkg-${{ hashFiles('**/CMakeLists.txt', '**/vcpkg.json') }}-${{ github.run_id }}
|
key: ${{ runner.os }}-${{ matrix.target }}-vcpkg-${{ hashFiles('**/CMakeLists.txt', '**/vcpkg.json') }}-${{ github.run_id }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-${{ matrix.target }}-vcpkg-
|
${{ runner.os }}-${{ matrix.target }}-vcpkg-
|
||||||
|
|
||||||
- name: Set up MSVC
|
- name: Set up MSVC
|
||||||
uses: ilammy/msvc-dev-cmd@v1
|
uses: ilammy/msvc-dev-cmd@v1
|
||||||
if: ${{ matrix.target == 'msvc' }}
|
if: ${{ matrix.target == 'msvc' }}
|
||||||
|
@ -143,12 +142,12 @@ jobs:
|
||||||
if: steps.build.outcome == 'success'
|
if: steps.build.outcome == 'success'
|
||||||
uses: forgejo/upload-artifact@v4
|
uses: forgejo/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.target }}
|
name: ${{ matrix.target }}.zip
|
||||||
path: artifacts/*
|
path: artifacts/*
|
||||||
linux:
|
linux:
|
||||||
runs-on: linux
|
runs-on: linux
|
||||||
env:
|
env:
|
||||||
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
CCACHE_DIR: /home/runner/.cache/ccache
|
||||||
CCACHE_COMPILERCHECK: content
|
CCACHE_COMPILERCHECK: content
|
||||||
CCACHE_SLOPPINESS: time_macros
|
CCACHE_SLOPPINESS: time_macros
|
||||||
OS: linux
|
OS: linux
|
||||||
|
@ -157,25 +156,8 @@ jobs:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
fetch-depth: 0
|
fetch-depth: 1
|
||||||
- name: Set up cache
|
fetch-tags: true
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: ${{ env.CCACHE_DIR }}
|
|
||||||
key: ${{ runner.os }}-fresh-${{ github.sha }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-fresh-
|
|
||||||
|
|
||||||
- name: Set up vcpkg cache
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
${{ github.workspace }}/build/vcpkg_installed
|
|
||||||
${{ github.workspace }}/build/externals
|
|
||||||
${{ github.workspace }}/.vcpkg
|
|
||||||
key: ${{ runner.os }}-fresh-vcpkg-${{ hashFiles('**/CMakeLists.txt', '**/vcpkg.json') }}-${{ github.run_id }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-fresh-vcpkg-
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: ./.ci/linux.sh
|
run: ./.ci/linux.sh
|
||||||
|
@ -187,47 +169,41 @@ jobs:
|
||||||
- name: Upload Linux artifacts
|
- name: Upload Linux artifacts
|
||||||
uses: forgejo/upload-artifact@v4
|
uses: forgejo/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: linux
|
name: linux.zip
|
||||||
path: artifacts/*
|
path: artifacts/*
|
||||||
|
|
||||||
android:
|
android:
|
||||||
runs-on: android
|
runs-on: android
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
CCACHE_DIR: /home/runner/.cache/ccache
|
||||||
CCACHE_COMPILERCHECK: content
|
CCACHE_COMPILERCHECK: content
|
||||||
CCACHE_SLOPPINESS: time_macros
|
CCACHE_SLOPPINESS: time_macros
|
||||||
OS: android
|
OS: android
|
||||||
TARGET: universal
|
TARGET: universal
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
fetch-depth: 0
|
fetch-depth: 1
|
||||||
- name: Set up cache
|
fetch-tags: true
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.gradle/caches
|
|
||||||
~/.gradle/wrapper
|
|
||||||
${{ env.CCACHE_DIR }}
|
|
||||||
key: ${{ runner.os }}-android-${{ github.sha }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-android-
|
|
||||||
- name: Set tag name
|
- name: Set tag name
|
||||||
run: |
|
run: |
|
||||||
if [[ "$GITHUB_REF_TYPE" == "tag" ]]; then
|
if [[ "$GITHUB_REF_TYPE" == "tag" ]]; then
|
||||||
echo "GIT_TAG_NAME=$GITHUB_REF_NAME" >> $GITHUB_ENV
|
echo "GIT_TAG_NAME=$GITHUB_REF_NAME" >> $GITHUB_ENV
|
||||||
fi
|
fi
|
||||||
echo $GIT_TAG_NAME
|
echo $GIT_TAG_NAME
|
||||||
|
|
||||||
- name: Deps
|
- name: Deps
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update -y
|
sudo apt-get update -y
|
||||||
sudo apt-get install ccache glslang-dev glslang-tools apksigner -y
|
sudo apt-get install ccache glslang-dev glslang-tools apksigner -y
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: JAVA_HOME=$JAVA_HOME_21_X64 ./.ci/android.sh
|
run: JAVA_HOME=$JAVA_HOME_21_X64 ./.ci/android.sh
|
||||||
env:
|
|
||||||
ANDROID_KEYSTORE_B64: ${{ secrets.ANDROID_KEYSTORE_B64 }}
|
|
||||||
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
|
|
||||||
ANDROID_KEYSTORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASS }}
|
|
||||||
- name: Package Android artifacts
|
- name: Package Android artifacts
|
||||||
run: |
|
run: |
|
||||||
GITDATE="$(git show -s --date=short --format='%ad' | sed 's/-//g')"
|
GITDATE="$(git show -s --date=short --format='%ad' | sed 's/-//g')"
|
||||||
|
@ -251,5 +227,5 @@ jobs:
|
||||||
- name: Upload Android artifacts
|
- name: Upload Android artifacts
|
||||||
uses: forgejo/upload-artifact@v4
|
uses: forgejo/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: android
|
name: android.zip
|
||||||
path: artifacts/*
|
path: artifacts/*
|
||||||
|
|
2
.github/workflows/license-header.yml
vendored
2
.github/workflows/license-header.yml
vendored
|
@ -6,7 +6,7 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
license-header:
|
license-header:
|
||||||
runs-on: ubuntu-latest
|
runs-on: linux
|
||||||
container:
|
container:
|
||||||
image: opensauce04/lime3ds-build:latest
|
image: opensauce04/lime3ds-build:latest
|
||||||
options: -u 1001
|
options: -u 1001
|
||||||
|
|
|
@ -299,7 +299,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
|
||||||
|
|
||||||
# Enforce the search mode of non-required packages for better and shorter failure messages
|
# Enforce the search mode of non-required packages for better and shorter failure messages
|
||||||
find_package(enet 1.3 MODULE)
|
find_package(enet 1.3 MODULE)
|
||||||
find_package(fmt 11 REQUIRED)
|
find_package(fmt 10 REQUIRED)
|
||||||
find_package(LLVM 17.0.2 MODULE COMPONENTS Demangle)
|
find_package(LLVM 17.0.2 MODULE COMPONENTS Demangle)
|
||||||
find_package(lz4 REQUIRED)
|
find_package(lz4 REQUIRED)
|
||||||
find_package(nlohmann_json 3.8 REQUIRED)
|
find_package(nlohmann_json 3.8 REQUIRED)
|
||||||
|
|
6
dist/org.yuzu_emu.yuzu.desktop
vendored
6
dist/org.yuzu_emu.yuzu.desktop
vendored
|
@ -4,13 +4,13 @@
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Version=1.0
|
Version=1.0
|
||||||
Type=Application
|
Type=Application
|
||||||
Name=yuzu
|
Name=eden
|
||||||
GenericName=Switch Emulator
|
GenericName=Switch Emulator
|
||||||
Comment=Nintendo Switch video game console emulator
|
Comment=Nintendo Switch video game console emulator
|
||||||
Icon=org.yuzu_emu.yuzu
|
Icon=org.yuzu_emu.eden
|
||||||
TryExec=eden
|
TryExec=eden
|
||||||
Exec=eden %f
|
Exec=eden %f
|
||||||
Categories=Game;Emulator;Qt;
|
Categories=Game;Emulator;Qt;
|
||||||
MimeType=application/x-nx-nro;application/x-nx-nso;application/x-nx-nsp;application/x-nx-xci;
|
MimeType=application/x-nx-nro;application/x-nx-nso;application/x-nx-nsp;application/x-nx-xci;
|
||||||
Keywords=Nintendo;Switch;
|
Keywords=Nintendo;Switch;
|
||||||
StartupWMClass=yuzu
|
StartupWMClass=eden
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue