Skip to content

Merge pull request #239 from Ghabry/json #20

Merge pull request #239 from Ghabry/json

Merge pull request #239 from Ghabry/json #20

name: Stable Compilation
on:
push:
pull_request:
workflow_dispatch:
inputs:
git-ref:
description: Git Ref (Optional)
required: false
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
flatpak:
name: "Flatpak (x86_64)"
runs-on: ubuntu-latest
container:
image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.10
options: --privileged
steps:
- uses: actions/checkout@v6
- uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v6
with:
bundle: EasyRPG-Editor.flatpak
manifest-path: builds/flatpak/org.easyrpg.editor.yml
cache-key: flatpak-builder-${{ github.sha }}
docker:
name: ${{ matrix.image }} (${{ matrix.os.arch }})
runs-on: ${{ matrix.os.name }}
container:
image: ${{ matrix.image }}
strategy:
fail-fast: false
matrix:
image:
# version of: # CMake | g++ | Qt | support end #
# -------------------------------------------------------------
- ubuntu:24.04 # 3.28.3 | 13.2.0 | (too old) | LTS (4/29) #
os:
- arch: x86_64
name: ubuntu-latest
- arch: arm64
name: ubuntu-24.04-arm
steps:
- &deps
name: Install dependencies
run: |
export DEBIAN_FRONTEND="noninteractive"
apt-get update
apt-get install -yqq --no-install-recommends --no-install-suggests \
ca-certificates build-essential cmake ninja-build git \
libicu-dev curl zip unzip tar tzdata
- &qt6
name: Install Qt6
uses: jurplel/install-qt-action@v4
with:
version: '6.10.1'
install-deps: 'nosudo'
modules: 'qtmultimedia qtshadertools qtwaylandcompositor'
- &vcpkg
name: Install vcpkg
run: |
git clone https://github.com/Microsoft/vcpkg.git ../vcpkg
- &clone
name: Clone Repository
uses: actions/checkout@v6
if: github.event.inputs.git-ref == ''
- &cloneref
name: Clone Repository (with custom ref)
uses: actions/checkout@v6
if: github.event.inputs.git-ref != ''
with:
ref: ${{ github.event.inputs.git-ref }}
- name: Use gcc problem matcher
run: echo "::add-matcher::.github/gcc_comment_matcher.json"
- name: Compile
run: |
export VCPKG_ROOT=$PWD/../vcpkg
export Qt6_Path=$QT_ROOT_DIR
cmake --preset vcpkg-liblcf-release -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_PREFIX_PATH=$QT_ROOT_DIR -DLIBLCF_WITH_ICU=OFF
cmake --build --preset vcpkg-liblcf-release
- name: Install
run: |
cmake --build --preset vcpkg-liblcf-release --target install
appimage:
name: "AppImage (x86_64)"
runs-on: ubuntu-latest
container:
image: ubuntu:24.04
options: --privileged
steps:
- *deps
- name: Install linuxdeploy dependencies
run: |
export DEBIAN_FRONTEND="noninteractive"
apt-get install -yqq --no-install-recommends --no-install-suggests \
file fuse
- *qt6
- *vcpkg
- *clone
- *cloneref
- name: Download linuxdeploy
run: |
curl -LO https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
chmod +x linuxdeploy-x86_64.AppImage
- name: Download linuxdeploy qt plugin
run: |
curl -LO https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
chmod +x linuxdeploy-plugin-qt-x86_64.AppImage
- name: Compile
run: |
export VCPKG_ROOT=$PWD/../vcpkg
export Qt6_Path=$QT_ROOT_DIR
cmake --preset vcpkg-liblcf-release -DCMAKE_INSTALL_PREFIX=AppDir \
-DCMAKE_PREFIX_PATH=$QT_ROOT_DIR
cmake --build --preset vcpkg-liblcf-release
- name: Install
run: |
cmake --build --preset vcpkg-liblcf-release --target install
- name: Build AppImage
run: |
export EXTRA_QT_PLUGINS=waylandcompositor
export QML_SOURCES_PATHS="$PWD/src/ui"
./linuxdeploy-x86_64.AppImage \
--appdir AppDir \
--executable AppDir/bin/easyrpg-editor \
--desktop-file AppDir/share/applications/easyrpg-editor.desktop \
--icon-file AppDir/share/icons/hicolor/48x48/apps/easyrpg-editor.png \
--output appimage \
--plugin qt
- name: Upload AppImage artifact
uses: actions/upload-artifact@v7
with:
name: EasyRPG-Editor-AppImage
path: ./EasyRPG*.AppImage