2023-12-28 14:03:44 +00:00
|
|
|
name: Ubuntu
|
2019-12-11 15:29:51 +00:00
|
|
|
|
2020-03-21 22:35:43 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
2019-12-11 15:29:51 +00:00
|
|
|
|
2024-10-24 20:05:30 +00:00
|
|
|
env:
|
|
|
|
MELONDS_GIT_BRANCH: ${{ github.ref }}
|
|
|
|
MELONDS_GIT_HASH: ${{ github.sha }}
|
|
|
|
MELONDS_BUILD_PROVIDER: GitHub Actions
|
|
|
|
|
2019-12-11 15:29:51 +00:00
|
|
|
jobs:
|
2024-02-07 21:29:13 +00:00
|
|
|
build-x86_64:
|
2023-12-28 14:03:44 +00:00
|
|
|
name: x86_64
|
2024-02-07 21:29:13 +00:00
|
|
|
runs-on: ubuntu-22.04
|
2019-12-12 20:23:57 +00:00
|
|
|
|
2019-12-11 15:29:51 +00:00
|
|
|
steps:
|
2024-02-07 21:29:13 +00:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
name: Check out sources
|
2019-12-11 15:29:51 +00:00
|
|
|
- name: Install dependencies
|
2020-12-09 22:08:48 +00:00
|
|
|
run: |
|
|
|
|
sudo rm -f /etc/apt/sources.list.d/dotnetdev.list /etc/apt/sources.list.d/microsoft-prod.list
|
|
|
|
sudo apt update
|
2024-08-10 21:20:50 +00:00
|
|
|
sudo apt install --allow-downgrades cmake ninja-build extra-cmake-modules libpcap0.8-dev libsdl2-dev libenet-dev \
|
2024-08-13 06:05:36 +00:00
|
|
|
qt6-{base,base-private,multimedia}-dev libqt6svg6-dev libarchive-dev libzstd-dev libfuse2
|
2019-12-11 15:29:51 +00:00
|
|
|
- name: Configure
|
2024-10-24 20:05:30 +00:00
|
|
|
run: cmake -B build -G Ninja -DUSE_QT6=ON -DCMAKE_INSTALL_PREFIX=/usr -DMELONDS_EMBED_BUILD_INFO=ON
|
2024-02-07 21:29:13 +00:00
|
|
|
- name: Build
|
2019-12-13 17:42:39 +00:00
|
|
|
run: |
|
2024-02-07 21:29:13 +00:00
|
|
|
cmake --build build
|
|
|
|
DESTDIR=AppDir cmake --install build
|
|
|
|
- uses: actions/upload-artifact@v4
|
2019-12-13 03:06:57 +00:00
|
|
|
with:
|
2021-06-13 12:06:15 +00:00
|
|
|
name: melonDS-ubuntu-x86_64
|
2024-02-07 21:29:13 +00:00
|
|
|
path: AppDir/usr/bin/melonDS
|
|
|
|
- name: Fetch AppImage tools
|
|
|
|
run: |
|
|
|
|
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
|
|
|
|
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
|
|
|
|
chmod a+x linuxdeploy-*.AppImage
|
|
|
|
- name: Build the AppImage
|
|
|
|
env:
|
|
|
|
QMAKE: /usr/lib/qt6/bin/qmake
|
|
|
|
run: |
|
|
|
|
./linuxdeploy-x86_64.AppImage --appdir AppDir --plugin qt --output appimage
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: melonDS-appimage-x86_64
|
|
|
|
path: melonDS*.AppImage
|
|
|
|
|
|
|
|
build-aarch64:
|
|
|
|
name: aarch64
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container: ubuntu:22.04
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Prepare system
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
dpkg --add-architecture arm64
|
|
|
|
sh -c "sed \"s|^deb \([a-z\.:/]*\) \([a-z\-]*\) \(.*\)$|deb [arch=amd64] \1 \2 \3\ndeb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports \2 \3|\" /etc/apt/sources.list > /etc/apt/sources.list.new"
|
|
|
|
rm /etc/apt/sources.list
|
|
|
|
mv /etc/apt/sources.list{.new,}
|
|
|
|
apt update
|
|
|
|
apt -y full-upgrade
|
|
|
|
apt -y install git {gcc-12,g++-12}-aarch64-linux-gnu cmake ninja-build extra-cmake-modules \
|
2024-08-13 06:05:36 +00:00
|
|
|
{libsdl2,qt6-{base,base-private,multimedia},libqt6svg6,libarchive,libzstd,libenet}-dev:arm64 \
|
2024-02-07 21:29:13 +00:00
|
|
|
pkg-config dpkg-dev
|
|
|
|
- name: Check out source
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Configure
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
cmake -B build -G Ninja \
|
|
|
|
-DPKG_CONFIG_EXECUTABLE=/usr/bin/aarch64-linux-gnu-pkg-config \
|
|
|
|
-DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc-12 \
|
|
|
|
-DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++-12 \
|
2024-10-24 20:05:30 +00:00
|
|
|
-DUSE_QT6=ON \
|
|
|
|
-DMELONDS_EMBED_BUILD_INFO=ON
|
2024-02-07 21:29:13 +00:00
|
|
|
- name: Build
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
cmake --build build
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: melonDS-ubuntu-aarch64
|
|
|
|
path: build/melonDS
|