Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
add enhanced AppImage packaging GitHub workflow
Browse files Browse the repository at this point in the history
For uploading see also:
actions/upload-artifact#51

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
  • Loading branch information
maggu2810 committed Apr 3, 2023
1 parent 841ebcc commit bc65182
Showing 1 changed file with 263 additions and 0 deletions.
263 changes: 263 additions & 0 deletions .github/workflows/package-linux-appimage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,263 @@
name: Package - Linux - AppImage

on:
#push:
# branches: [ master ]

#pull_request:
# branches: [ master ]

workflow_dispatch:

jobs:
ubuntu1804:
if: ${{ false }} # disable for now
name: Ubuntu 18.04
runs-on: ubuntu-18.04
steps:
- name: Clone Repository
uses: actions/checkout@v3

- name: Update package database
run: |
sudo apt-get update
- name: Install AppImage requirements
run: |
sudo apt-get install -y fuse libfuse2
- name: Install download tools
run: |
sudo apt-get install -y wget curl
- name: Install AppImage stuff
run: |
mkdir ~/Applications
curl -s -L --output ~/Applications/linuxdeploy-x86_64.AppImage https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
chmod 0755 ~/Applications/linuxdeploy-x86_64.AppImage
- name: Install gcc / g++ 11
run: |
sudo apt install -y software-properties-common
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt install -y gcc-11 g++-11
- name: Install Python and SCons
run: |
sudo add-apt-repository -y ppa:deadsnakes/ppa
sudo apt install -y python3.9-full
mkdir ~/venv
python3.9 -m venv ~/venv
. ~/venv/bin/activate && pip install Scons==4.0.1
- name: Install dxx-rebirth dependencies
run: |
sudo apt install -y libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libphysfs-dev libpng-dev
- name: Configure and build
run: . ~/venv/bin/activate && scons -j`nproc` opengl=1 sdl2=1 sdlmixer=1
env:
CC: gcc-11
CXX: g++-11

- name: Package AppImage d1x-rebirth
run: |
OUTPUT="d1x-rebirth-$(git rev-parse --short HEAD).AppImage" ~/Applications/linuxdeploy-x86_64.AppImage \
-oappimage \
--appdir="d1x-rebirth.appdir" \
--executable="build/d1x-rebirth/d1x-rebirth" \
--desktop-file="d1x-rebirth/d1x-rebirth.desktop" \
--icon-file="d1x-rebirth/d1x-rebirth.png"
- name: Package AppImage d2x-rebirth
run: |
OUTPUT="d2x-rebirth-$(git rev-parse --short HEAD).AppImage" ~/Applications/linuxdeploy-x86_64.AppImage \
-oappimage \
--appdir="d2x-rebirth.appdir" \
--executable="build/d2x-rebirth/d2x-rebirth" \
--desktop-file="d2x-rebirth/d2x-rebirth.desktop" \
--icon-file="d2x-rebirth/d2x-rebirth.png"
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: linux-appimage-ubuntu-18.04
path: '*.AppImage'

ubuntu2004:
name: Ubuntu 20.04
runs-on: ubuntu-20.04
steps:
- name: Clone Repository
uses: actions/checkout@v3

- name: Update package database
run: |
sudo apt-get update
- name: Install AppImage requirements
run: |
sudo apt-get install -y fuse libfuse2
- name: Install download tools
run: |
sudo apt-get install -y wget curl
- name: Install AppImage stuff
run: |
mkdir ~/Applications
curl -s -L --output ~/Applications/linuxdeploy-x86_64.AppImage https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
chmod 0755 ~/Applications/linuxdeploy-x86_64.AppImage
- name: Install gcc / g++ 11
run: |
sudo apt install -y software-properties-common
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt install -y gcc-11 g++-11
- name: Install Python and SCons
run: |
sudo apt install -y python3
mkdir ~/venv
python3 -m venv ~/venv
. ~/venv/bin/activate && pip install Scons==4.0.1
- name: Install dxx-rebirth dependencies
run: |
sudo apt install -y libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libphysfs-dev libpng-dev
- name: Configure and build
run: . ~/venv/bin/activate && scons -j`nproc` opengl=1 sdl2=1 sdlmixer=1
env:
CC: gcc-11
CXX: g++-11

