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

Commit

Permalink
support suyu linux CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ImpXada committed Apr 2, 2024
1 parent 90b218f commit 73b36c9
Show file tree
Hide file tree
Showing 9 changed files with 306 additions and 41 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/strato-android-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,16 @@ jobs:
echo "short_hash=$(git describe --always --long)" >> $GITHUB_OUTPUT
echo "version=$(git describe --tags --always)" >> $GITHUB_OUTPUT
- name: Set up cache
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
~/.ccache
key: ${{ runner.os }}-android-${{ steps.version.outputs.hash }}
restore-keys: |
${{ runner.os }}-android-
# - name: Set up cache
# uses: actions/cache@v4
# with:
# path: |
# ~/.gradle/caches
# ~/.gradle/wrapper
# ~/.cache
# key: ${{ runner.os }}-strato-android-${{ steps.version.outputs.hash }}
# restore-keys: |
# ${{ runner.os }}-strato-android-

- name: Prepare environment
run: |
Expand All @@ -66,12 +66,12 @@ jobs:
- name: Build Android
run: |
export NDK_CCACHE="$(which ccache)"
ccache -s
ccache -sv
cd ${{ github.workspace }}/strato
chmod +x ./gradlew
./gradlew --no-daemon --stacktrace --build-cache --parallel --configure-on-demand assemble${{ github.event.inputs.flavor || 'mainline' }}Release
mv $(find app/build/outputs/apk -type f | grep -E "\.apk$") ${{ github.workspace }}/strato-${{ github.event.inputs.flavor || 'mainline' }}-${{ steps.version.outputs.date }}-${{ steps.version.outputs.version }}.apk
ccache -s
ccache -sv
- name: Release Strato Android (Strato-Android)
uses: softprops/action-gh-release@v2
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/sudachi-android-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ jobs:
- name: Download sudachi source code
run: |
cd ${{ github.workspace }}
git clone --branch ${{ github.event.inputs.branch || 'main' }} https://github.com/sudachi-emu/sudachi.git --recursive
git clone --branch ${{ github.event.inputs.branch || 'main' }} https://github.com/sudachi-emu/sudachi.git
cd sudachi
git submodule update --init --recursive --remote
# cd externals/sirit && git reset --hard
- id: version
name: Get version
Expand All @@ -45,10 +48,10 @@ jobs:
path: |
~/.gradle/caches
~/.gradle/wrapper
~/.ccache
key: ${{ runner.os }}-android-${{ steps.version.outputs.hash }}
~/.cache
key: ${{ runner.os }}-sudachi-android-${{ steps.version.outputs.hash }}
restore-keys: |
${{ runner.os }}-android-
${{ runner.os }}-sudachi-android-
- name: Prepare environment
run: |
Expand All @@ -57,12 +60,13 @@ jobs:
- name: Build Android
run: |
export NDK_CCACHE="$(which ccache)"
ccache -s
ccache -sv
cd ${{ github.workspace }}/sudachi/src/android
chmod +x ./gradlew
./gradlew "assembleMainlineRelease"
# bash gradlew build
mv $(find app/build/outputs/apk -type f | grep -E "\.apk$") ${{ github.workspace }}/sudachi-${{ github.event.inputs.flavor || 'ea' }}-${{ steps.version.outputs.date }}-${{ steps.version.outputs.version }}.apk
ccache -s
ccache -sv
- name: Release Sudachi (Sudachi-Android)
uses: softprops/action-gh-release@v2
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/suyu-android-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ jobs:
path: |
~/.gradle/caches
~/.gradle/wrapper
~/.ccache
key: ${{ runner.os }}-android-${{ steps.version.outputs.hash }}
~/.cache
key: ${{ runner.os }}-suyu-android-${{ steps.version.outputs.hash }}
restore-keys: |
${{ runner.os }}-android-
${{ runner.os }}-suyu-android-
- name: Prepare environment
run: |
Expand All @@ -53,12 +53,12 @@ jobs:
- name: Build Android
run: |
export NDK_CCACHE="$(which ccache)"
ccache -s
ccache -sv
cd ${{ github.workspace }}/suyu/src/android
chmod +x ./gradlew
./gradlew "assembleMainlineRelease"
mv app/build/outputs/apk/mainline/release/app-mainline-release.apk ${{ github.workspace }}/suyu-${{ steps.version.outputs.date }}-${{ steps.version.outputs.version }}.apk
ccache -s
ccache -sv
- name: Release Suyu Android (Suyu-Android)
uses: softprops/action-gh-release@v2
Expand Down
128 changes: 128 additions & 0 deletions .github/workflows/suyu-linux-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
name: suyu-linux-build

on:
workflow_dispatch:
inputs:
branch:
description: 'select branch to build(default: dev)'
required: false
default: 'dev'
release_type:
description: 'select release_type to build(default: mainline)'
required: false
default: 'mainline'
schedule:
- cron: "0 0 */2 * *"

