204
.github/workflows/build.yml
vendored
Normal file
204
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,204 @@
|
||||
name: Release Build
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
source:
|
||||
name: "Source Pack"
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Get Variables and Clone
|
||||
uses: ./.github/workflows/clone
|
||||
|
||||
- name: Pack
|
||||
run: |
|
||||
zip -r source.zip eden
|
||||
tar cf source.tar.zst eden
|
||||
|
||||
- name: Upload source
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
with:
|
||||
name: source
|
||||
path: source.*
|
||||
|
||||
linux:
|
||||
name: "Linux (${{ matrix.arch }})"
|
||||
runs-on: ${{ matrix.runs-on }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- runs-on: ubuntu-latest
|
||||
arch: legacy
|
||||
|
||||
- runs-on: ubuntu-latest
|
||||
arch: amd64
|
||||
|
||||
- runs-on: ubuntu-latest
|
||||
arch: steamdeck
|
||||
|
||||
- runs-on: ubuntu-latest
|
||||
arch: rog-ally
|
||||
|
||||
- runs-on: ubuntu-24.04-arm
|
||||
arch: aarch64
|
||||
|
||||
- runs-on: ubuntu-24.04-arm
|
||||
arch: armv9
|
||||
|
||||
container: ghcr.io/pkgforge-dev/archlinux:latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
chmod +x ./linux/get-dependencies.sh
|
||||
./linux/get-dependencies.sh
|
||||
|
||||
- name: Get Variables and Clone
|
||||
uses: ./.github/workflows/clone
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: |
|
||||
cd eden
|
||||
if [ "${{ matrix.arch }}" = 'aarch64' ] || [ "${{ matrix.arch }}" = 'armv9' ]; then
|
||||
sed -i 's/Settings::values\.lru_cache_enabled\.GetValue()/true/' src/core/arm/nce/patcher.h
|
||||
fi
|
||||
|
||||
TARGET=appimage DEVEL=true ./.ci/linux/build.sh ${{ matrix.arch }} $(nproc)
|
||||
|
||||
- name: Package
|
||||
shell: bash
|
||||
run: |
|
||||
cd eden
|
||||
DEVEL=true ./.ci/linux/package.sh ${{ matrix.arch }}
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
with:
|
||||
name: linux-${{ matrix.arch }}
|
||||
path: eden/*.AppImage*
|
||||
|
||||
windows:
|
||||
name: "Windows (${{ matrix.arch }})"
|
||||
runs-on: ${{ matrix.runs-on }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- runs-on: windows-latest
|
||||
arch: amd64
|
||||
qt_arch: win64_msvc2022_64
|
||||
qt_version: 6.9.1
|
||||
qt_modules: qtmultimedia qtwebengine qtpositioning qtwebchannel
|
||||
|
||||
# - runs-on: windows-11-arm
|
||||
# arch: arm64
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v4
|
||||
with:
|
||||
version: ${{ matrix.qt_version }}
|
||||
host: 'windows'
|
||||
target: 'desktop'
|
||||
arch: ${{ matrix.qt_arch }}
|
||||
modules: ${{ matrix.qt_modules }}
|
||||
cache: 'true'
|
||||
|
||||
- name: Get Variables and Clone
|
||||
uses: ./.github/workflows/clone
|
||||
|
||||
- name: Set up vcpkg cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
${{ github.workspace }}/eden/build/vcpkg_installed
|
||||
${{ github.workspace }}/eden/build/externals
|
||||
${{ github.workspace }}/eden/.vcpkg
|
||||
key: ${{ runner.os }}-${{ matrix.arch }}-vcpkg-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ matrix.arch }}-vcpkg-
|
||||
|
||||
- name: Set up MSVC
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: ${{ matrix.arch }}
|
||||
|
||||
- name: Install Vulkan SDK
|
||||
shell: powershell
|
||||
run: |
|
||||
cd eden
|
||||
./.ci/windows/install-vulkan-sdk.ps1
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: |
|
||||
cd eden
|
||||
export PATH="${PATH}:${{ runner.workspace }}/Qt/${{ matrix.qt_version }}/${{ matrix.qt_arch }}/bin"
|
||||
export DEVEL=true
|
||||
export WINDEPLOYQT=windeployqt
|
||||
|
||||
./.ci/windows/build.sh
|
||||
|
||||
- name: Package
|
||||
shell: bash
|
||||
run: |
|
||||
cd eden
|
||||
export ARCH=${{ matrix.arch }}
|
||||
./.ci/windows/package.sh
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
with:
|
||||
name: windows-${{ matrix.arch }}
|
||||
path: eden/artifacts/*
|
||||
|
||||
android:
|
||||
runs-on: ubuntu-latest
|
||||
name: "Android"
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
chmod +x ./android/get-dependencies.sh
|
||||
./android/get-dependencies.sh
|
||||
|
||||
- name: Get Variables and Clone
|
||||
uses: ./.github/workflows/clone
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cd eden
|
||||
JAVA_HOME=$JAVA_HOME_17_X64 DEVEL=true ./.ci/android/build.sh
|
||||
env:
|
||||
ANDROID_KEYSTORE_B64: ${{ secrets.ANDROID_KEYSTORE_B64 }}
|
||||
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
|
||||
ANDROID_KEYSTORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASS }}
|
||||
|
||||
- name: Package
|
||||
run: |
|
||||
cd eden
|
||||
./.ci/android/package.sh
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
with:
|
||||
name: android
|
||||
path: eden/artifacts/*
|
||||
27
.github/workflows/clone/action.yml
vendored
Normal file
27
.github/workflows/clone/action.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
name: Clone
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Parse Forgejo payload
|
||||
uses: ./.github/workflows/parse
|
||||
|
||||
- name: Print env vars
|
||||
shell: bash
|
||||
run: |
|
||||
echo "Tag: $FORGEJO_TAG"
|
||||
|
||||
- name: Checkout Repo
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
while ! git clone https://crueter:${{ env.FORGEJO_TOKEN }}@git.eden-emu.dev/eden-emu/eden.git eden; do
|
||||
echo "Clone failed!"
|
||||
sleep 5
|
||||
echo "Trying clone again..."
|
||||
rm -rf ./eden || true
|
||||
done
|
||||
|
||||
cd eden
|
||||
git reset --hard $FORGEJO_TAG
|
||||
git submodule update --init --recursive
|
||||
10
.github/workflows/parse/action.yml
vendored
Normal file
10
.github/workflows/parse/action.yml
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
name: Get Variables
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Parse Forgejo payload
|
||||
shell: bash
|
||||
run: |
|
||||
PAYLOAD_JSON='${{ toJSON(github.event.client_payload) }}'
|
||||
echo "FORGEJO_TAG=$(echo "$PAYLOAD_JSON" | jq -r '.tag')" >> $GITHUB_ENV
|
||||
80
.github/workflows/release.yml
vendored
Normal file
80
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
name: Create Release
|
||||
|
||||
on:
|
||||
repository_dispatch:
|
||||
types: [tag]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
uses: ./.github/workflows/release.yml
|
||||
|
||||
release:
|
||||
name: "Create Release"
|
||||
needs: [build]
|
||||
permissions:
|
||||
actions: read
|
||||
security-events: write
|
||||
contents: write
|
||||
discussions: write
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
|
||||
- name: Parse Forgejo payload
|
||||
uses: ./.github/workflows/parse
|
||||
|
||||
- name: Package artifacts nicely
|
||||
run: |
|
||||
set -ex
|
||||
|
||||
mkdir -p artifacts
|
||||
|
||||
for arch in amd64 legacy steamdeck rog-ally aarch64 armv9
|
||||
do
|
||||
cp linux-$arch/*.AppImage "artifacts/Eden-Linux-${FORGEJO_TAG}-${arch}.AppImage"
|
||||
# cp linux-$arch/*.AppImage.zsync "artifacts/Eden-Linux-${FORGEJO_TAG}-${arch}.AppImage.zsync"
|
||||
done
|
||||
|
||||
cp android/*.apk artifacts/Eden-Android-${FORGEJO_TAG}.apk
|
||||
|
||||
for arch in amd64 # arm64
|
||||
do
|
||||
cp windows-$arch/*.zip artifacts/Eden-Windows-${FORGEJO_TAG}-${arch}.zip
|
||||
done
|
||||
|
||||
for ext in zip tar.zst
|
||||
do
|
||||
cp source/source.$ext artifacts/Eden-Source-${FORGEJO_TAG}.$ext
|
||||
done
|
||||
|
||||
export FORGEJO_TOKEN=${{ secrets.FORGEJO_TOKEN }}
|
||||
./body.sh > changelog.md
|
||||
|
||||
- name: Delete Previous Release
|
||||
run: |
|
||||
gh release delete "$FORGEJO_TAG" --repo "${GITHUB_REPOSITORY}" --cleanup-tag -y
|
||||
sleep 5
|
||||
env:
|
||||
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
continue-on-error: true
|
||||
|
||||
- name: Release (PR)
|
||||
uses: softprops/action-gh-release@v2.2.2
|
||||
with:
|
||||
name: "${{ env.FORGEJO_TITLE }}"
|
||||
tag_name: ${{ env.FORGEJO_TAG }}
|
||||
body_path: ./changelog.md
|
||||
prerelease: false
|
||||
draft: true
|
||||
generate_release_notes: false
|
||||
fail_on_unmatched_files: false
|
||||
make_latest: true
|
||||
files: |
|
||||
artifacts/*
|
||||
Reference in New Issue
Block a user