Skip to content

Merge pull request #2306 from ineveraskedforthis/microfixes-branch-2 #701

Merge pull request #2306 from ineveraskedforthis/microfixes-branch-2

Merge pull request #2306 from ineveraskedforthis/microfixes-branch-2 #701

Workflow file for this run

name: Build AppImage
on:
workflow_dispatch:
pull_request:
push:
release:
types: [created, published]
jobs:
linux-appimage-debug:
if: github.event_name == 'push' || github.event_name == 'pull_request'
strategy:
matrix:
config: [Debug]
llvm-version: [20]
compiler: [clang]
os: [ubuntu-24.04]
env:
CC: clang-${{ matrix.llvm-version }}
CXX: clang++-${{ matrix.llvm-version }}
name: Ubuntu 24.04 with ${{ matrix.compiler }} (${{ matrix.config }})
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Apt LLVM
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh ${{ matrix.llvm-version }}
sudo apt-get update
- name: install Clang
run: sudo apt install --no-install-recommends clang-${{ matrix.llvm-version }}
- name: "Install"
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: git build-essential cmake libgl1-mesa-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libicu-dev
version: 1.0
- name: Set Environment Variables
run: |
if [ "${{ github.event_name }}" == "push" ]; then
COMMIT_HASH=$(git rev-parse --short HEAD)
VERSION="${COMMIT_HASH}"
else
VERSION="${{ github.event.number }}"
fi
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Configure Build Files
run: |
cmake -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DCMAKE_INSTALL_PREFIX=/usr -B build
- name: Build Project Alice
run: |
cmake --build build --parallel --target Alice
# - name: Build Launcher
# run: |
# cmake --build build --parallel --target launch_alice
- name: Create AppDir
run: |
cd build
make install DESTDIR=AppDir
- name: Create AppImage
run: |
cd build
wget -c -q "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
chmod +x linuxdeploy-x86_64.AppImage
cp ../src/AppRun AppDir/AppRun
LD_LIBRARY_PATH=$(pwd)/dependencies/luajit/luajit-prefix/lib:$LD_LIBRARY_PATH ./linuxdeploy-x86_64.AppImage --appdir AppDir --output appimage --desktop-file AppDir/usr/share/applications/alice.desktop --icon-file AppDir/usr/share/icons/hicolor/128x128/apps/alice.png
- name: Package AppImage and assets
run: |
cd build
mkdir package
cp Project_Alice-${{ env.VERSION }}-x86_64.AppImage package/
cp -r ../assets package/
- name: Upload packaged artifact
uses: actions/upload-artifact@v4
with:
name: Project_Alice-AppImage-with-assets-${{ env.VERSION }}
path: build/package/
linux-appimage-release:
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
strategy:
matrix:
config: [Release]
llvm-version: [20]
compiler: [clang]
os: [ubuntu-24.04]
env:
CC: clang-${{ matrix.llvm-version }}
CXX: clang++-${{ matrix.llvm-version }}
name: Ubuntu 24.04 with ${{ matrix.compiler }} (${{ matrix.config }})
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Apt LLVM
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh ${{ matrix.llvm-version }}
sudo apt-get update
- name: install Clang
run: sudo apt install --no-install-recommends clang-${{ matrix.llvm-version }}
- name: "Install"
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: git build-essential cmake libgl1-mesa-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libicu-dev
version: 1.0
- name: Set Environment Variables
run: |
if [ "${{ github.event_name }}" == "release" ]; then
VERSION=${{ github.ref_name }}
else
VERSION=${{ github.event.inputs.version }}
fi
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Configure Build Files
run: |
cmake -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DCMAKE_INSTALL_PREFIX=/usr -B build
- name: Build Project Alice
run: |
cmake --build build --parallel --target Alice
# - name: Build Launcher
# run: |
# cmake --build build --parallel --target launch_alice
- name: Create AppDir
run: |
cd build
make install DESTDIR=AppDir
- name: Create AppImage
run: |
cd build
wget -c -q "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
chmod +x linuxdeploy-x86_64.AppImage
cp ../src/AppRun AppDir/AppRun
./linuxdeploy-x86_64.AppImage --appdir AppDir --output appimage --desktop-file AppDir/usr/share/applications/alice.desktop --icon-file AppDir/usr/share/icons/hicolor/128x128/apps/alice.png
- name: Package AppImage and assets
run: |
cd build
mkdir package
cp Project_Alice-${{ env.VERSION }}-x86_64.AppImage package/
cp -r ../assets package/
- name: Upload packaged artifact
uses: actions/upload-artifact@v4
with:
name: Project_Alice-AppImage-with-assets-${{ env.VERSION }}
path: build/package/