Files
melonDS/.github/workflows/build-ubuntu.yml
Nadia Holmquist Pedersen 9976ed78b3 let's try reusing the build for the AppImage
removes the need to build everything twice
2024-02-01 19:23:51 +01:00

70 lines
2.2 KiB
YAML

name: Ubuntu
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
name: x86_64
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
name: Check out sources
- name: Install dependencies
run: |
sudo rm -f /etc/apt/sources.list.d/dotnetdev.list /etc/apt/sources.list.d/microsoft-prod.list
sudo apt update
sudo apt install --allow-downgrades cmake ninja-build extra-cmake-modules libpcap0.8-dev libsdl2-dev \
qt6-{base,base-private,multimedia}-dev libslirp0 libslirp-dev libarchive-dev libzstd-dev --allow-downgrades
- name: Configure
run: cmake -B build -G Ninja -DUSE_QT6=ON -DCMAKE_INSTALL_PREFIX=/
- name: Build
run: |
cmake --build build
mkdir dist
DESTDIR="$PWD/dist" cmake --install build
- uses: actions/upload-artifact@v4
with:
name: melonDS-ubuntu-x86_64
path: ${{runner.workspace}}/build/dist
appimage:
name: AppImage
runs-on: ubuntu-22.04
needs: [ build ]
continue-on-error: true
steps:
- name: Install dependencies
run: |
sudo apt update
sudo apt install --allow-downgrades \
libpcap0.8-dev libsdl2-dev qt6-{base,base-private,multimedia,tools}-dev qt6-qpa-plugins \
libslirp0 libarchive libzstd libfuse2
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: melonDS-ubuntu-x86_64
path: AppDir
- name: Prepare necessary Tools for building the AppImage
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-x86_64.AppImage
chmod a+x linuxdeploy-plugin-qt-x86_64.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