jobs:
suyu_linux_build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: { ref: main }
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17

- name: Setup Ninja
uses: ashutoshvarma/setup-ninja@v1.1

- name: Download and install Boost
uses: MarkusJx/install-boost@v2.4.5
id: install-boost
with:
boost_version: 1.79.0
platform_version: 22.04

- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '6.6.1'
host: 'linux'
target: 'desktop'
install-deps: 'true'

- name: Download suyu source code
run: |
cd ${{ github.workspace }}
git clone --branch ${{ github.event.inputs.branch || 'dev' }} https://git.suyu.dev/suyu/suyu.git --recursive
- id: version
name: Get version
run: |
echo "date=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
cd ${{ github.workspace }}/suyu
echo "hash=$(git log -1 --pretty=format:%H)" >> $GITHUB_OUTPUT
echo "version=$(git describe --tags --always)" >> $GITHUB_OUTPUT
- name: Set up cache
uses: actions/cache@v4
with:
path: |
~/.cache
key: ${{ runner.os }}-suyu-linux-${{ steps.version.outputs.hash }}
restore-keys: |
${{ runner.os }}-suyu-linux-
- name: Prepare environment
run: |
sudo apt update
sudo apt-get install ccache autoconf cmake g++-11 gcc-11 git glslang-tools libasound2 libboost-context-dev libglu1-mesa-dev libhidapi-dev libpulse-dev libtool libudev-dev libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libxcb-xkb1 libxext-dev libxkbcommon-x11-0 mesa-common-dev nasm ninja-build qtbase5-dev qtbase5-private-dev qtwebengine5-dev qtmultimedia5-dev libmbedtls-dev catch2 libfmt-dev liblz4-dev nlohmann-json3-dev libzstd-dev libssl-dev libavfilter-dev libavcodec-dev libswscale-dev
- name: Build Linux
run: |
cd ${{ github.workspace }}/suyu
set -e
ccache -sv
mkdir build || true && cd build
cmake .. \
-DBoost_USE_STATIC_LIBS=ON \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DSUYU_USE_PRECOMPILED_HEADERS=OFF \
-DDYNARMIC_USE_PRECOMPILED_HEADERS=OFF \
-DCMAKE_CXX_FLAGS="-march=x86-64-v2" \
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_C_COMPILER=gcc \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DDISPLAY_VERSION="1.0.0" \
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=OFF \
-DENABLE_QT_TRANSLATION=OFF \
-DSUYU_USE_BUNDLED_VCPKG=ON \
-DUSE_DISCORD_PRESENCE=ON \
-DSUYU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} \
-DSUYU_USE_BUNDLED_FFMPEG=ON \
-DSUYU_ENABLE_LTO=OFF \
-DSUYU_CRASH_DUMPS=ON \
-DENABLE_QT6=ON \
-DSUYU_USE_FASTER_LD=ON \
-DBoost_INCLUDE_DIR=${{steps.install-boost.outputs.BOOST_ROOT}}/include \
-DBoost_LIBRARY_DIRS=${{steps.install-boost.outputs.BOOST_ROOT}}/lib \
-DQT6_LOCATION=${QT_ROOT_DIR} \
-GNinja
ninja
ccache -sv
- name: Package Artifacts
run: |
export DATE=${{ steps.version.outputs.date }}
export VERSION=${{ steps.version.outputs.version }}
export WORKSPACE=${{ github.workspace }}
export RELEASE_TYPE=${{ github.event.inputs.release_type || 'mainline' }}
cd ${{ github.workspace }}/suyu/build
bash ${{ github.workspace }}/script/package_suyu_linux.sh
- name: Release Suyu Linux (Suyu-Linux)
uses: softprops/action-gh-release@v2
with:
name: Suyu Linux ${{ steps.version.outputs.date }}
tag_name: suyu-linux
files: suyu-linux-${{ github.event.inputs.release_type || 'mainline' }}-${{ steps.version.outputs.date }}-${{ steps.version.outputs.version }}.AppImage

- name: Release Suyu Linux ${{ steps.version.outputs.date }}
uses: softprops/action-gh-release@v2
with:
name: ${{ steps.version.outputs.date }}
tag_name: ${{ steps.version.outputs.date }}
files: suyu-linux-${{ github.event.inputs.release_type || 'mainline' }}-${{ steps.version.outputs.date }}-${{ steps.version.outputs.version }}.AppImage
33 changes: 28 additions & 5 deletions .github/workflows/turnip-android-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,41 @@ jobs:
sudo apt build-dep mesa -y
sudo sed -i 's/jammy/mantic/g' /etc/apt/sources.list
sudo apt update
sudo apt install meson
- name: Execute build script
run: bash ./script/turnip_builder.sh ${{ github.event.inputs.branch || 'main'}}

