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

Commit

Permalink
Squash commits
Browse files Browse the repository at this point in the history
  • Loading branch information
ImpXada committed Apr 2, 2024
1 parent b1158cb commit e41faff
Show file tree
Hide file tree
Showing 9 changed files with 956 additions and 79 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/strato-android-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: strato-android-build

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

jobs:
strato_android_build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17

- name: Download strato source code
run: |
cd ${{ github.workspace }}
git clone --branch ${{ github.event.inputs.branch || 'master' }} https://github.com/strato-emu/strato.git --recursive
- id: version
name: Get version
run: |
echo "date=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
cd ${{ github.workspace }}/strato
echo "hash=$(git log -1 --pretty=format:%H)" >> $GITHUB_OUTPUT
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: Prepare environment
run: |
sudo apt-get install ccache glslang-dev glslang-tools
sudo apt-get install -y ninja-build
ln -s /usr/bin/ninja .
- name: Build Android
run: |
export NDK_CCACHE="$(which ccache)"
ccache -s
cd ${{ github.workspace }}/strato
chmod +x ./gradlew
./gradlew --no-daemon --stacktrace --build-cache --parallel --configure-on-demand assembleMainlineRelease
mv $(find app/build/outputs/apk -type f | grep -E "\.apk$") ${{ github.workspace }}/strato-${{ github.event.inputs.flavor || 'ea' }}-${{ steps.version.outputs.date }}-${{ steps.version.outputs.version }}.apk
ccache -s
- name: Release Strato
uses: softprops/action-gh-release@v2
with:
name: ${{ steps.version.outputs.date }}
tag_name: ${{ steps.version.outputs.date }}
files: ${{ github.workspace }}/strato-${{ github.event.inputs.flavor || 'ea' }}-${{ steps.version.outputs.date }}-${{ steps.version.outputs.version }}.apk
72 changes: 72 additions & 0 deletions .github/workflows/sudachi-android-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: sudachi-android-build

on:
workflow_dispatch:
inputs:
branch:
description: 'select branch to build(default: main)'
required: false
default: 'main'
flavor:
description: 'select flavor to build(default: ea)'
required: false
default: 'ea'
schedule:
- cron: "30 0 */2 * *"

jobs:
sudachi_android_build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17

- 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
- id: version
name: Get version
run: |
echo "date=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
cd ${{ github.workspace }}/sudachi
echo "hash=$(git log -1 --pretty=format:%H)" >> $GITHUB_OUTPUT
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: Prepare environment
run: |
sudo apt-get install ccache glslang-dev glslang-tools
- name: Build Android
run: |
export NDK_CCACHE="$(which ccache)"
ccache -s
cd ${{ github.workspace }}/sudachi/src/android
chmod +x ./gradlew
./gradlew "assembleMainlineRelease"
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
- name: Release Sudachi
uses: softprops/action-gh-release@v2
with:
name: ${{ steps.version.outputs.date }}
tag_name: ${{ steps.version.outputs.date }}
files: ${{ github.workspace }}/sudachi-${{ github.event.inputs.flavor || 'ea' }}-${{ steps.version.outputs.date }}-${{ steps.version.outputs.version }}.apk
19 changes: 11 additions & 8 deletions .github/workflows/suyu-android-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ name: suyu-android-build

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

jobs:
suyu_android_build:
Expand All @@ -19,9 +24,7 @@ jobs:
- name: Download suyu source code
run: |
cd ${{ github.workspace }}
git clone https://gitlab.com/suyu-emu/suyu.git --recursive
cd suyu
git checkout dev
git clone --branch ${{ github.event.inputs.branch || 'dev' }} https://git.suyu.dev/suyu/suyu.git --recursive
- id: version
name: Get version
Expand All @@ -30,6 +33,7 @@ jobs:
cd ${{ github.workspace }}/suyu
echo "hash=$(git log -1 --pretty=format:%H)" >> $GITHUB_OUTPUT
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
Expand All @@ -53,13 +57,12 @@ jobs:
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.short_hash }}.apk
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
- name: Release
- name: Release Suyu
uses: softprops/action-gh-release@v2
with:
name: ${{ steps.version.outputs.date }}
body: 非suyu官方每日构建版本,dev分支构建,不提供任何更新说明,遇到任何问题请前往https://gitlab.com/suyu-emu/suyu/-/issues
tag_name: ${{ steps.version.outputs.date }}
files: ${{ github.workspace }}/suyu-${{ steps.version.outputs.date }}-${{ steps.version.outputs.short_hash }}.apk
files: ${{ github.workspace }}/suyu-${{ steps.version.outputs.date }}-${{ steps.version.outputs.version }}.apk
47 changes: 47 additions & 0 deletions .github/workflows/turnip-android-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: turnip-android-build

on:
workflow_dispatch:
inputs:
branch:
description: 'select branch to build(default: main)'
required: false
default: 'main'
schedule:
- cron: '0 */12 * * *'

jobs:
start_building_turnip:
permissions:
contents: write
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with: { ref: main }

- name: Prepare environment
run: |
sudo sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list
sudo apt update
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'}}

- id: version
name: Get date
run: |
cd ${{ github.workspace }}/turnip_workdir/mesa
echo "date=$(date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
echo "tag=$(git describe --tags --always)" >> $GITHUB_OUTPUT
- name: Release Turnip
uses: softprops/action-gh-release@v2
with:
name: ${{ steps.version.outputs.date }}
tag_name: ${{ steps.version.outputs.date }}
files: |
${{ github.workspace }}/turnip_workdir/turnip-${{ steps.version.outputs.date }}-${{ steps.version.outputs.tag }}.zip
46 changes: 0 additions & 46 deletions .github/workflows/turnip_ci.yml

This file was deleted.

Loading

0 comments on commit e41faff

Please sign in to comment.