@@ -3,171 +3,59 @@ name: Project+ Dolphin Builder
33on : [push, pull_request]
44
55jobs :
6- build_macos :
7- name : macOS Build
8- runs-on : macos-14
9- env :
10- CCACHE_BASEDIR : ${{ github.workspace }}
11- CCACHE_DIR : ${{ github.workspace }}/.ccache
12- CCACHE_COMPRESS : true
13- CCACHE_COMPRESSLEVEL : 9
14- CCACHE_MAXSIZE : 200M
15-
6+ build_cleanup :
7+ runs-on : ubuntu-latest
168 steps :
17- - name : Checkout Repository
18- uses : actions/checkout@v4
19- with :
20- submodules : recursive
21-
22- - name : Install Packages
23- env :
24- HOMEBREW_NO_INSTALL_CLEANUP : 1
25- HOMEBREW_NO_ANALYTICS : 1
9+ -
10+ name : Check disk space
11+ run : df . -h
12+ -
13+ name : Free disk space
2614 run : |
27- brew install gnu-sed
28- if ! brew install ccache ninja; then
29- brew update
30- brew install ccache ninja
31- fi
32-
33- - name : Cache Dependencies
34- id : cache-deps
35- uses : actions/cache@v4
36- with :
37- path : ~/deps
38- key : macOS deps ${{ hashFiles('.github/workflows/scripts/macos/build-dependencies.sh') }}
39-
40- - name : Build Dependencies
41- if : steps.cache-deps.outputs.cache-hit != 'true'
42- run : .github/workflows/scripts/macos/build-dependencies.sh
43-
44- - name : Cache MoltenVK
45- id : cache-moltenvk
46- uses : actions/cache@v4
47- with :
48- path : ~/moltenvk
49- key : macOS MoltenVK ${{ hashFiles('Externals/MoltenVK') }}
50-
51- - name : Build MoltenVK
52- if : steps.cache-moltenvk.outputs.cache-hit != 'true'
15+ sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true
16+ sudo rm -rf \
17+ /usr/share/dotnet /usr/local/lib/android /opt/ghc \
18+ /usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \
19+ /usr/lib/jvm || true
20+ echo "some directories deleted"
21+ sudo apt install aptitude -y >/dev/null 2>&1
22+ sudo aptitude purge aria2 ansible azure-cli shellcheck rpm xorriso zsync \
23+ esl-erlang firefox gfortran-8 gfortran-9 google-chrome-stable \
24+ google-cloud-sdk imagemagick \
25+ libmagickcore-dev libmagickwand-dev libmagic-dev ant ant-optional kubectl \
26+ mercurial apt-transport-https mono-complete libmysqlclient \
27+ unixodbc-dev yarn chrpath libssl-dev libxft-dev \
28+ libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev \
29+ snmp pollinate libpq-dev postgresql-client powershell ruby-full \
30+ sphinxsearch subversion mongodb-org azure-cli microsoft-edge-stable \
31+ -y -f >/dev/null 2>&1
32+ sudo aptitude purge google-cloud-sdk -f -y >/dev/null 2>&1
33+ sudo aptitude purge microsoft-edge-stable -f -y >/dev/null 2>&1 || true
34+ sudo apt purge microsoft-edge-stable -f -y >/dev/null 2>&1 || true
35+ sudo aptitude purge '~n ^mysql' -f -y >/dev/null 2>&1
36+ sudo aptitude purge '~n ^php' -f -y >/dev/null 2>&1
37+ sudo aptitude purge '~n ^dotnet' -f -y >/dev/null 2>&1
38+ sudo apt-get autoremove -y >/dev/null 2>&1
39+ sudo apt-get autoclean -y >/dev/null 2>&1
40+ echo "some packages purged"
41+ -
42+ name : Check disk space
5343 run : |
54- MVK_VER="$(sed -nr 's/^.*set\(MOLTENVK_VERSION "([^"]+)".*$/\1/p' Externals/MoltenVK/CMakeLists.txt)"
55- if [ -z "$MVK_VER" ]; then
56- echo "::error::Failed to parse MoltenVK version from CMakeLists"
57- exit 1
58- fi
59- git clone --depth 1 --branch "$MVK_VER" https://github.com/KhronosGroup/MoltenVK.git mvk-build
60- pushd mvk-build
61- git apply ../Externals/MoltenVK/patches/*.patch
62- ./fetchDependencies --macos
63- make macos
64- ls -l Package/Release/MoltenVK/dynamic/*
65- chmod 755 Package/Release/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib
66- mkdir -p "$HOME/moltenvk/lib/"
67- mv Package/Release/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib "$HOME/moltenvk/lib/"
68- popd
69- rm -rf mvk-build
70-
71- # -- SETUP CCACHE - https://cristianadam.eu/20200113/speeding-up-c-plus-plus-github-actions-using-ccache/
72- - name : Prepare ccache timestamp
73- id : ccache_cache_timestamp
74- run : echo "timestamp=$(date -u "+%Y-%m-%d-%H;%M;%S")" >> $GITHUB_OUTPUT
75-
76- - name : Cache ccache cache
77- uses : actions/cache@v4
78- with :
79- path : .ccache
80- key : macOS ccache ${{ steps.ccache_cache_timestamp.outputs.timestamp }}
81- restore-keys : macOS ccache
82-
83- - name : Generate CMake Files
44+ sudo dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -nr | head
45+ df . -h
46+ sudo du /usr/ -hx -d 4 --threshold=1G | sort -hr | head
47+ -
48+ name : Checkout
49+ uses : actions/checkout@v3
50+ -
51+ name : Check working space directory
52+ run : du ${GITHUB_WORKSPACE} -h -d 1
53+ -
54+ name : Get more space
8455 run : |
85- COMMON_ARGS=(
86- -DCMAKE_PREFIX_PATH="$HOME/deps;$HOME/moltenvk"
87- -DCMAKE_BUILD_TYPE=Release
88- -DUSE_BUNDLED_MOLTENVK=OFF
89- -DMACOS_CODE_SIGNING=OFF
90- -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
91- -DCMAKE_C_COMPILER_LAUNCHER=ccache
92- -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
93- -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON
94- -DUSE_SYSTEM_LIBS=OFF
95- -DUSE_SYSTEM_BZIP2=ON
96- -DUSE_SYSTEM_CURL=ON
97- -DUSE_SYSTEM_ICONV=ON
98- -DUSE_SYSTEM_SDL2=ON
99- -GNinja
100- )
101-
102- cmake -DCMAKE_OSX_ARCHITECTURES=x86_64 \
103- -DCMAKE_SYSTEM_PROCESSOR=x86_64 \
104- -DCMAKE_SYSTEM_NAME=Darwin \
105- -DCMAKE_OSX_DEPLOYMENT_TARGET=11.00 \
106- "${COMMON_ARGS[@]}" \
107- -B build .
108- cmake -DCMAKE_OSX_ARCHITECTURES=arm64 \
109- -DCMAKE_SYSTEM_PROCESSOR=arm64 \
110- -DCMAKE_SYSTEM_NAME=Darwin \
111- -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \
112- "${COMMON_ARGS[@]}" \
113- -B build-arm .
114-
115- - name : Dolphin-Build Number
116- run : |
117- export LASTCOMMIT=$(git log --pretty=format:%H -1)
118- export DOLPHINVER="v3.1.2-mainline-beta.2"
119- echo "DOLPHIN Build $DOLPHINVER"
120- echo "DOLPHINVER=$DOLPHINVER" >> $GITHUB_ENV
121- gsed -i "s|\${DOLPHIN_WC_DESCRIBE}|$DOLPHINVER|g" Source/Core/Common/scmrev.h.in
122- - name : Build Dolphin (x86_64)
123- working-directory : build
124- run : |
125- ccache -p
126- ccache -s
127- ccache -z
128- ninja project-plus-dolphin
129- ccache -s
130-
131- - name : Build Dolphin (arm64)
132- working-directory : build-arm
133- run : |
134- ccache -p
135- ccache -s
136- ccache -z
137- ninja project-plus-dolphin
138- ccache -s
139-
140- - name : Prepare Build Artifacts
141- id : create-artifact
142- env :
143- EVENT_NAME : ${{ github.event_name }}
144- PR_TITLE : ${{ github.event.pull_request.title }}
145- PR_NUM : ${{ github.event.pull_request.number }}
146- PR_SHA : ${{ github.event.pull_request.head.sha }}
147- run : |
148- lipo -create build/Binaries/DolphinQt.app/Contents/MacOS/DolphinQt build-arm/Binaries/DolphinQt.app/Contents/MacOS/DolphinQt -o dolphin
149- mv dolphin build/Binaries/DolphinQt.app/Contents/MacOS/DolphinQt
150- TAG="$(git tag --points-at HEAD)"
151- if [ ! -z "$TAG" ]; then
152- SUFFIX="$TAG"
153- elif [ "$EVENT_NAME" == "pull_request" ]; then
154- PR_TITLE=$(echo "${PR_TITLE}" | tr -cd '[a-zA-Z0-9[:space:]]_-')
155- SUFFIX="pr[$PR_NUM]-sha[$PR_SHA]-title[$PR_TITLE"
156- SUFFIX=$(printf "%.99s]" "$SUFFIX")
157- else
158- SUFFIX="sha[$(git rev-parse --short HEAD)]"
159- fi
160- APPNAME="ProjectPlus-$SUFFIX"
161- mv build/Binaries/DolphinQt.app "$APPNAME.app"
162- tar --options xz:compression-level=9 -cvJf "$APPNAME.tar.xz" "$APPNAME.app"
163- echo "name=$APPNAME" >> "$GITHUB_OUTPUT"
164-
165- - name : Upload Artifact
166- uses : actions/upload-artifact@v4
167- with :
168- name : ${{ steps.create-artifact.outputs.name }}
169- path : " *.tar.xz"
170-
56+ df . -h
57+ sudo rm -rf ${GITHUB_WORKSPACE}/.git
58+ df . -h
17159 build_flatpak :
17260 runs-on : ubuntu-latest
17361 container :
@@ -194,140 +82,3 @@ jobs:
19482 with :
19583 manifest-path : Distribution/flatpak/flatpak.yml
19684 bundle : Project-Plus-Dolphin-${{ env.DOLPHINVER }}.flatpak
197-
198- build_appimage :
199- name : AppImage Build
200- runs-on : ubuntu-24.04
201- env :
202- yaqti : 6.7.3
203- steps :
204- - name : Checkout Upstream Repo
205- uses : actions/checkout@v4
206- with :
207- repository : Motobug/Project-Plus-Dolphin
208- ref : master
209-
210- - name : Checkout Submodules
211- if : steps.cache-submodules.outputs.cache-hit != 'true'
212- run : git submodule update --init --recursive -j $(getconf _NPROCESSORS_ONLN)
213-
214- - name : Checkout AppImage Repo
215- uses : actions/checkout@v4
216- with :
217- clean : false
218- path : ci
219-
220- # Runs the Dolphin action
221- - name : Get Date
222- id : get-date
223- run : |
224- echo "date=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
225- shell : bash
226- - name : cache
227- uses : actions/cache@v4
228- with :
229- path : ~/.ccache
230- key : build-ccache-${{ steps.get-date.outputs.date }}
231- restore-keys : |
232- build-ccache-
233- env :
234- CCACHE_MAXSIZE : 200M
235- - name : Install Qt
236- run : |
237- curl -sLO https://files.pythonhosted.org/packages/47/42/351389ca36c7adfc5f4e92d086cdb2bdbde13f1b89ee882f4a1cab2183ac/yaqti-2021.7.29-py3-none-any.whl
238- python3 -m pip install yaqti-2021.7.29-py3-none-any.whl
239- pyver=$(python3 --version | awk '{print $2}')
240- curl -sL https://raw.githubusercontent.com/qurious-pixel/yaqti/fetch/yaqti/fetchers.py -o $HOME/.local/lib/python${pyver%.*}/site-packages/yaqti/fetchers.py
241- python -m yaqti install --os linux --platform desktop --version ${{ env.yaqti }} --modules linux_gcc_64 --set-envs --install-deps
242- - name : Install Packages
243- run : |
244- sudo apt-get install -y build-essential dialog dpkg libbluetooth-dev liblz4-dev liblzma-dev libssl-dev libopus-dev libpng-dev libsystemd-dev \
245- libzip-dev libzstd-dev zlib1g-dev libasound2-dev libpulse-dev pulseaudio p7zip p7zip-full libsfml-dev libminiupnpc-dev libmbedtls-dev libpugixml-dev \
246- 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 \
247- libfmt-dev libwayland-dev libxrandr-dev libglu1-mesa-dev libcurl4-openssl-dev x11-utils zenity wget curl git gettext ccache make cmake ninja-build \
248- libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-icccm4 libxcb-image0-dev libxcb-cursor-dev
249- - name : Dolphin-Build Number
250- run : |
251- export LASTCOMMIT=$(git log --pretty=format:%H -1)
252- export DOLPHINVER="v3.1.2-mainline-beta.2"
253- echo "DOLPHIN Build $DOLPHINVER"
254- echo "DOLPHINVER=$DOLPHINVER" >> $GITHUB_ENV
255- sed -i "s|\${DOLPHIN_WC_DESCRIBE}|$DOLPHINVER|g" Source/Core/Common/scmrev.h.in
256- - name : Update Patchelf
257- run : |
258- PATCHELFVER=0.14.5
259- curl -sL https://github.com/NixOS/patchelf/releases/download/${PATCHELFVER}/patchelf-${PATCHELFVER}-x86_64.tar.gz -o /tmp/patchelf.tar.gz
260- tar -xvf /tmp/patchelf.tar.gz --directory /tmp/ ./bin/patchelf --strip-components=2
261- sudo mv /tmp/patchelf /usr/bin
262- patchelf --version
263- - name : Build Dolphin
264- run : |
265- export Qt_DIR="${{github.workspace}}/qt/${{ env.yaqti }}/gcc_64/lib/cmake/Qt6"
266- mkdir -p "$HOME/.ccache"
267- mkdir build
268- cd build
269- 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/project-plus-dolphin" -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
270- ninja
271- - name : Install Dolphin
272- run : |
273- cd build
274- ninja install
275- - name : Package Dolphin-Binary
276- run : |
277- mkdir -p $GITHUB_WORKSPACE/{artifacts,uploads}
278- cp -P build/install/usr/bin/project-plus-dolphin $GITHUB_WORKSPACE/artifacts
279- - name : Package Dolphin-AppImage
280- env :
281- QT_BASE_DIR : /qt/${{ env.yaqti }}/gcc_64
282- QTDIR : $QT_BASE_DIR
283- run : |
284- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${GITHUB_WORKSPACE}/qt/${{ env.yaqti }}/gcc_64/lib/
285- export PATH=$QT_BASE_DIR/bin:$PATH
286- echo "PATH $PATH"
287- sudo ln -s ${GITHUB_WORKSPACE}/$(find qt/ -name qmake) /usr/bin
288- qmake -v
289- cd /tmp
290- curl -sSfLO "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
291- curl -sSfLO "https://github.com/AppImage/AppImageUpdate/releases/download/continuous/AppImageUpdate-x86_64.AppImage"
292- chmod a+x linuxdeploy*.AppImage
293- chmod a+x AppImageUpdate-x86_64.AppImage
294- ./linuxdeploy-x86_64.AppImage --appimage-extract
295- 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
296- chmod a+x /tmp/squashfs-root/usr/bin/linuxdeploy-plugin-qt.AppImage
297- mv /tmp/squashfs-root/usr/bin/patchelf /tmp/squashfs-root/usr/bin/patchelf.orig
298- sudo cp /usr/bin/patchelf /tmp/squashfs-root/usr/bin/patchelf
299- cd $GITHUB_WORKSPACE
300- mkdir -p squashfs-root
301- cp -a build/install/usr $GITHUB_WORKSPACE/squashfs-root/
302- cp Data/project-plus-dolphin.svg ./squashfs-root/project-plus-dolphin.svg
303- cp Data/project-plus-dolphin.desktop ./squashfs-root/project-plus-dolphin.desktop
304- curl -sSfL https://github.com/AppImage/AppImageKit/releases/download/continuous/runtime-x86_64 -o ./squashfs-root/runtime
305- curl -sSfL "https://github.com/RPCS3/AppImageKit-checkrt/releases/download/continuous2/AppRun-patched-x86_64" -o ./squashfs-root/AppRun-patched
306- cp ci/Distribution/appimage/{AppRun,update.sh} ./squashfs-root/
307- mv /tmp/AppImageUpdate-x86_64.AppImage ./squashfs-root/usr/bin/AppImageUpdate
308- echo ${{ env.DOLPHINVER }} > ./squashfs-root/version.txt
309- chmod a+x ./squashfs-root/AppRun
310- chmod a+x ./squashfs-root/runtime
311- chmod a+x ./squashfs-root/AppRun-patched
312- chmod a+x ./squashfs-root/update.sh
313- export UPD_INFO="gh-releases-zsync|Motobug|Project-Plus-Dolphin|continuous|Project+_Dolphin-x86_64.AppImage.zsync"
314- /tmp/squashfs-root/AppRun --appdir="$GITHUB_WORKSPACE"/squashfs-root/ --plugin qt -d "$GITHUB_WORKSPACE"/squashfs-root/project-plus-dolphin.desktop -i "$GITHUB_WORKSPACE"/squashfs-root/project-plus-dolphin.svg \
315- --exclude-library=libglib* --output appimage
316- ls . | grep *.AppImage
317- mv $(ls . | grep *.AppImage) $GITHUB_WORKSPACE/artifacts
318- ls -al $GITHUB_WORKSPACE/artifacts
319- sed -i 's/AppRun.wrapped/AppRun-patched/g' "$GITHUB_WORKSPACE"/squashfs-root/AppRun
320- cat "$GITHUB_WORKSPACE"/squashfs-root/AppRun
321- /tmp/squashfs-root/usr/bin/linuxdeploy-plugin-appimage --appdir="$GITHUB_WORKSPACE"/squashfs-root/
322- ls . | grep *.AppImage
323- mv Project+_Dolphin-x86_64.AppImage $GITHUB_WORKSPACE/uploads/Dolphin_${DOLPHINVER}.AppImage
324- ls -al $GITHUB_WORKSPACE/uploads
325- continue-on-error : true
326- - name : Upload Static Build
327- uses : actions/upload-artifact@v4
328- with :
329- name : Project-Plus-Dolphin_${{ env.DOLPHINVER }}
330- path : uploads/
331- env :
332- DEFAULT_BRANCH : git-actions
333- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments