Skip to content

Commit ae1995e

Browse files
committed
Small fix for macOS build + linux appimage test
1 parent 5dd4e8d commit ae1995e

File tree

2 files changed

+152
-1
lines changed

2 files changed

+152
-1
lines changed
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
name: Dolphin-AppImage
2+
3+
on:
4+
push:
5+
workflow_dispatch:
6+
schedule:
7+
- cron: "15 0 * * 3"
8+
9+
jobs:
10+
dolphin-appimage:
11+
name: Project Plus Dolphin bundled as appimage
12+
runs-on: ubuntu-24.04
13+
env:
14+
yaqti: 6.7.3
15+
steps:
16+
- name: Checkout Upstream Repo
17+
uses: actions/checkout@v4
18+
with:
19+
repository: dolphin-emu/dolphin
20+
ref: master
21+
22+
- name: Checkout Submodules
23+
if: steps.cache-submodules.outputs.cache-hit != 'true'
24+
run: git submodule update --init --recursive -j $(getconf _NPROCESSORS_ONLN)
25+
26+
- name: Checkout AppImage Repo
27+
uses: actions/checkout@v4
28+
with:
29+
clean: false
30+
path: ci
31+
32+
# Runs the Dolphin action
33+
- name: Get Date
34+
id: get-date
35+
run: |
36+
echo "date=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
37+
shell: bash
38+
- name: cache
39+
uses: actions/cache@v4
40+
with:
41+
path: ~/.ccache
42+
key: build-ccache-${{ steps.get-date.outputs.date }}
43+
restore-keys: |
44+
build-ccache-
45+
env:
46+
CCACHE_MAXSIZE: 200M
47+
- name: Install Qt
48+
run: |
49+
curl -sLO https://files.pythonhosted.org/packages/47/42/351389ca36c7adfc5f4e92d086cdb2bdbde13f1b89ee882f4a1cab2183ac/yaqti-2021.7.29-py3-none-any.whl
50+
python3 -m pip install yaqti-2021.7.29-py3-none-any.whl
51+
pyver=$(python3 --version | awk '{print $2}')
52+
curl -sL https://raw.githubusercontent.com/qurious-pixel/yaqti/fetch/yaqti/fetchers.py -o $HOME/.local/lib/python${pyver%.*}/site-packages/yaqti/fetchers.py
53+
python -m yaqti install --os linux --platform desktop --version ${{ env.yaqti }} --modules linux_gcc_64 --set-envs --install-deps
54+
- name: Install Packages
55+
run: |
56+
sudo apt-get install -y build-essential dialog dpkg libbluetooth-dev liblz4-dev liblzma-dev libssl-dev libopus-dev libpng-dev libsystemd-dev \
57+
libzip-dev libzstd-dev zlib1g-dev libasound2-dev libpulse-dev pulseaudio p7zip p7zip-full libsfml-dev libminiupnpc-dev libmbedtls-dev libpugixml-dev \
58+
libbz2-dev liblzo2-dev libxi-dev libavcodec-dev libudev-dev libusb-1.0-0-dev libevdev-dev libc6-dev libhidapi-dev libavformat-dev libavdevice-dev \
59+
libfmt-dev libwayland-dev libxrandr-dev libglu1-mesa-dev libcurl4-openssl-dev x11-utils zenity wget curl git gettext ccache make cmake ninja-build \
60+
libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-icccm4 libxcb-image0-dev libxcb-cursor-dev
61+
- name: Dolphin-Build Number
62+
run: |
63+
export LASTCOMMIT=$(git log --pretty=format:%H -1)
64+
export DOLPHINVER=$(wget -qO- https://dolphin-emu.org/download/dev/${LASTCOMMIT} | grep '<title>' | awk '{print $NF}' | cut -d '<' -f 1)
65+
echo "DOLPHIN Build $DOLPHINVER"
66+
echo "DOLPHINVER=$DOLPHINVER" >> $GITHUB_ENV
67+
sed -i "s|\${DOLPHIN_WC_DESCRIBE}|$DOLPHINVER|g" Source/Core/Common/scmrev.h.in
68+
- name: Update Patchelf
69+
run: |
70+
PATCHELFVER=0.14.5
71+
curl -sL https://github.com/NixOS/patchelf/releases/download/${PATCHELFVER}/patchelf-${PATCHELFVER}-x86_64.tar.gz -o /tmp/patchelf.tar.gz
72+
tar -xvf /tmp/patchelf.tar.gz --directory /tmp/ ./bin/patchelf --strip-components=2
73+
sudo mv /tmp/patchelf /usr/bin
74+
patchelf --version
75+
- name: Build Dolphin
76+
run: |
77+
export Qt_DIR="${{github.workspace}}/qt/${{ env.yaqti }}/gcc_64/lib/cmake/Qt6"
78+
mkdir -p "$HOME/.ccache"
79+
mkdir build
80+
cd build
81+
cmake .. -GNinja -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc-13 -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++-13 -DCMAKE_PREFIX_PATH="${{github.workspace}}/qt/${{ env.yaqti }}/gcc_64/" -Ddatadir:PATH="share/dolphin-emu" -DBIN_INSTALL_DIR="install/usr/bin" -DCMAKE_INSTALL_PREFIX="install/usr" -DINC_INSTALL_DIR="install/usr/include" -DLIB_INSTALL_DIR="install/usr/lib" -DPKGCONFIG_INSTALL_DIR="install/usr/lib/pkgconfig" -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DENABLE_NOGUI=OFF
82+
ninja
83+
- name: Install Dolphin
84+
run: |
85+
cd build
86+
ninja install
87+
- name: Package Dolphin-Binary
88+
run: |
89+
mkdir -p $GITHUB_WORKSPACE/{artifacts,uploads}
90+
cp -P build/install/usr/bin/dolphin-emu $GITHUB_WORKSPACE/artifacts
91+
- name: Package Dolphin-AppImage
92+
env:
93+
QT_BASE_DIR: /qt/${{ env.yaqti }}/gcc_64
94+
QTDIR: $QT_BASE_DIR
95+
run: |
96+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${GITHUB_WORKSPACE}/qt/${{ env.yaqti }}/gcc_64/lib/
97+
export PATH=$QT_BASE_DIR/bin:$PATH
98+
echo "PATH $PATH"
99+
sudo ln -s ${GITHUB_WORKSPACE}/$(find qt/ -name qmake) /usr/bin
100+
qmake -v
101+
cd /tmp
102+
curl -sSfLO "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
103+
curl -sSfLO "https://github.com/AppImage/AppImageUpdate/releases/download/continuous/AppImageUpdate-x86_64.AppImage"
104+
chmod a+x linuxdeploy*.AppImage
105+
chmod a+x AppImageUpdate-x86_64.AppImage
106+
./linuxdeploy-x86_64.AppImage --appimage-extract
107+
curl -sSfL "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage" -o /tmp/squashfs-root/usr/bin/linuxdeploy-plugin-qt.AppImage
108+
chmod a+x /tmp/squashfs-root/usr/bin/linuxdeploy-plugin-qt.AppImage
109+
mv /tmp/squashfs-root/usr/bin/patchelf /tmp/squashfs-root/usr/bin/patchelf.orig
110+
sudo cp /usr/bin/patchelf /tmp/squashfs-root/usr/bin/patchelf
111+
cd $GITHUB_WORKSPACE
112+
mkdir -p squashfs-root
113+
cp -a build/install/usr $GITHUB_WORKSPACE/squashfs-root/
114+
cp Data/dolphin-emu.svg ./squashfs-root/dolphin-emu.svg
115+
cp Data/dolphin-emu.desktop ./squashfs-root/dolphin-emu.desktop
116+
curl -sSfL https://github.com/AppImage/AppImageKit/releases/download/continuous/runtime-x86_64 -o ./squashfs-root/runtime
117+
curl -sSfL "https://github.com/RPCS3/AppImageKit-checkrt/releases/download/continuous2/AppRun-patched-x86_64" -o ./squashfs-root/AppRun-patched
118+
cp ci/travis/appimage/{AppRun,update.sh} ./squashfs-root/
119+
mv /tmp/AppImageUpdate-x86_64.AppImage ./squashfs-root/usr/bin/AppImageUpdate
120+
echo ${{ env.DOLPHINVER }} > ./squashfs-root/version.txt
121+
chmod a+x ./squashfs-root/AppRun
122+
chmod a+x ./squashfs-root/runtime
123+
chmod a+x ./squashfs-root/AppRun-patched
124+
chmod a+x ./squashfs-root/update.sh
125+
export UPD_INFO="gh-releases-zsync|qurious-pixel|dolphin|continuous|Dolphin_Emulator-x86_64.AppImage.zsync"
126+
/tmp/squashfs-root/AppRun --appdir="$GITHUB_WORKSPACE"/squashfs-root/ --plugin qt -d "$GITHUB_WORKSPACE"/squashfs-root/dolphin-emu.desktop -i "$GITHUB_WORKSPACE"/squashfs-root/dolphin-emu.svg \
127+
--exclude-library=libglib* --output appimage
128+
ls . | grep *.AppImage
129+
mv $(ls . | grep *.AppImage) $GITHUB_WORKSPACE/artifacts
130+
ls -al $GITHUB_WORKSPACE/artifacts
131+
sed -i 's/AppRun.wrapped/AppRun-patched/g' "$GITHUB_WORKSPACE"/squashfs-root/AppRun
132+
cat "$GITHUB_WORKSPACE"/squashfs-root/AppRun
133+
/tmp/squashfs-root/usr/bin/linuxdeploy-plugin-appimage --appdir="$GITHUB_WORKSPACE"/squashfs-root/
134+
ls . | grep *.AppImage
135+
mv Dolphin_Emulator-x86_64.AppImage $GITHUB_WORKSPACE/uploads/Dolphin_${DOLPHINVER}.AppImage
136+
ls -al $GITHUB_WORKSPACE/uploads
137+
continue-on-error: true
138+
- name: Upload Static Build
139+
uses: actions/upload-artifact@v4
140+
with:
141+
name: Project-Plus-Dolphin_${{ env.DOLPHINVER }}
142+
path: uploads/
143+
- name: Upload Dolphin
144+
run: |
145+
ls -al artifacts/
146+
wget -c https://github.com/tcnksm/ghr/releases/download/v0.13.0/ghr_v0.13.0_linux_amd64.tar.gz
147+
tar xfv ghr_v0.13.0_linux_amd64.tar.gz
148+
ghr_v0.13.0_linux_amd64/ghr -u qurious-pixel -r dolphin -recreate -n 'Continuous build' -b "$(printf "DOLPHIN Build ${{ env.DOLPHINVER }}\nGitHub https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID")" continuous artifacts/
149+
env:
150+
DEFAULT_BRANCH: git-actions
151+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/macos_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ jobs:
149149
else
150150
SUFFIX="sha[$(git rev-parse --short HEAD)]"
151151
fi
152-
APPNAME="PrimeHack-$SUFFIX"
152+
APPNAME="ProjectPlus-$SUFFIX"
153153
mv build/Binaries/DolphinQt.app "$APPNAME.app"
154154
tar --options xz:compression-level=9 -cvJf "$APPNAME.tar.xz" "$APPNAME.app"
155155
echo "name=$APPNAME" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)