- name: Package AppImage d1x-rebirth
run: |
OUTPUT="d1x-rebirth-$(git rev-parse --short HEAD).AppImage" ~/Applications/linuxdeploy-x86_64.AppImage \
-oappimage \
--appdir="d1x-rebirth.appdir" \
--executable="build/d1x-rebirth/d1x-rebirth" \
--desktop-file="d1x-rebirth/d1x-rebirth.desktop" \
--icon-file="d1x-rebirth/d1x-rebirth.png"
- name: Package AppImage d2x-rebirth
run: |
OUTPUT="d2x-rebirth-$(git rev-parse --short HEAD).AppImage" ~/Applications/linuxdeploy-x86_64.AppImage \
-oappimage \
--appdir="d2x-rebirth.appdir" \
--executable="build/d2x-rebirth/d2x-rebirth" \
--desktop-file="d2x-rebirth/d2x-rebirth.desktop" \
--icon-file="d2x-rebirth/d2x-rebirth.png"
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: linux-appimage-ubuntu-20.04
path: '*.AppImage'

ubuntu2204:
name: Ubuntu 22.04
runs-on: ubuntu-22.04
steps:
- name: Clone Repository
uses: actions/checkout@v3

- name: Update package database
run: |
sudo apt-get update
- name: Install AppImage requirements
run: |
sudo apt-get install -y fuse libfuse2
- name: Install download tools
run: |
sudo apt-get install -y wget curl
- name: Install AppImage stuff
run: |
mkdir ~/Applications
curl -s -L --output ~/Applications/linuxdeploy-x86_64.AppImage https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
chmod 0755 ~/Applications/linuxdeploy-x86_64.AppImage
- name: Install gcc / g++ 11
run: |
sudo apt install -y gcc-11 g++-11
- name: Install Python and SCons
run: |
sudo apt install -y python3 scons
- name: Install dxx-rebirth dependencies
run: |
sudo apt install -y libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libphysfs-dev libpng-dev
- name: Configure and build
run: scons -j`nproc` opengl=1 sdl2=1 sdlmixer=1
env:
CC: gcc-11
CXX: g++-11

- name: Package AppImage d1x-rebirth
run: |
OUTPUT="d1x-rebirth-$(git rev-parse --short HEAD).AppImage" ~/Applications/linuxdeploy-x86_64.AppImage \
-oappimage \
--appdir="d1x-rebirth.appdir" \
--executable="build/d1x-rebirth/d1x-rebirth" \
--desktop-file="d1x-rebirth/d1x-rebirth.desktop" \
--icon-file="d1x-rebirth/d1x-rebirth.png"
- name: Package AppImage d2x-rebirth
run: |
OUTPUT="d2x-rebirth-$(git rev-parse --short HEAD).AppImage" ~/Applications/linuxdeploy-x86_64.AppImage \
-oappimage \
--appdir="d2x-rebirth.appdir" \
--executable="build/d2x-rebirth/d2x-rebirth" \
--desktop-file="d2x-rebirth/d2x-rebirth.desktop" \
--icon-file="d2x-rebirth/d2x-rebirth.png"
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: linux-appimage-ubuntu-22.04
path: '*.AppImage'

upload:
#if: ${{ false }}
name: Create release and upload artifacts
needs:
#- ubuntu1804
- ubuntu2004
- ubuntu2204
runs-on: ubuntu-22.04
steps:
- name: Install AppImage requirements
run: |
sudo apt-get install -y libfuse2
- name: Install AppImage stuff
run: |
mkdir ~/Applications
curl -s -L --output ~/Applications/pyuploadtool-x86_64.AppImage https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage
chmod 0755 ~/Applications/pyuploadtool-x86_64.AppImage
- name: Download artifacts
uses: actions/download-artifact@v2

- name: Inspect directory after downloading artifacts
run: ls -alFR

- name: Create release and upload artifacts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
#mv linux-appimage-ubuntu-18.04/d1x-rebirth*.AppImage d1x-rebirth-u1804.AppImage
#mv linux-appimage-ubuntu-18.04/d2x-rebirth*.AppImage d2x-rebirth-u1804.AppImage
mv linux-appimage-ubuntu-20.04/d1x-rebirth*.AppImage d1x-rebirth-u2004.AppImage
mv linux-appimage-ubuntu-20.04/d2x-rebirth*.AppImage d2x-rebirth-u2004.AppImage
mv linux-appimage-ubuntu-22.04/d1x-rebirth*.AppImage d1x-rebirth-u2204.AppImage
mv linux-appimage-ubuntu-22.04/d2x-rebirth*.AppImage d2x-rebirth-u2204.AppImage
ls -alFR
~/Applications/pyuploadtool-x86_64.AppImage d1x-rebirth*.AppImage d2x-rebirth*.AppImage

0 comments on commit bc65182

Please sign in to comment.