mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-02 14:19:02 +00:00
unify build scripts
This commit is contained in:
parent
9ef643ba37
commit
ab8cc6cd26
6 changed files with 73 additions and 163 deletions
72
.github/workflows/ci.yml
vendored
Normal file
72
.github/workflows/ci.yml
vendored
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
name: Combined CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, macos-14, windows-latest]
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
container: bilelmoussaoui/flatpak-github-actions:gnome-44
|
||||||
|
build_type: flatpak
|
||||||
|
- os: ubuntu-latest
|
||||||
|
build_type: AppImage
|
||||||
|
- os: macos-13
|
||||||
|
build_type: macOS
|
||||||
|
- os: windows-latest
|
||||||
|
build_type: win32
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup Submodules
|
||||||
|
if: matrix.build_type != 'flatpak'
|
||||||
|
run: git submodule update --init --recursive
|
||||||
|
|
||||||
|
- name: Setup Packages
|
||||||
|
if: matrix.os == 'ubuntu-latest' && matrix.build_type == 'flatpak'
|
||||||
|
run: |
|
||||||
|
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||||
|
sudo flatpak install org.kde.Sdk//5.15 org.kde.Platform//5.15 -y
|
||||||
|
sudo dnf install libusb1-devel cmake git gcc-c++ libXext-devel libgudev qt6-qtbase-devel systemd-devel openal-soft-devel libevdev-devel libao-devel SOIL-devel libXrandr-devel pulseaudio-libs-devel bluez-libs-devel p7zip SDL2-devel -y
|
||||||
|
|
||||||
|
- name: Setup Packages
|
||||||
|
if: matrix.os == 'ubuntu-latest' && matrix.build_type == 'AppImage'
|
||||||
|
run: sudo apt install desktop-file-utils git cmake ffmpeg libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libevdev-dev libusb-1.0-0-dev libxrandr-dev libxi-dev libpangocairo-1.0-0 qt6-base-private-dev libqt6svg6-dev libbluetooth-dev libasound2-dev libpulse-dev libgl1-mesa-dev libcurl4-openssl-dev
|
||||||
|
|
||||||
|
- name: Setup Packages
|
||||||
|
if: matrix.os == 'macos-13'
|
||||||
|
run: brew install qt6 molten-vk p7zip pkgconfig cmake ninja
|
||||||
|
|
||||||
|
- name: Setup MSBuild
|
||||||
|
if: matrix.os == 'windows-latest'
|
||||||
|
uses: microsoft/setup-msbuild@v1.0.2
|
||||||
|
with:
|
||||||
|
vs-version: '16.6.2'
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
if [ "${{ matrix.build_type }}" == "flatpak" ]; then
|
||||||
|
flatpak-builder --user --install --force-clean build-dir Distribution/flatpak.yml
|
||||||
|
elif [ "${{ matrix.build_type }}" == "AppImage" ]; then
|
||||||
|
mkdir -p build && cd build && cmake .. -G Ninja -DLINUX_LOCAL_DEV=true -DCMAKE_INSTALL_PREFIX=/usr -DDISTRIBUTOR="Mario Party Netplay" && ninja -j8
|
||||||
|
elif [ "${{ matrix.build_type }}" == "macOS" ]; then
|
||||||
|
mkdir -p build && cd build && cmake .. -G Ninja -DCMAKE_CXX_FLAGS="-Xclang -fcolor-diagnostics" -DCMAKE_PREFIX_PATH=$(brew --prefix qt6) -DDISTRIBUTOR="Mario Party Netplay" && ninja -j8
|
||||||
|
elif [ "${{ matrix.build_type }}" == "win32" ]; then
|
||||||
|
msbuild "D:\a\Dolphin-MPN\Dolphin-MPN\Source\dolphin-emu.sln" /verbosity:minimal /property:Configuration=Release /property:Platform=x64
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Upload Build Artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: DolphinMPN-${{ matrix.build_type }}
|
||||||
|
path: |
|
||||||
|
${{ matrix.build_type == 'macOS' && github.workspace }}/build/Binaries/
|
||||||
|
${{ matrix.build_type == 'win32' && github.workspace }}/Binary/x64/
|
||||||
|
${{ matrix.build_type == 'AppImage' && github.workspace }}/root/
|
||||||
|
${{ matrix.build_type == 'flatpak' && github.workspace }}/Distribution/OUT/
|
37
.github/workflows/linux-appimage.yml
vendored
37
.github/workflows/linux-appimage.yml
vendored
|
@ -1,37 +0,0 @@
|
||||||
name: Linux-AppImage CI
|
|
||||||
|
|
||||||
# Controls when the action will run. Triggers the workflow on push or pull request
|
|
||||||
# events but only for the master branch
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
||||||
jobs:
|
|
||||||
# This workflow contains a single job called "build"
|
|
||||||
build:
|
|
||||||
# The type of runner that the job will run on
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
|
||||||
steps:
|
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
# Submoudle
|
|
||||||
- name: Checkout Submodules
|
|
||||||
run: git submodule update --init --recursive
|
|
||||||
# Setup Packages
|
|
||||||
- name: Setup Packages
|
|
||||||
run: sudo apt install desktop-file-utils git cmake ffmpeg libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libevdev-dev libusb-1.0-0-dev libxrandr-dev libxi-dev libpangocairo-1.0-0 qt6-base-private-dev libqt6svg6-dev libbluetooth-dev libasound2-dev libpulse-dev libgl1-mesa-dev libcurl4-openssl-dev
|
|
||||||
# Run MSBuild
|
|
||||||
- name: Build Solution
|
|
||||||
run: mkdir -p build && cd build && cmake .. -G Ninja -DLINUX_LOCAL_DEV=true -DCMAKE_INSTALL_PREFIX=/usr -DDISTRIBUTOR="Mario Party Netplay"
|
|
||||||
# Build Project
|
|
||||||
- name: Run Ninja
|
|
||||||
run: cd build && ninja -j8
|
|
||||||
# Upload Artifact
|
|
||||||
- name: Upload Build Artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: DolphinMPN-macOS
|
|
||||||
path: /Users/runner/work/Dolphin-MPN/Dolphin-MPN/root/
|
|
49
.github/workflows/linux-flatpak.yml
vendored
49
.github/workflows/linux-flatpak.yml
vendored
|
@ -1,49 +0,0 @@
|
||||||
# This is a basic workflow to help you get started with Actions
|
|
||||||
|
|
||||||
name: Linux-Flatpak CI
|
|
||||||
|
|
||||||
# Controls when the action will run. Triggers the workflow on push or pull request
|
|
||||||
# events but only for the master branch
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
||||||
jobs:
|
|
||||||
# This workflow contains a single job called "build"
|
|
||||||
build:
|
|
||||||
# The type of runner that the job will run on
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: bilelmoussaoui/flatpak-github-actions:gnome-44
|
|
||||||
options: --privileged
|
|
||||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
|
||||||
steps:
|
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
# Purge .git for space reasons
|
|
||||||
- name: Purge .git for space reasons
|
|
||||||
run: rm -rf /home/runner/work/Dolphin-MPN/Dolphin-MPN/.git
|
|
||||||
# Setup Packages
|
|
||||||
- name: Setup Packages
|
|
||||||
run: sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo && sudo flatpak install org.kde.Sdk//5.15 org.kde.Platform//5.15 -y && sudo dnf install libusb1-devel cmake git gcc-c++ libXext-devel libgudev qt6-qtbase-devel systemd-devel openal-soft-devel libevdev-devel libao-devel SOIL-devel libXrandr-devel pulseaudio-libs-devel bluez-libs-devel p7zip SDL2-devel -y
|
|
||||||
# Run Flatpak Builder
|
|
||||||
- name: Run Flatpak Builder
|
|
||||||
uses: flatpak/flatpak-github-actions@v2
|
|
||||||
with:
|
|
||||||
# The relative path of the manifest file.
|
|
||||||
manifest-path: Distribution/flatpak.yml
|
|
||||||
# The bundle name, by default it's app.flatpak
|
|
||||||
bundle: DolphinMPN-linux.flatpak
|
|
||||||
# Upload Artifact
|
|
||||||
- name: Upload Build Artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: DolphinMPN-Linux-flatpak
|
|
||||||
path: /home/runner/work/Dolphin-MPN/Dolphin-MPN/.flatpak/OUT
|
|
||||||
# New Release
|
|
||||||
- name: New Release
|
|
||||||
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
|
||||||
uses: ncipollo/release-action@v1.12.0
|
|
||||||
with:
|
|
||||||
artifacts: /home/runner/work/Dolphin-MPN/Dolphin-MPN/.flatpak/OUT/DolphinMPN-linux.flatpak
|
|
40
.github/workflows/macos.yml
vendored
40
.github/workflows/macos.yml
vendored
|
@ -1,40 +0,0 @@
|
||||||
name: macOS CI
|
|
||||||
|
|
||||||
# Controls when the action will run. Triggers the workflow on push or pull request
|
|
||||||
# events but only for the master branch
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
||||||
jobs:
|
|
||||||
# This workflow contains a single job called "build"
|
|
||||||
build:
|
|
||||||
# The type of runner that the job will run on
|
|
||||||
runs-on: macos-14
|
|
||||||
|
|
||||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
|
||||||
steps:
|
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
# Submoudle
|
|
||||||
- name: Checkout Submodules
|
|
||||||
run: git submodule update --init --recursive
|
|
||||||
# Setup Packages
|
|
||||||
- name: Setup Packages
|
|
||||||
run: brew install qt6 molten-vk p7zip pkgconfig cmake ninja
|
|
||||||
# Run CMake
|
|
||||||
- name: Run CMake
|
|
||||||
run: mkdir -p build && cd build && cmake .. -G Ninja -DCMAKE_CXX_FLAGS="-Xclang -fcolor-diagnostics" -DCMAKE_PREFIX_PATH=$(brew --prefix qt6) -DDISTRIBUTOR="Mario Party Netplay"
|
|
||||||
# Run Ninja
|
|
||||||
- name: Run Ninja
|
|
||||||
run: cd build && ninja -j8
|
|
||||||
# Run AppImage Packagers
|
|
||||||
- name: AppImage Packager
|
|
||||||
run: ./Distribution/appimage.sh
|
|
||||||
# Upload Artifact
|
|
||||||
- name: Upload Build Artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: DolphinMPN-macOS
|
|
||||||
path: /Users/runner/work/Dolphin-MPN/Dolphin-MPN/build/Binaries/
|
|
36
.github/workflows/win32.yml
vendored
36
.github/workflows/win32.yml
vendored
|
@ -1,36 +0,0 @@
|
||||||
name: Windows CI
|
|
||||||
|
|
||||||
# Controls when the action will run. Triggers the workflow on push or pull request
|
|
||||||
# events but only for the master branch
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
||||||
jobs:
|
|
||||||
# This workflow contains a single job called "build"
|
|
||||||
build:
|
|
||||||
# The type of runner that the job will run on
|
|
||||||
runs-on: windows-latest
|
|
||||||
|
|
||||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
|
||||||
steps:
|
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
# Submoudle
|
|
||||||
- name: Checkout Submodles
|
|
||||||
run: git submodule update --init --recursive
|
|
||||||
# Setup MSBuild For Later Usage
|
|
||||||
- name: Setup MSBuild
|
|
||||||
uses: microsoft/setup-msbuild@v1.0.2
|
|
||||||
with:
|
|
||||||
vs-version: '16.6.2'
|
|
||||||
# Run MSBuild
|
|
||||||
- name: Build Solution
|
|
||||||
run: msbuild "D:\a\Dolphin-MPN\Dolphin-MPN\Source\dolphin-emu.sln" /verbosity:minimal /property:Configuration=Release /property:Platform=x64
|
|
||||||
# Upload Artifact
|
|
||||||
- name: Upload Build Artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: DolphinMPN-win32
|
|
||||||
path: D:\a\Dolphin-MPN\Dolphin-MPN\Binary\x64
|
|
|
@ -52,7 +52,7 @@ if (APPLE AND ENABLE_QT)
|
||||||
-replace CFBundleExecutable -string Dolphin
|
-replace CFBundleExecutable -string Dolphin
|
||||||
${DOLPHIN_MAC_BUNDLE}/Contents/Info.plist
|
${DOLPHIN_MAC_BUNDLE}/Contents/Info.plist
|
||||||
|
|
||||||
DEPENDS dolphin-emu)
|
DEPENDS dolphin-mpn)
|
||||||
|
|
||||||
if (ENABLE_AUTOUPDATE)
|
if (ENABLE_AUTOUPDATE)
|
||||||
add_dependencies(build_final_bundle MacUpdater)
|
add_dependencies(build_final_bundle MacUpdater)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue