Skip to content

Commit

Permalink
Updates (#151)
Browse files Browse the repository at this point in the history
* Update

* Fix
  • Loading branch information
CanerKaraca23 authored Feb 12, 2025
1 parent 2a152fd commit b18f89b
Show file tree
Hide file tree
Showing 20 changed files with 247 additions and 290 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-kernel-a12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
os_patch_level: 2024-08
- sub_level: 226
os_patch_level: 2024-11
- sub_level: 233
os_patch_level: 2025-02
uses: ./.github/workflows/gki-kernel.yml
secrets: inherit
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build-kernel-a14.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ jobs:
- version: "6.1"
sub_level: 118
os_patch_level: 2025-01
- version: "6.1"
sub_level: 124
os_patch_level: 2025-02
uses: ./.github/workflows/gki-kernel.yml
secrets: inherit
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build-kernel-a15.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ jobs:
- version: "6.6"
sub_level: 58
os_patch_level: 2025-01
- version: "6.6"
sub_level: 66
os_patch_level: 2025-02
uses: ./.github/workflows/gki-kernel.yml
secrets: inherit
with:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build-lkm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
matrix:
include:
- version: "android12-5.10"
sub_level: 226
os_patch_level: 2024-11
sub_level: 233
os_patch_level: 2025-02
- version: "android13-5.10"
sub_level: 228
os_patch_level: 2025-01
Expand All @@ -27,11 +27,11 @@ jobs:
sub_level: 170
os_patch_level: 2025-01
- version: "android14-6.1"
sub_level: 118
os_patch_level: 2025-01
sub_level: 124
os_patch_level: 2025-02
- version: "android15-6.6"
sub_level: 58
os_patch_level: 2025-01
sub_level: 66
os_patch_level: 2025-02
uses: ./.github/workflows/gki-kernel.yml
with:
version: ${{ matrix.version }}
Expand Down
43 changes: 12 additions & 31 deletions .github/workflows/build-manager-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ on:
paths:
- '.github/workflows/build-manager-ci.yml'
- 'manager/**'
- 'kernel/**'
- 'userspace/ksud_overlayfs**'
- 'userspace/ksud_magic/**'
- 'userspace/susfsd/**'
workflow_call:
workflow_dispatch:

Expand All @@ -39,39 +35,27 @@ jobs:
target: ${{ matrix.target }}
os: ${{ matrix.os }}

build-ksud_overlayfs:
build-ksud:
needs: build-susfsd
strategy:
matrix:
include:
- target: aarch64-linux-android
os: ubuntu-latest
uses: ./.github/workflows/ksud_overlayfs.yml
with:
target: ${{ matrix.target }}
os: ${{ matrix.os }}

build-ksud_magic:
needs: build-susfsd
strategy:
matrix:
include:
- target: aarch64-linux-android
os: ubuntu-latest
uses: ./.github/workflows/ksud_magic.yml
uses: ./.github/workflows/ksud.yml
with:
target: ${{ matrix.target }}
os: ${{ matrix.os }}

build-manager:
needs: [build-ksud_magic, build-ksud_overlayfs]
needs: build-ksud
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./manager

steps:
- name: Checkout
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
Expand All @@ -85,7 +69,7 @@ jobs:
echo "UPLOAD=false" >> $GITHUB_OUTPUT
fi
- name: Write key
- name: Write Key
run: |
if [ ! -z "${{ secrets.KEYSTORE }}" ]; then
{
Expand All @@ -106,9 +90,6 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Setup Android SDK
uses: android-actions/setup-android@v3

- name: Download arm64 susfsd
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -152,27 +133,27 @@ jobs:
chmod +x gradlew
./gradlew clean assembleRelease
- name: Upload build artifact
- name: Upload Build Artifact
uses: actions/upload-artifact@v4
with:
name: manager
name: Manager
path: manager/app/build/outputs/apk/release/*.apk

- name: Upload mappings
- name: Upload Mappings
uses: actions/upload-artifact@v4
with:
name: "mappings"
path: "manager/app/build/outputs/mapping/release/"
name: Mappings
path: manager/app/build/outputs/mapping/release/

- name: Bot session cache
- name: Bot Session Cache
if: steps.need_upload.outputs.UPLOAD == 'true'
id: bot_session_cache
uses: actions/cache@v4
with:
path: scripts/ksunextbot.session
key: ${{ runner.os }}-bot-session

- name: Upload to telegram
- name: Upload to Telegram
if: steps.need_upload.outputs.UPLOAD == 'true'
env:
API_ID: ${{ secrets.API_ID }}
Expand Down
43 changes: 12 additions & 31 deletions .github/workflows/build-manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ on:
# paths:
# - '.github/workflows/build-manager-ci.yml'
# - 'manager/**'
# - 'kernel/**'
# - 'userspace/ksud_overlayfs**'
# - 'userspace/ksud_magic/**'
# - 'userspace/susfsd/**'
workflow_call:
workflow_dispatch:

Expand All @@ -39,39 +35,27 @@ jobs:
target: ${{ matrix.target }}
os: ${{ matrix.os }}

build-ksud_overlayfs:
build-ksud:
needs: build-susfsd
strategy:
matrix:
include:
- target: aarch64-linux-android
os: ubuntu-latest
uses: ./.github/workflows/ksud_overlayfs.yml
with:
target: ${{ matrix.target }}
os: ${{ matrix.os }}

build-ksud_magic:
needs: build-susfsd
strategy:
matrix:
include:
- target: aarch64-linux-android
os: ubuntu-latest
uses: ./.github/workflows/ksud_magic.yml
uses: ./.github/workflows/ksud.yml
with:
target: ${{ matrix.target }}
os: ${{ matrix.os }}

build-manager:
needs: [build-ksud_magic, build-ksud_overlayfs]
needs: build-ksud
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./manager

steps:
- name: Checkout
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
Expand All @@ -85,7 +69,7 @@ jobs:
echo "UPLOAD=false" >> $GITHUB_OUTPUT
fi
- name: Write key
- name: Write Key
run: |
if [ ! -z "${{ secrets.KEYSTORE }}" ]; then
{
Expand All @@ -106,9 +90,6 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Setup Android SDK
uses: android-actions/setup-android@v3

- name: Download arm64 susfsd
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -152,27 +133,27 @@ jobs:
chmod +x gradlew
./gradlew clean assembleRelease
- name: Upload build artifact
- name: Upload Build Artifact
uses: actions/upload-artifact@v4
with:
name: manager
name: Manager
path: manager/app/build/outputs/apk/release/*.apk

- name: Upload mappings
- name: Upload Mappings
uses: actions/upload-artifact@v4
with:
name: "mappings"
path: "manager/app/build/outputs/mapping/release/"
name: Mappings
path: manager/app/build/outputs/mapping/release/

- name: Bot session cache
- name: Bot Session Cache
if: steps.need_upload.outputs.UPLOAD == 'true'
id: bot_session_cache
uses: actions/cache@v4
with:
path: scripts/ksunextbot.session
key: ${{ runner.os }}-bot-session

- name: Upload to telegram
- name: Upload to Telegram
if: steps.need_upload.outputs.UPLOAD == 'true'
env:
API_ID: ${{ secrets.API_ID }}
Expand Down
27 changes: 19 additions & 8 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,26 @@ jobs:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup update stable
- name: Checkout Repository
uses: actions/checkout@v4

- name: Install cross
run: cargo install cross --git https://github.com/cross-rs/cross --rev 66845c1
- name: Setup Rust
run: rustup update stable

- name: Run clippy
- name: Setup Cross
run: RUSTFLAGS="" cargo install cross

- name: Cache ksud_overlayfs
uses: Swatinem/rust-cache@v2
with:
workspaces: userspace/ksud_overlayfs

- name: Cache ksud_magic
uses: Swatinem/rust-cache@v2
with:
workspaces: userspace/ksud_magic

- name: Run Clippy
run: |
cross clippy --manifest-path userspace/ksud_magic/Cargo.toml --target aarch64-linux-android --release
cross clippy --manifest-path userspace/ksud_magic/Cargo.toml --target x86_64-linux-android --release
cross clippy --manifest-path userspace/ksud_overlayfs/Cargo.toml --target aarch64-linux-android --release
cross clippy --manifest-path userspace/ksud_overlayfs/Cargo.toml --target x86_64-linux-android --release
cross clippy --manifest-path userspace/ksud_overlayfs/Cargo.toml --target aarch64-linux-android --release
79 changes: 79 additions & 0 deletions .github/workflows/ksud.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Build ksud
on:
workflow_call:
inputs:
target:
required: true
type: string
os:
required: false
type: string
default: ubuntu-latest
pack_lkm:
required: false
type: boolean
default: true
use_cache:
required: false
type: boolean
default: true
jobs:
build:
runs-on: ${{ inputs.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download Artifacts
uses: actions/download-artifact@v4

- name: Prepare LKM Files
if: ${{ inputs.pack_lkm }}
run: |
cp android*-lkm/*_kernelsu.ko ./userspace/ksud_overlayfs/bin/aarch64/
cp android*-lkm/*_kernelsu.ko ./userspace/ksud_magic/bin/aarch64/
- name: Import susfsd Libraries
run: |
cp susfsd-aarch64-linux-android/arm64-v8a/susfsd ./userspace/ksud_overlayfs/bin/aarch64/
cp susfsd-aarch64-linux-android/arm64-v8a/susfsd ./userspace/ksud_magic/bin/aarch64/
- name: Setup Rust
run: |
rustup update stable
rustup target add aarch64-apple-darwin
- name: Cache ksud_overlayfs
uses: Swatinem/rust-cache@v2
with:
workspaces: userspace/ksud_overlayfs
cache-targets: false

- name: Cache ksud_magic
uses: Swatinem/rust-cache@v2
with:
workspaces: userspace/ksud_magic
cache-targets: false

- name: Setup Cross
run: |
RUSTFLAGS="" cargo install cross --git https://github.com/cross-rs/cross --rev 66845c1 --force
- name: Build ksud
run: |
CROSS_NO_WARNINGS=0 cross build --target ${{ inputs.target }} --release --manifest-path ./userspace/ksud_overlayfs/Cargo.toml
CROSS_NO_WARNINGS=0 cross build --target ${{ inputs.target }} --release --manifest-path ./userspace/ksud_magic/Cargo.toml
- name: Upload ksud_overlayfs artifact
uses: actions/upload-artifact@v4
with:
name: ksud_overlayfs-${{ inputs.target }}
path: userspace/ksud_overlayfs/target/**/release/ksud*

- name: Upload ksud_magic artifact
uses: actions/upload-artifact@v4
with:
name: ksud_magic-${{ inputs.target }}
path: userspace/ksud_magic/target/**/release/ksud*
Loading

0 comments on commit b18f89b

Please sign in to comment.