Build appimage test
Some checks failed
Build Linux AppImage / build-appimage (push) Failing after 1m33s
Some checks failed
Build Linux AppImage / build-appimage (push) Failing after 1m33s
This commit is contained in:
155
.gitea/workflows/build-appimage.yml
Normal file
155
.gitea/workflows/build-appimage.yml
Normal file
@@ -0,0 +1,155 @@
|
||||
name: Build Linux AppImage
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '*'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
release:
|
||||
types: [created, published]
|
||||
|
||||
jobs:
|
||||
build-appimage:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
build-essential \
|
||||
cmake \
|
||||
ninja-build \
|
||||
pkg-config \
|
||||
git \
|
||||
curl \
|
||||
zip \
|
||||
unzip \
|
||||
xvfb \
|
||||
qt6-base-dev \
|
||||
qt6-svg-dev \
|
||||
libglew-dev \
|
||||
libglfw3-dev \
|
||||
libopus-dev \
|
||||
libssl-dev \
|
||||
libudev-dev \
|
||||
libavcodec-dev \
|
||||
libavformat-dev \
|
||||
libswscale-dev \
|
||||
libfmt-dev \
|
||||
libgl1-mesa-dev \
|
||||
libxrandr-dev \
|
||||
libxi-dev \
|
||||
libxcursor-dev \
|
||||
libxinerama-dev \
|
||||
libsamplerate-dev \
|
||||
libasound2-dev \
|
||||
libpulse-dev \
|
||||
libsndio-dev \
|
||||
zsync \
|
||||
wget
|
||||
|
||||
- name: Clean build directory
|
||||
run: rm -rf build
|
||||
|
||||
- name: Build Eden
|
||||
run: |
|
||||
export TARGET=appimage
|
||||
export USE_MULTIMEDIA=false
|
||||
.ci/linux/build.sh amd64
|
||||
env:
|
||||
NPROC: 2
|
||||
|
||||
- name: Package AppImage
|
||||
run: |
|
||||
export USE_MULTIMEDIA=false
|
||||
.ci/linux/package.sh amd64
|
||||
|
||||
- name: Get version info
|
||||
id: version
|
||||
run: |
|
||||
VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "dev")
|
||||
COMMIT=$(git rev-parse --short HEAD)
|
||||
echo "version=${VERSION}" >> $GITHUB_OUTPUT
|
||||
echo "commit=${COMMIT}" >> $GITHUB_OUTPUT
|
||||
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Upload AppImage artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Eden-AppImage-amd64-${{ steps.version.outputs.version }}-${{ steps.version.outputs.commit }}
|
||||
path: |
|
||||
Eden-*.AppImage
|
||||
Eden-*.AppImage.zsync
|
||||
retention-days: 30
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Create release info
|
||||
run: |
|
||||
echo "# Build Information" > build-info.txt
|
||||
echo "Version: ${{ steps.version.outputs.version }}" >> build-info.txt
|
||||
echo "Commit: ${{ steps.version.outputs.commit }}" >> build-info.txt
|
||||
echo "Build Date: ${{ steps.version.outputs.date }}" >> build-info.txt
|
||||
echo "Architecture: amd64-v3" >> build-info.txt
|
||||
echo "Multimedia: disabled" >> build-info.txt
|
||||
ls -lh Eden-*.AppImage >> build-info.txt
|
||||
cat build-info.txt
|
||||
|
||||
- name: Upload build info
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: build-info-${{ steps.version.outputs.commit }}
|
||||
path: build-info.txt
|
||||
retention-days: 30
|
||||
|
||||
- name: Generate MD5 hash for release
|
||||
if: github.event_name == 'release'
|
||||
run: |
|
||||
APPIMAGE_FILE=$(ls Eden-*.AppImage | head -n 1)
|
||||
MD5_HASH=$(md5sum "$APPIMAGE_FILE" | awk '{print $1}')
|
||||
echo "Thanks @arknost for the Linux version" > MD5SUMS.txt
|
||||
echo "" >> MD5SUMS.txt
|
||||
echo "\`EdenV2-Linux.AppImage\` MD5: \`$MD5_HASH\`" >> MD5SUMS.txt
|
||||
cat MD5SUMS.txt
|
||||
echo "md5_hash=$MD5_HASH" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Upload to Release
|
||||
if: github.event_name == 'release'
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ./Eden-${{ steps.version.outputs.version }}-amd64_v3.AppImage
|
||||
asset_name: Eden-${{ steps.version.outputs.version }}-amd64_v3.AppImage
|
||||
asset_content_type: application/x-executable
|
||||
|
||||
- name: Upload zsync to Release
|
||||
if: github.event_name == 'release'
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ./Eden-${{ steps.version.outputs.version }}-amd64_v3.AppImage.zsync
|
||||
asset_name: Eden-${{ steps.version.outputs.version }}-amd64_v3.AppImage.zsync
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
- name: Upload MD5 hash to Release
|
||||
if: github.event_name == 'release'
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ./MD5SUMS.txt
|
||||
asset_name: MD5SUMS.txt
|
||||
asset_content_type: text/plain
|
||||
Reference in New Issue
Block a user