sudo apt install meson ccache -y
- name: Download suyu source code
run: |
mkdir -p ${{ github.workspace }}/turnip_workdir
cd ${{ github.workspace }}/turnip_workdir
git clone --branch ${{ github.event.inputs.branch || 'main'}} https://gitlab.freedesktop.org/mesa/mesa.git
- id: version
name: Get date
run: |
cd ${{ github.workspace }}/turnip_workdir/mesa
echo "date=$(date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
echo "hash=$(git log -1 --pretty=format:%H)" >> $GITHUB_OUTPUT
echo "tag=$(git describe --tags --always)" >> $GITHUB_OUTPUT
- name: Set up cache
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
~/.cache
key: ${{ runner.os }}-turnip-${{ steps.version.outputs.hash }}
restore-keys: |
${{ runner.os }}-turnip-
- name: Execute build script
run: |
export NDK_CCACHE="$(which ccache)"
ccache -sv
cd ${{ github.workspace }}
bash ./script/turnip_builder.sh ${{ github.event.inputs.branch || 'main'}}
ccache -sv
- name: Release Turnip (Mesa-Turnip-Android)
uses: softprops/action-gh-release@v2
with:
Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ This is an automated CI project for suyu, sudachi, strato and mesa turnip.

1. Suyu Android version is automatically generated daily at 00:00:00 (UTC).
2. Suyu Windows version is automatically generated every 2 days at 00:00:00 (UTC).
3. Mesa Turnip Android version is automatically generated daily at 00:00:00 (UTC).
4. Sudachi Android version is automatically generated every 3 days at 00:00:00 (UTC).
5. Strato Android version is automatically generated on the 1st of every month at 00:00:00 (UTC).
6. Naming format: "Project Name - Date - Tag - Branch". (Tag depends on the developer, a decrease in version number does not indicate a backward release version)
7. Release frequency may be adjusted based on project code commit frequency.
3. Suyu Linux version is automatically generated every 2 days at 00:00:00 (UTC).
4. Mesa Turnip Android version is automatically generated daily at 00:00:00 (UTC).
5. Sudachi Android version is automatically generated every 3 days at 00:00:00 (UTC).
6. Strato Android version is automatically generated on the 1st of every month at 00:00:00 (UTC).
7. Naming format: "Project Name - Date - Tag - Branch". (Tag depends on the developer, a decrease in version number does not indicate a backward release version)
8. Release frequency may be adjusted based on project code commit frequency.

## Driver Usage Instructions

Expand All @@ -31,6 +32,8 @@ The daily release includes all projects that underwent CI execution on that day.

[Suyu Windows](https://github.com/ImpXada/Auto-CI/releases/tag/suyu-windows)

[Suyu Linux](https://github.com/ImpXada/Auto-CI/releases/tag/suyu-linux)

[Turnip Android](https://github.com/ImpXada/Auto-CI/releases/tag/mesa-turnip-android)

[Sudachi Android](https://github.com/ImpXada/Auto-CI/releases/tag/sudachi-android)
Expand Down
13 changes: 8 additions & 5 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ suyu sudachi strato mesa-turnip的自动CI项目

1. 每天的00:00:00(UTC)会自动生成Suyu安卓版。
2. 每2天的00:00:00(UTC)会自动生成Suyu Windows版。
3. 每天的00:00:00(UTC)会自动生成Mesa Turnip 安卓版。
4. 每3天的00:00:00(UTC)会自动生成Sudachi安卓版。
5. 每月1号的00:00:00(UTC)会自动生成Strato安卓版。
6. 命名方式为”项目名-日期-Tag-分支“。(Tag取决于开发者,如果出现版本号下降,不代表发包版本落后)
7. 发布频率可能会根据项目代码提交频率进行调整。
3. 每2天的00:00:00(UTC)会自动生成Suyu Linux版。
4. 每天的00:00:00(UTC)会自动生成Mesa Turnip 安卓版。
5. 每3天的00:00:00(UTC)会自动生成Sudachi安卓版。
6. 每月1号的00:00:00(UTC)会自动生成Strato安卓版。
7. 命名方式为”项目名-日期-Tag-分支“。(Tag取决于开发者,如果出现版本号下降,不代表发包版本落后)
8. 发布频率可能会根据项目代码提交频率进行调整。

## 驱动使用说明

Expand All @@ -31,6 +32,8 @@ suyu sudachi strato mesa-turnip的自动CI项目

[Suyu Windows版](https://github.com/ImpXada/Auto-CI/releases/tag/suyu-windows)

[Suyu Linux版](https://github.com/ImpXada/Auto-CI/releases/tag/suyu-linux)

[Turnip Android版](https://github.com/ImpXada/Auto-CI/releases/tag/mesa-turnip-android)

[Sudachi Android版](https://github.com/ImpXada/Auto-CI/releases/tag/sudachi-android)
Expand Down
Loading

0 comments on commit 73b36c9

Please sign in to comment.